From db92a6f60e3e68c859c3fc847aa6acb1de5ac654 Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Tue, 25 Jul 2023 13:12:45 +0800 Subject: [PATCH] sm9/bn256: fix arm64 complete double issue --- sm9/bn256/gfp2_g1_arm64.s | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sm9/bn256/gfp2_g1_arm64.s b/sm9/bn256/gfp2_g1_arm64.s index 7664b86..878c3ec 100644 --- a/sm9/bn256/gfp2_g1_arm64.s +++ b/sm9/bn256/gfp2_g1_arm64.s @@ -730,6 +730,7 @@ TEXT ·curvePointDoubleComplete(SB),NOSPLIT,$168-16 STx (tmp1) LDy (tmp0) CALL gfpSubInternal(SB) // t0 := t0 - t2 + STx (tmp0) LDy (y3t) CALL gfpMulInternal(SB) // Y3 := t0 * Y3 LDx (x3t) @@ -751,8 +752,8 @@ TEXT ·curvePointDoubleComplete(SB),NOSPLIT,$168-16 gfpMulBy2Inline // X3 := X3 + X3 STx (x2in) // Store X3 // Store Y3 - LDx (y3t) - STx (y2in) + LDx (y3t) + STx (y2in) RET