Skip to content

Commit 01ef330

Browse files
authored
internal/cipher/gcmsiv: fix arm64 compile error #523
1 parent 30fdd08 commit 01ef330

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

internal/cipher/gcmsiv/gcmsiv_arm64.s

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,28 @@
2727
#define POLY V15
2828
#define ZERO V16
2929

30+
#define reduce() \
31+
VEOR ACC0.B16, ACCM.B16, ACCM.B16 \
32+
VEOR ACC1.B16, ACCM.B16, ACCM.B16 \
33+
VEXT $8, ZERO.B16, ACCM.B16, T0.B16 \
34+
VEXT $8, ACCM.B16, ZERO.B16, ACCM.B16 \
35+
VEOR ACCM.B16, ACC0.B16, ACC0.B16 \
36+
VEOR T0.B16, ACC1.B16, ACC1.B16 \
37+
VPMULL POLY.D1, ACC0.D1, T0.Q1 \
38+
VEXT $8, ACC0.B16, ACC0.B16, ACC0.B16 \
39+
VEOR T0.B16, ACC0.B16, ACC0.B16 \
40+
VPMULL POLY.D1, ACC0.D1, T0.Q1 \
41+
VEOR T0.B16, ACC1.B16, ACC1.B16 \
42+
VEXT $8, ACC1.B16, ACC1.B16, ACC1.B16 \
43+
VEOR ACC1.B16, ACC0.B16, ACC0.B16 \
44+
3045
// func polyvalTableInitAsm(h *[16]byte, table *polyvalAsmTable)
3146
TEXT ·polyvalTableInitAsm(SB), NOSPLIT, $0-16
3247
#define pTbl R0
3348
#define hPtr R1
3449
#define I R2
3550

36-
MOVD hPtr+0(FP), hPtr
51+
MOVD h+0(FP), hPtr
3752
MOVD productTable+8(FP), pTbl
3853
3954
VLD1 (hPtr), [B0.B16]

0 commit comments

Comments
 (0)