From 189b2d990e3fe841991fa47991ed1fa3614c99d8 Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Thu, 7 Nov 2024 17:39:31 +0800 Subject: [PATCH] ppc64x: try VPERMXOR --- sm4/aesni_macros_ppc64x.s | 3 +-- zuc/asm_ppc64x.s | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sm4/aesni_macros_ppc64x.s b/sm4/aesni_macros_ppc64x.s index 3d7ab9b..1c94614 100644 --- a/sm4/aesni_macros_ppc64x.s +++ b/sm4/aesni_macros_ppc64x.s @@ -87,8 +87,7 @@ VAND NIBBLE_MASK, x, z; \ VPERM L, L, z, y; \ VSRB x, V_FOUR, z; \ - VPERM H, H, z, x; \ - VXOR y, x, x + VPERMXOR H, z, y, x // Affine Transform // parameters: diff --git a/zuc/asm_ppc64x.s b/zuc/asm_ppc64x.s index d8e6999..8a10eb7 100644 --- a/zuc/asm_ppc64x.s +++ b/zuc/asm_ppc64x.s @@ -90,8 +90,7 @@ GLOBL rcon<>(SB), RODATA, $160 VAND NIBBLE_MASK, x, z; \ VPERM L, L, z, y; \ VSRB x, V_FOUR, z; \ - VPERM H, H, z, x; \ - VXOR y, x, x + VPERMXOR H, z, y, x #define SHLDL(a, b, n) \ // NO SHLDL in GOLANG now SLW n, a, a \