代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/openssl 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 6df7707fb22e8bd1c7d778a2041c1403f9852060 Mon Sep 17 00:00:00 2001
From: Xu Yizhou <xuyizhou1@huawei.com>
Date: Fri, 3 Feb 2023 15:59:59 +0800
Subject: [PATCH 13/13] Fix SM4-XTS build failure on Mac mini M1
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20202)
---
crypto/sm4/asm/vpsm4-armv8.pl | 4 +++-
crypto/sm4/asm/vpsm4_ex-armv8.pl | 23 ++++++++++++++++-------
2 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/crypto/sm4/asm/vpsm4-armv8.pl b/crypto/sm4/asm/vpsm4-armv8.pl
index e19de30901..d30e78f3ce 100755
--- a/crypto/sm4/asm/vpsm4-armv8.pl
+++ b/crypto/sm4/asm/vpsm4-armv8.pl
@@ -524,7 +524,7 @@ sub compute_tweak_vec() {
my $std = shift;
&rbit(@vtmp[2],$src,$std);
$code.=<<___;
- ldr @qtmp[0], =0x01010101010101010101010101010187
+ ldr @qtmp[0], .Lxts_magic
shl $des.16b, @vtmp[2].16b, #1
ext @vtmp[1].16b, @vtmp[2].16b, @vtmp[2].16b,#15
ushr @vtmp[1].16b, @vtmp[1].16b, #7
@@ -572,6 +572,8 @@ _vpsm4_consts:
.dword 0x56aa3350a3b1bac6,0xb27022dc677d9197
.Lshuffles:
.dword 0x0B0A090807060504,0x030201000F0E0D0C
+.Lxts_magic:
+ .dword 0x0101010101010187,0x0101010101010101
.size _vpsm4_consts,.-_vpsm4_consts
___
diff --git a/crypto/sm4/asm/vpsm4_ex-armv8.pl b/crypto/sm4/asm/vpsm4_ex-armv8.pl
index 3d094aa535..f2d5b6debf 100644
--- a/crypto/sm4/asm/vpsm4_ex-armv8.pl
+++ b/crypto/sm4/asm/vpsm4_ex-armv8.pl
@@ -475,12 +475,12 @@ sub load_sbox () {
my $data = shift;
$code.=<<___;
- ldr $MaskQ, =0x0306090c0f0205080b0e0104070a0d00
- ldr $TAHMatQ, =0x22581a6002783a4062185a2042387a00
- ldr $TALMatQ, =0xc10bb67c4a803df715df62a89e54e923
- ldr $ATAHMatQ, =0x1407c6d56c7fbeadb9aa6b78c1d21300
- ldr $ATALMatQ, =0xe383c1a1fe9edcbc6404462679195b3b
- ldr $ANDMaskQ, =0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
+ ldr $MaskQ, .Lsbox_magic
+ ldr $TAHMatQ, .Lsbox_magic+16
+ ldr $TALMatQ, .Lsbox_magic+32
+ ldr $ATAHMatQ, .Lsbox_magic+48
+ ldr $ATALMatQ, .Lsbox_magic+64
+ ldr $ANDMaskQ, .Lsbox_magic+80
___
}
@@ -525,7 +525,7 @@ sub compute_tweak_vec() {
my $std = shift;
&rbit(@vtmp[2],$src,$std);
$code.=<<___;
- ldr @qtmp[0], =0x01010101010101010101010101010187
+ ldr @qtmp[0], .Lxts_magic
shl $des.16b, @vtmp[2].16b, #1
ext @vtmp[1].16b, @vtmp[2].16b, @vtmp[2].16b,#15
ushr @vtmp[1].16b, @vtmp[1].16b, #7
@@ -556,6 +556,15 @@ _${prefix}_consts:
.dword 0x56aa3350a3b1bac6,0xb27022dc677d9197
.Lshuffles:
.dword 0x0B0A090807060504,0x030201000F0E0D0C
+.Lxts_magic:
+ .dword 0x0101010101010187,0x0101010101010101
+.Lsbox_magic:
+ .dword 0x0b0e0104070a0d00,0x0306090c0f020508
+ .dword 0x62185a2042387a00,0x22581a6002783a40
+ .dword 0x15df62a89e54e923,0xc10bb67c4a803df7
+ .dword 0xb9aa6b78c1d21300,0x1407c6d56c7fbead
+ .dword 0x6404462679195b3b,0xe383c1a1fe9edcbc
+ .dword 0x0f0f0f0f0f0f0f0f,0x0f0f0f0f0f0f0f0f
.size _${prefix}_consts,.-_${prefix}_consts
___
--
2.37.3.windows.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。