internal/sm2ec: use neon for p256BigToLittle

This commit is contained in:
Sun Yimin 2023-11-07 08:54:30 +08:00 committed by GitHub
parent 6535a2d27f
commit 224c41c0d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,16 +80,15 @@ TEXT ·p256BigToLittle(SB),NOSPLIT,$0
MOVD res+0(FP), res_ptr MOVD res+0(FP), res_ptr
MOVD in+8(FP), a_ptr MOVD in+8(FP), a_ptr
LDP 0*16(a_ptr), (acc0, acc1) VLD1 (a_ptr), [V0.B16, V1.B16]
LDP 1*16(a_ptr), (acc2, acc3)
REV acc0, acc0 VEXT $8, V0.B16, V0.B16, V2.B16
REV acc1, acc1 VEXT $8, V1.B16, V1.B16, V3.B16
REV acc2, acc2 VREV64 V2.B16, V2.B16
REV acc3, acc3 VREV64 V3.B16, V3.B16
VST1 [V2.B16, V3.B16], (res_ptr)
STP (acc3, acc2), 0*16(res_ptr)
STP (acc1, acc0), 1*16(res_ptr)
RET RET
/* ---------------------------------------*/ /* ---------------------------------------*/
// func p256MovCond(res, a, b *SM2P256Point, cond int) // func p256MovCond(res, a, b *SM2P256Point, cond int)