From f11b2781e740599f509b03e1924fd64824dc1d6d Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Thu, 3 Oct 2024 16:38:39 +0800 Subject: [PATCH] zuc: ppc64x, fix compile issue #255 --- zuc/asm_ppc64x.s | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/zuc/asm_ppc64x.s b/zuc/asm_ppc64x.s index 0086d83..89a78ea 100644 --- a/zuc/asm_ppc64x.s +++ b/zuc/asm_ppc64x.s @@ -321,7 +321,8 @@ TEXT ·genKeywordAsm(SB),NOSPLIT,$0 XOR W, W \ LFSR_UPDT(idx, addr, W, tmpR1, tmpR2, tmpR3, tmpR4) -#define ONEROUND_REV32LE(idx, addr, dst, W, tmpR1, tmpR2, tmpR3, tmpR4) \ +#ifdef GOARCH_ppc64le +#define ONEROUND_REV32(idx, addr, dst, W, tmpR1, tmpR2, tmpR3, tmpR4) \ BITS_REORG(idx, addr, W, tmpR1, tmpR2, tmpR3) \ NONLIN_FUN(W, tmpR1, tmpR2, tmpR3) \ XOR BRC_X3, W \ @@ -329,11 +330,9 @@ TEXT ·genKeywordAsm(SB),NOSPLIT,$0 MOVWBR W, (tmpR1)(dst) \ XOR W, W \ LFSR_UPDT(idx, addr, W, tmpR1, tmpR2, tmpR3, tmpR4) - -#ifdef GOARCH_ppc64le -#define ONEROUND_REV32(idx, addr, dst, W, tmpR1, tmpR2, tmpR3, tmpR4) ONEROUND_REV32LE(idx, addr, dst, W, tmpR1, tmpR2, tmpR3, tmpR4) #else -#define ONEROUND_REV32(idx, addr, dst, W, tmpR1, tmpR2, tmpR3, tmpR4) ONEROUND(idx, addr, dst, W, tmpR1, tmpR2, tmpR3, tmpR4) +#define ONEROUND_REV32(idx, addr, dst, W, tmpR1, tmpR2, tmpR3, tmpR4) \ + ONEROUND(idx, addr, dst, W, tmpR1, tmpR2, tmpR3, tmpR4) #endif // func genKeyStreamAsm(keyStream []uint32, pState *zucState32)