-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
81 changed files
with
1,091 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
for (int i = 0; i < 32; i++) { | ||
dst.byte[i] = ((s8)a.byte[i] > (s8)b.byte[i]) ? (a.byte[i] - b.byte[i]) | ||
: (b.byte[i] - a.byte[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
for (int i = 0; i < 32; i++) { | ||
dst.byte[i] = ((u8)a.byte[i] > (u8)b.byte[i]) ? (a.byte[i] - b.byte[i]) | ||
: (b.byte[i] - a.byte[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
for (int i = 0; i < 4; i++) { | ||
dst.dword[i] = ((s64)a.dword[i] > (s64)b.dword[i]) | ||
? (a.dword[i] - b.dword[i]) | ||
: (b.dword[i] - a.dword[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
for (int i = 0; i < 4; i++) { | ||
dst.dword[i] = ((u64)a.dword[i] > (u64)b.dword[i]) | ||
? (a.dword[i] - b.dword[i]) | ||
: (b.dword[i] - a.dword[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
for (int i = 0; i < 16; i++) { | ||
dst.half[i] = ((s16)a.half[i] > (s16)b.half[i]) ? (a.half[i] - b.half[i]) | ||
: (b.half[i] - a.half[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
for (int i = 0; i < 16; i++) { | ||
dst.half[i] = ((u16)a.half[i] > (u16)b.half[i]) ? (a.half[i] - b.half[i]) | ||
: (b.half[i] - a.half[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
for (int i = 0; i < 8; i++) { | ||
dst.word[i] = ((s32)a.word[i] > (s32)b.word[i]) ? (a.word[i] - b.word[i]) | ||
: (b.word[i] - a.word[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
for (int i = 0; i < 8; i++) { | ||
dst.word[i] = ((u32)a.word[i] > (u32)b.word[i]) ? (a.word[i] - b.word[i]) | ||
: (b.word[i] - a.word[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0;i < 2;i++) { | ||
dst.qword[i] = a.qword[i] + b.qword[i]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 32; i++) { | ||
dst.byte[i] = abs((s8)a.byte[i]) + abs((s8)b.byte[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 4; i++) { | ||
dst.dword[i] = abs((s64)a.dword[i]) + abs((s64)b.dword[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 16; i++) { | ||
dst.half[i] = abs((s16)a.half[i]) + abs((s16)b.half[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 8; i++) { | ||
dst.word[i] = abs((s32)a.word[i]) + abs((s32)b.word[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 4; i++) { | ||
dst.dword[i] = a.dword[i] & b.dword[i]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 32; i++) { | ||
dst.byte[i] = a.byte[i] & imm; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 4; i++) { | ||
dst.dword[i] = b.dword[i] & (~a.dword[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
int shift = (imm * 8) % 128; | ||
dst.qword[0] = (u128)a.qword[0] << shift; | ||
dst.qword[1] = (u128)a.qword[1] << shift; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
int shift = (imm * 8) % 128; | ||
dst.qword[0] = (u128)a.qword[0] >> shift; | ||
dst.qword[1] = (u128)a.qword[1] >> shift; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 4; i++) { | ||
dst.dword[i] = fp_classify(a.fp64[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 2; i++) { | ||
dst.word[i] = fp_classify(a.fp32[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 4; i++) { | ||
dst.fp64[i] = a.fp64[i] * b.fp64[i] + c.fp64[i]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 8; i++) { | ||
dst.fp32[i] = a.fp32[i] * b.fp32[i] + c.fp32[i]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 4; i++) { | ||
dst.fp64[i] = a.fp64[i] * b.fp64[i] - c.fp64[i]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 8; i++) { | ||
dst.fp32[i] = a.fp32[i] * b.fp32[i] - c.fp32[i]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 4; i++) { | ||
dst.fp64[i] = (a.fp64[i] * b.fp64[i] + c.fp64[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 8; i++) { | ||
dst.fp32[i] = -(a.fp32[i] * b.fp32[i] + c.fp32[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 4; i++) { | ||
dst.fp64[i] = -(a.fp64[i] * b.fp64[i] - c.fp64[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 8; i++) { | ||
dst.fp32[i] = -(a.fp32[i] * b.fp32[i] - c.fp32[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 32; i++) { | ||
dst.byte[i] = (i == imm) ? b : a.byte[i]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 16; i++) { | ||
dst.half[i] = (i == imm) ? b : a.half[i]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dst = memory_load(256, addr + offset); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
u64 imm12_10 = (imm >> 10) & 0b111; | ||
u64 imm12_8 = (imm >> 8) & 0b11111; | ||
u64 imm9_0 = imm & 0x3FF; | ||
s64 simm9_0 = ((s64)imm9_0 << 54) >> 54; | ||
u64 imm7_0 = imm & 0xFF; | ||
u64 imm7 = (imm >> 7) & 0x1; | ||
u64 imm6 = (imm >> 6) & 0x1; | ||
u64 imm5 = (imm >> 5) & 0x1; | ||
u64 imm5_0 = imm & 0x3F; | ||
u64 imm4 = (imm >> 4) & 0x1; | ||
u64 imm3 = (imm >> 3) & 0x1; | ||
u64 imm2 = (imm >> 2) & 0x1; | ||
u64 imm1 = (imm >> 1) & 0x1; | ||
u64 imm0 = imm & 0x1; | ||
|
||
u64 broadcast_value; | ||
u64 broadcast_width; | ||
if (imm12_10 == 0b000) { | ||
broadcast_value = imm7_0; | ||
broadcast_width = 8; | ||
} else if (imm12_10 == 0b001) { | ||
broadcast_value = simm9_0; | ||
broadcast_width = 16; | ||
} else if (imm12_10 == 0b010) { | ||
broadcast_value = simm9_0; | ||
broadcast_width = 32; | ||
} else if (imm12_10 == 0b011) { | ||
broadcast_value = simm9_0; | ||
broadcast_width = 64; | ||
} else if (imm12_8 == 0b10000) { | ||
broadcast_value = imm7_0; | ||
broadcast_width = 32; | ||
} else if (imm12_8 == 0b10001) { | ||
broadcast_value = imm7_0 << 8; | ||
broadcast_width = 32; | ||
} else if (imm12_8 == 0b10010) { | ||
broadcast_value = imm7_0 << 16; | ||
broadcast_width = 32; | ||
} else if (imm12_8 == 0b10011) { | ||
broadcast_value = imm7_0 << 24; | ||
broadcast_width = 32; | ||
} else if (imm12_8 == 0b10100) { | ||
broadcast_value = imm7_0; | ||
broadcast_width = 16; | ||
} else if (imm12_8 == 0b10101) { | ||
broadcast_value = imm7_0 << 8; | ||
broadcast_width = 16; | ||
} else if (imm12_8 == 0b10110) { | ||
broadcast_value = (imm7_0 << 8) | 0xFF; | ||
broadcast_width = 32; | ||
} else if (imm12_8 == 0b10111) { | ||
broadcast_value = (imm7_0 << 16) | 0xFFFF; | ||
broadcast_width = 32; | ||
} else if (imm12_8 == 0b11000) { | ||
broadcast_value = imm7_0; | ||
broadcast_width = 8; | ||
} else if (imm12_8 == 0b11001) { | ||
broadcast_value = imm0 * 0xFF + imm1 * 0xFF00 + imm2 * 0xFF0000 + | ||
imm3 * 0xFF000000 + imm4 * 0xFF00000000 + | ||
imm5 * 0xFF0000000000 + imm6 * 0xFF000000000000 + | ||
imm7 * 0xFF00000000000000; | ||
broadcast_width = 64; | ||
} else if (imm12_8 == 0b11010) { | ||
broadcast_value = (imm7 << 31) | ((1 - imm6) << 30) | ((imm6 * 0x1F) << 25) | | ||
(imm5_0 << 19); | ||
broadcast_width = 32; | ||
} else if (imm12_8 == 0b11011) { | ||
broadcast_value = (imm7 << 31) | ((1 - imm6) << 30) | ((imm6 * 0x1F) << 25) | | ||
(imm5_0 << 19); | ||
broadcast_width = 64; | ||
} else if (imm12_8 == 0b11100) { | ||
broadcast_value = (imm7 << 63) | ((1 - imm6) << 62) | ((imm6 * 0xFF) << 54) | | ||
(imm5_0 << 48); | ||
broadcast_width = 64; | ||
} | ||
|
||
if (broadcast_width == 8) { | ||
for (int i = 0; i < 32; i++) { | ||
dst.byte[i] = broadcast_value; | ||
} | ||
} else if (broadcast_width == 16) { | ||
for (int i = 0; i < 16; i++) { | ||
dst.half[i] = broadcast_value; | ||
} | ||
} else if (broadcast_width == 32) { | ||
for (int i = 0; i < 8; i++) { | ||
dst.word[i] = broadcast_value; | ||
} | ||
} else if (broadcast_width == 64) { | ||
for (int i = 0; i < 4; i++) { | ||
dst.dword[i] = broadcast_value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
u8 data = memory_load(8, addr + offset); | ||
for (int i = 0; i < 32; i++) { | ||
dst.byte[i] = data; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
u64 data = memory_load(64, addr + (offset << 3)); | ||
for (int i = 0; i < 4; i++) { | ||
dst.dword[i] = data; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
u16 data = memory_load(16, addr + (offset << 1)); | ||
for (int i = 0; i < 16; i++) { | ||
dst.half[i] = data; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
u32 data = memory_load(32, addr + (offset << 2)); | ||
for (int i = 0; i < 8; i++) { | ||
dst.word[i] = data; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dst = memory_load(256, addr + offset); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 4; i++) { | ||
dst.dword[i] = ~(a.dword[i] | b.dword[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 32; i++) { | ||
dst.byte[i] = ~(a.byte[i] | imm); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 4; i++) { | ||
dst.dword[i] = a.dword[i] | b.dword[i]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 32; i++) { | ||
dst.byte[i] = a.byte[i] | imm; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 4; i++) { | ||
dst.dword[i] = a.dword[i] | (~b.dword[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dst.dword[0] = a.dword[imm & 0x3]; | ||
dst.dword[1] = a.dword[(imm >> 2) & 0x3]; | ||
dst.dword[2] = a.dword[(imm >> 4) & 0x3]; | ||
dst.dword[3] = a.dword[(imm >> 6) & 0x3]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 32; i++) { | ||
dst.byte[i] = a.byte[idx]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 4; i++) { | ||
dst.dword[i] = a.dword[idx]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 16; i++) { | ||
dst.half[i] = a.half[idx]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 8; i++) { | ||
dst.word[i] = a.word[idx]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dst = 1; | ||
for (int i = 0; i < 32; i++) { | ||
if (a.byte[i] == 0) { | ||
dst = 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dst = 1; | ||
for (int i = 0; i < 4; i++) { | ||
if (a.dword[i] == 0) { | ||
dst = 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dst = 1; | ||
for (int i = 0; i < 16; i++) { | ||
if (a.half[i] == 0) { | ||
dst = 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dst = 1; | ||
for (int i = 0; i < 8; i++) { | ||
if (a.word[i] == 0) { | ||
dst = 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dst = 0; | ||
for (int i = 0; i < 32; i++) { | ||
if (a.byte[i] == 0) { | ||
dst = 1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dst = 0; | ||
for (int i = 0; i < 4; i++) { | ||
if (a.dword[i] == 0) { | ||
dst = 1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dst = 0; | ||
for (int i = 0; i < 16; i++) { | ||
if (a.half[i] == 0) { | ||
dst = 1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dst = 0; | ||
for (int i = 0; i < 8; i++) { | ||
if (a.word[i] == 0) { | ||
dst = 1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dst = a.qword[0] == 0 && a.qword[1] == 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dst = a.qword[0] != 0 || a.qword[1] != 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dst.dword[0] = (imm & 2) ? b.dword[(imm & 1)] : a.dword[(imm & 1)]; | ||
dst.dword[1] = | ||
(imm & 8) ? b.dword[((imm >> 2) & 1)] : a.dword[((imm >> 2) & 1)]; | ||
dst.dword[2] = (imm & 2) ? b.dword[(imm & 1) + 2] : a.dword[(imm & 1) + 2]; | ||
dst.dword[3] = | ||
(imm & 8) ? b.dword[((imm >> 2) & 1) + 2] : a.dword[((imm >> 2) & 1) + 2]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
for (int i = 0; i < 32; i++) { | ||
if ((c.byte[i] % 64) < 32) { | ||
dst.byte[i] = b.byte[c.byte[i] % 32]; | ||
} else { | ||
dst.byte[i] = a.byte[c.byte[i] % 32]; | ||
} | ||
} |
Oops, something went wrong.