Revision e5ca24cb
b/target-arm/helpers.h | ||
---|---|---|
277 | 277 |
DEF_HELPER_2(neon_mul_u8, i32, i32, i32) |
278 | 278 |
DEF_HELPER_2(neon_mul_u16, i32, i32, i32) |
279 | 279 |
DEF_HELPER_2(neon_mul_p8, i32, i32, i32) |
280 |
DEF_HELPER_2(neon_mull_p8, i64, i32, i32) |
|
280 | 281 |
|
281 | 282 |
DEF_HELPER_2(neon_tst_u8, i32, i32, i32) |
282 | 283 |
DEF_HELPER_2(neon_tst_u16, i32, i32, i32) |
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) |
b/target-arm/translate.c | ||
---|---|---|
5124 | 5124 |
gen_neon_mull(cpu_V0, tmp, tmp2, size, u); |
5125 | 5125 |
break; |
5126 | 5126 |
case 14: /* Polynomial VMULL */ |
5127 |
cpu_abort(env, "Polynomial VMULL not implemented"); |
|
5128 |
|
|
5127 |
gen_helper_neon_mull_p8(cpu_V0, tmp, tmp2); |
|
5128 |
dead_tmp(tmp2); |
|
5129 |
dead_tmp(tmp); |
|
5130 |
break; |
|
5129 | 5131 |
default: /* 15 is RESERVED. */ |
5130 | 5132 |
return 1; |
5131 | 5133 |
} |
Also available in: Unified diff