mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
target/arm: Use clmul_8* routines
Use generic routines for 8-bit carry-less multiply. Remove our local version of pmull_h. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
07f348d77c
commit
8e3da4c716
3 changed files with 9 additions and 57 deletions
|
@ -26,6 +26,7 @@
|
|||
#include "exec/exec-all.h"
|
||||
#include "tcg/tcg.h"
|
||||
#include "fpu/softfloat.h"
|
||||
#include "crypto/clmul.h"
|
||||
|
||||
static uint16_t mve_eci_mask(CPUARMState *env)
|
||||
{
|
||||
|
@ -984,15 +985,12 @@ DO_2OP_L(vmulltuw, 1, 4, uint32_t, 8, uint64_t, DO_MUL)
|
|||
* Polynomial multiply. We can always do this generating 64 bits
|
||||
* of the result at a time, so we don't need to use DO_2OP_L.
|
||||
*/
|
||||
#define VMULLPH_MASK 0x00ff00ff00ff00ffULL
|
||||
#define VMULLPW_MASK 0x0000ffff0000ffffULL
|
||||
#define DO_VMULLPBH(N, M) pmull_h((N) & VMULLPH_MASK, (M) & VMULLPH_MASK)
|
||||
#define DO_VMULLPTH(N, M) DO_VMULLPBH((N) >> 8, (M) >> 8)
|
||||
#define DO_VMULLPBW(N, M) pmull_w((N) & VMULLPW_MASK, (M) & VMULLPW_MASK)
|
||||
#define DO_VMULLPTW(N, M) DO_VMULLPBW((N) >> 16, (M) >> 16)
|
||||
|
||||
DO_2OP(vmullpbh, 8, uint64_t, DO_VMULLPBH)
|
||||
DO_2OP(vmullpth, 8, uint64_t, DO_VMULLPTH)
|
||||
DO_2OP(vmullpbh, 8, uint64_t, clmul_8x4_even)
|
||||
DO_2OP(vmullpth, 8, uint64_t, clmul_8x4_odd)
|
||||
DO_2OP(vmullpbw, 8, uint64_t, DO_VMULLPBW)
|
||||
DO_2OP(vmullptw, 8, uint64_t, DO_VMULLPTW)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue