Skip to content

Commit

Permalink
sm9/bn256: fix arm64 non-avx2 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
emmansun authored Oct 24, 2023
1 parent 5243d0f commit 55e8c79
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sm9/bn256/select_amd64.s
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ TEXT ·gfpCopy(SB),NOSPLIT,$0
MOVOU X0, (16*0)(res_ptr)
MOVOU X1, (16*1)(res_ptr)

RET

copygfp_avx2:
VMOVDQU (x_ptr), Y0
VMOVDQU Y0, (res_ptr)
Expand All @@ -44,6 +46,7 @@ TEXT ·gfp2Copy(SB),NOSPLIT,$0
MOVOU X1, (16*1)(res_ptr)
MOVOU X2, (16*2)(res_ptr)
MOVOU X3, (16*3)(res_ptr)
RET

copygfp2_avx2:
VMOVDQU (32*0)(x_ptr), Y0
Expand Down Expand Up @@ -82,6 +85,8 @@ TEXT ·gfp4Copy(SB),NOSPLIT,$0
MOVOU X5, (16*5)(res_ptr)
MOVOU X6, (16*6)(res_ptr)
MOVOU X7, (16*7)(res_ptr)

RET

copygfp4_avx2:
VMOVDQU (32*0)(x_ptr), Y0
Expand Down Expand Up @@ -134,6 +139,8 @@ TEXT ·gfp6Copy(SB),NOSPLIT,$0
MOVOU X9, (16*9)(res_ptr)
MOVOU X10, (16*10)(res_ptr)
MOVOU X11, (16*11)(res_ptr)

RET

copygfp6_avx2:
VMOVDQU (32*0)(x_ptr), Y0
Expand Down Expand Up @@ -221,6 +228,8 @@ TEXT ·gfp12Copy(SB),NOSPLIT,$0
MOVOU X6, (16*22)(res_ptr)
MOVOU X7, (16*23)(res_ptr)

RET

copygfp12_avx2:
VMOVDQU (32*0)(x_ptr), Y0
VMOVDQU (32*1)(x_ptr), Y1
Expand Down

0 comments on commit 55e8c79

Please sign in to comment.