diff --git a/sm4/gcm_arm64.s b/sm4/gcm_arm64.s index 4781c60..2e30544 100644 --- a/sm4/gcm_arm64.s +++ b/sm4/gcm_arm64.s @@ -142,8 +142,10 @@ TEXT ·precomputeTableAsm(SB),NOSPLIT,$0 VEOR B0.B16, B1.B16, B1.B16 ADD $14*16, pTbl - VREV64 B0.B16, B7.B16 - VST1 [B7.B16, B1.B16], (pTbl) + + VREV64 B0.B16, B0.B16 + VST1 [B0.B16, B1.B16], (pTbl) + VREV64 B0.B16, B0.B16 SUB $2*16, pTbl VMOV B0.B16, B2.B16 @@ -175,8 +177,9 @@ initLoop: VEXT $8, B2.B16, B2.B16, B2.B16 VEOR B2.B16, B3.B16, B3.B16 - VREV64 B2.B16, B7.B16 - VST1 [B7.B16, B3.B16], (pTbl) + VREV64 B2.B16, B2.B16 + VST1 [B2.B16, B3.B16], (pTbl) + VREV64 B2.B16, B2.B16 SUB $2*16, pTbl BNE initLoop