zuc: ppc64x, fix compile issue #255

This commit is contained in:
Sun Yimin 2024-10-03 16:38:39 +08:00 committed by GitHub
parent 0760bce984
commit f11b2781e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)