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