mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-27 04:36:19 +08:00
sm9/bn256: arm64 gfp2Mul
This commit is contained in:
parent
087b3ae596
commit
ecf14648e9
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
#define res_ptr R27
|
#define res_ptr R0
|
||||||
#define a_ptr R1
|
#define a_ptr R1
|
||||||
#define b_ptr R2
|
#define b_ptr R2
|
||||||
|
|
||||||
@ -24,7 +24,7 @@
|
|||||||
#define const3 R16
|
#define const3 R16
|
||||||
|
|
||||||
#define hlp0 R17
|
#define hlp0 R17
|
||||||
#define hlp1 R0
|
#define hlp1 res_ptr
|
||||||
|
|
||||||
#define x0 R19
|
#define x0 R19
|
||||||
#define x1 R20
|
#define x1 R20
|
||||||
@ -505,7 +505,6 @@ TEXT gfpSqrInternal(SB),NOSPLIT,$0
|
|||||||
|
|
||||||
// func gfp2Mul(c, a, b *gfP2)
|
// func gfp2Mul(c, a, b *gfP2)
|
||||||
TEXT ·gfp2Mul(SB),NOSPLIT,$104-24
|
TEXT ·gfp2Mul(SB),NOSPLIT,$104-24
|
||||||
MOVD res+0(FP), res_ptr
|
|
||||||
MOVD in1+8(FP), a_ptr
|
MOVD in1+8(FP), a_ptr
|
||||||
MOVD in2+16(FP), b_ptr
|
MOVD in2+16(FP), b_ptr
|
||||||
|
|
||||||
@ -518,8 +517,6 @@ TEXT ·gfp2Mul(SB),NOSPLIT,$104-24
|
|||||||
CALL gfpMulInternal(SB)
|
CALL gfpMulInternal(SB)
|
||||||
|
|
||||||
STy (tmp0)
|
STy (tmp0)
|
||||||
STy (x3out)
|
|
||||||
/*
|
|
||||||
LDx (x1in)
|
LDx (x1in)
|
||||||
LDy (x2in)
|
LDy (x2in)
|
||||||
CALL gfpMulInternal(SB)
|
CALL gfpMulInternal(SB)
|
||||||
@ -541,6 +538,7 @@ TEXT ·gfp2Mul(SB),NOSPLIT,$104-24
|
|||||||
x2y
|
x2y
|
||||||
LDx (tmp1)
|
LDx (tmp1)
|
||||||
CALL gfpSubInternal(SB)
|
CALL gfpSubInternal(SB)
|
||||||
|
MOVD res+0(FP), res_ptr // not use hlp1 any more
|
||||||
STx (x3out)
|
STx (x3out)
|
||||||
|
|
||||||
LDy (tmp1)
|
LDy (tmp1)
|
||||||
@ -548,5 +546,5 @@ TEXT ·gfp2Mul(SB),NOSPLIT,$104-24
|
|||||||
LDy (tmp0)
|
LDy (tmp0)
|
||||||
CALL gfpSubInternal(SB)
|
CALL gfpSubInternal(SB)
|
||||||
STx (y3out)
|
STx (y3out)
|
||||||
*/
|
|
||||||
RET
|
RET
|
||||||
|
Loading…
x
Reference in New Issue
Block a user