mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-10 02:54:58 -06:00
target/arm: Use clmul_32* routines
Use generic routines for 32-bit carry-less multiply. Remove our local version of pmull_d. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
9a65a570fa
commit
bae25f648e
1 changed files with 1 additions and 13 deletions
|
@ -2055,18 +2055,6 @@ void HELPER(sve2_pmull_h)(void *vd, void *vn, void *vm, uint32_t desc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint64_t pmull_d(uint64_t op1, uint64_t op2)
|
|
||||||
{
|
|
||||||
uint64_t result = 0;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < 32; ++i) {
|
|
||||||
uint64_t mask = -((op1 >> i) & 1);
|
|
||||||
result ^= (op2 << i) & mask;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void HELPER(sve2_pmull_d)(void *vd, void *vn, void *vm, uint32_t desc)
|
void HELPER(sve2_pmull_d)(void *vd, void *vn, void *vm, uint32_t desc)
|
||||||
{
|
{
|
||||||
intptr_t sel = H4(simd_data(desc));
|
intptr_t sel = H4(simd_data(desc));
|
||||||
|
@ -2075,7 +2063,7 @@ void HELPER(sve2_pmull_d)(void *vd, void *vn, void *vm, uint32_t desc)
|
||||||
uint64_t *d = vd;
|
uint64_t *d = vd;
|
||||||
|
|
||||||
for (i = 0; i < opr_sz / 8; ++i) {
|
for (i = 0; i < opr_sz / 8; ++i) {
|
||||||
d[i] = pmull_d(n[2 * i + sel], m[2 * i + sel]);
|
d[i] = clmul_32(n[2 * i + sel], m[2 * i + sel]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue