From f7263ee31e75a765d871503fd7326ea3c0c688de Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Thu, 7 Nov 2024 18:08:02 +0800 Subject: [PATCH] ppc64x: rollback again --- sm4/aesni_macros_ppc64x.s | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sm4/aesni_macros_ppc64x.s b/sm4/aesni_macros_ppc64x.s index 4f6cb2d..3d7ab9b 100644 --- a/sm4/aesni_macros_ppc64x.s +++ b/sm4/aesni_macros_ppc64x.s @@ -84,10 +84,11 @@ // - y: 128 bits temp register // - z: 128 bits temp register #define AFFINE_TRANSFORM(L, H, V_FOUR, x, y, z) \ - VAND NIBBLE_MASK, x, y; \ + VAND NIBBLE_MASK, x, z; \ + VPERM L, L, z, y; \ VSRB x, V_FOUR, z; \ - VPERM L, L, y, x; \ - VPERMXOR H, H, z, x + VPERM H, H, z, x; \ + VXOR y, x, x // Affine Transform // parameters: