From dc4b2cf3e0979364f14ff89a07ffafc47435e2e7 Mon Sep 17 00:00:00 2001 From: miod <> Date: Wed, 1 Feb 2023 20:45:04 +0000 Subject: Move all data blocks from .text to .rodata and cleanup up and homogeneize code responsible from getting the proper address of those blocks. ok tb@ jsing@ --- src/lib/libcrypto/bn/asm/bn-586.pl | 9 ++++++--- src/lib/libcrypto/bn/asm/x86-gf2m.pl | 5 ++--- src/lib/libcrypto/bn/asm/x86-mont.pl | 5 ++--- 3 files changed, 10 insertions(+), 9 deletions(-) (limited to 'src/lib/libcrypto/bn/asm') diff --git a/src/lib/libcrypto/bn/asm/bn-586.pl b/src/lib/libcrypto/bn/asm/bn-586.pl index c4e2baa6c5..b502fe60ee 100644 --- a/src/lib/libcrypto/bn/asm/bn-586.pl +++ b/src/lib/libcrypto/bn/asm/bn-586.pl @@ -32,7 +32,8 @@ sub bn_mul_add_words $c="ecx"; if ($sse2) { - &picmeup("eax","OPENSSL_ia32cap_P"); + &picsetup("eax"); + &picsymbol("eax", "OPENSSL_ia32cap_P", "eax"); &bt(&DWP(0,"eax"),"\$IA32CAP_BIT0_SSE2"); &jnc(&label("maw_non_sse2")); @@ -218,7 +219,8 @@ sub bn_mul_words $c="ecx"; if ($sse2) { - &picmeup("eax","OPENSSL_ia32cap_P"); + &picsetup("eax"); + &picsymbol("eax", "OPENSSL_ia32cap_P", "eax"); &bt(&DWP(0,"eax"),"\$IA32CAP_BIT0_SSE2"); &jnc(&label("mw_non_sse2")); @@ -329,7 +331,8 @@ sub bn_sqr_words $c="ecx"; if ($sse2) { - &picmeup("eax","OPENSSL_ia32cap_P"); + &picsetup("eax"); + &picsymbol("eax", "OPENSSL_ia32cap_P", "eax"); &bt(&DWP(0,"eax"),"\$IA32CAP_BIT0_SSE2"); &jnc(&label("sqr_non_sse2")); diff --git a/src/lib/libcrypto/bn/asm/x86-gf2m.pl b/src/lib/libcrypto/bn/asm/x86-gf2m.pl index 9715b2158f..cb2f2a5c30 100644 --- a/src/lib/libcrypto/bn/asm/x86-gf2m.pl +++ b/src/lib/libcrypto/bn/asm/x86-gf2m.pl @@ -200,7 +200,8 @@ $R="mm0"; # void bn_GF2m_mul_2x2(BN_ULONG *r, BN_ULONG a1, BN_ULONG a0, BN_ULONG b1, BN_ULONG b0); &function_begin_B("bn_GF2m_mul_2x2"); if (!$x86only) { - &picmeup("edx","OPENSSL_ia32cap_P"); + &picsetup("edx"); + &picsymbol("edx", "OPENSSL_ia32cap_P", "edx"); &mov ("eax",&DWP(0,"edx")); &mov ("edx",&DWP(4,"edx")); &test ("eax","\$IA32CAP_MASK0_MMX"); # check MMX bit @@ -308,6 +309,4 @@ if ($sse2) { &ret (); &function_end_B("bn_GF2m_mul_2x2"); -&asciz ("GF(2^m) Multiplication for x86, CRYPTOGAMS by "); - &asm_finish(); diff --git a/src/lib/libcrypto/bn/asm/x86-mont.pl b/src/lib/libcrypto/bn/asm/x86-mont.pl index e6c04739b1..6524651748 100755 --- a/src/lib/libcrypto/bn/asm/x86-mont.pl +++ b/src/lib/libcrypto/bn/asm/x86-mont.pl @@ -113,7 +113,8 @@ $mul1="mm5"; $temp="mm6"; $mask="mm7"; - &picmeup("eax","OPENSSL_ia32cap_P"); + &picsetup("eax"); + &picsymbol("eax", "OPENSSL_ia32cap_P", "eax"); &bt (&DWP(0,"eax"),"\$IA32CAP_BIT0_SSE2"); &jnc (&label("non_sse2")); @@ -588,6 +589,4 @@ $sbit=$num; &set_label("just_leave"); &function_end("bn_mul_mont"); -&asciz("Montgomery Multiplication for x86, CRYPTOGAMS by "); - &asm_finish(); -- cgit v1.2.3-55-g6feb