Revision e5ca24cb target-arm/neon_helper.c
b/target-arm/neon_helper.c | ||
---|---|---|
895 | 895 |
return result; |
896 | 896 |
} |
897 | 897 |
|
898 |
uint64_t HELPER(neon_mull_p8)(uint32_t op1, uint32_t op2) |
|
899 |
{ |
|
900 |
uint64_t result = 0; |
|
901 |
uint64_t mask; |
|
902 |
uint64_t op2ex = op2; |
|
903 |
op2ex = (op2ex & 0xff) | |
|
904 |
((op2ex & 0xff00) << 8) | |
|
905 |
((op2ex & 0xff0000) << 16) | |
|
906 |
((op2ex & 0xff000000) << 24); |
|
907 |
while (op1) { |
|
908 |
mask = 0; |
|
909 |
if (op1 & 1) { |
|
910 |
mask |= 0xffff; |
|
911 |
} |
|
912 |
if (op1 & (1 << 8)) { |
|
913 |
mask |= (0xffffU << 16); |
|
914 |
} |
|
915 |
if (op1 & (1 << 16)) { |
|
916 |
mask |= (0xffffULL << 32); |
|
917 |
} |
|
918 |
if (op1 & (1 << 24)) { |
|
919 |
mask |= (0xffffULL << 48); |
|
920 |
} |
|
921 |
result ^= op2ex & mask; |
|
922 |
op1 = (op1 >> 1) & 0x7f7f7f7f; |
|
923 |
op2ex <<= 1; |
|
924 |
} |
|
925 |
return result; |
|
926 |
} |
|
927 |
|
|
898 | 928 |
#define NEON_FN(dest, src1, src2) dest = (src1 & src2) ? -1 : 0 |
899 | 929 |
NEON_VOP(tst_u8, neon_u8, 4) |
900 | 930 |
NEON_VOP(tst_u16, neon_u16, 2) |
Also available in: Unified diff