summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorXu Yizhou <xuyizhou1@huawei.com>2024-02-04 16:30:02 +0800
committerTomas Mraz <tomas@openssl.org>2024-02-06 12:36:20 +0100
commit432b205dd714b1b90a443e0a077cee64bc9ca4c3 (patch)
treee64e8eca6fe3be52bd5afe5ba48286da06ba0f2d /crypto
parent5fa5d59750db9df00f4871949a66020ac44f4f9c (diff)
Fix SM2 test failures on Apple Silicon
This patch is to fix #23368. Signed-off-by: Xu Yizhou <xuyizhou1@huawei.com> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23472) (cherry picked from commit 1751185154ab1f1a796e0f39567fe51c8e24b78d)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/ec/asm/ecp_sm2p256-armv8.pl10
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/ec/asm/ecp_sm2p256-armv8.pl b/crypto/ec/asm/ecp_sm2p256-armv8.pl
index 62fadc0454..91894e49d0 100644
--- a/crypto/ec/asm/ecp_sm2p256-armv8.pl
+++ b/crypto/ec/asm/ecp_sm2p256-armv8.pl
@@ -23,7 +23,7 @@ open OUT,"| \"$^X\" $xlate $flavour \"$output\""
my ($s0,$s1,$s2,$s3,$s4,$s5,$s6,$s7)=map("x$_",(7..14));
my ($a8,$a10,$a12,$a14,$a9,$a11,$a13,$a15)=map("x$_",(7..14));
my ($t0,$t1,$t2,$t3)=map("x$_",(3..6));
-my ($t4,$t5,$t6,$t7,$t8)=map("x$_",(15..19));
+my ($t4,$t5,$t6,$t7,$t8)=map("x$_",(15..17,19,20));
sub bn_mod_add() {
my $mod = shift;
@@ -537,7 +537,7 @@ ecp_sm2p256_mul:
stp x29,x30,[sp,#-80]!
add x29,sp,#0
stp x16,x17,[sp,#16]
- stp x18,x19,[sp,#64]
+ stp x19,x20,[sp,#64]
// Load inputs
ldp $s0,$s1,[x1]
@@ -678,7 +678,7 @@ ecp_sm2p256_mul:
// Restore scalar registers
ldp x16,x17,[sp,#16]
- ldp x18,x19,[sp,#64]
+ ldp x19,x20,[sp,#64]
ldp x29,x30,[sp],#80
AARCH64_VALIDATE_LINK_REGISTER
@@ -696,7 +696,7 @@ ecp_sm2p256_sqr:
stp x29,x30,[sp,#-80]!
add x29,sp,#0
stp x16,x17,[sp,#16]
- stp x18,x19,[sp,#64]
+ stp x19,x20,[sp,#64]
// Load inputs
ldp $s4,$s5,[x1]
@@ -806,7 +806,7 @@ ecp_sm2p256_sqr:
// Restore scalar registers
ldp x16,x17,[sp,#16]
- ldp x18,x19,[sp,#64]
+ ldp x19,x20,[sp,#64]
ldp x29,x30,[sp],#80
AARCH64_VALIDATE_LINK_REGISTER