From 128abb1e87439bcda1267fc705d70358edd7ca8c Mon Sep 17 00:00:00 2001 From: miod Date: Thu, 2 Feb 2023 13:03:50 +0000 Subject: [PATCH] Move all data blocks from .text to .rodata and cleanup up and homogeneize code responsible from getting the proper address of those blocks. --- lib/libcrypto/bn/asm/alpha-mont.pl | 1 - lib/libcrypto/modes/asm/ghash-alpha.pl | 21 +++++---------------- lib/libcrypto/sha/asm/sha1-alpha.pl | 1 - 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/lib/libcrypto/bn/asm/alpha-mont.pl b/lib/libcrypto/bn/asm/alpha-mont.pl index 41700d5bd58..874597f1c05 100644 --- a/lib/libcrypto/bn/asm/alpha-mont.pl +++ b/lib/libcrypto/bn/asm/alpha-mont.pl @@ -308,7 +308,6 @@ bn_mul_mont: lda sp,48(sp) ret (ra) .end bn_mul_mont -.ascii "Montgomery Multiplication for Alpha, CRYPTOGAMS by " .align 2 ___ diff --git a/lib/libcrypto/modes/asm/ghash-alpha.pl b/lib/libcrypto/modes/asm/ghash-alpha.pl index b6d6ea5a62a..9d847006c43 100644 --- a/lib/libcrypto/modes/asm/ghash-alpha.pl +++ b/lib/libcrypto/modes/asm/ghash-alpha.pl @@ -261,8 +261,7 @@ gcm_gmult_4bit: ldq $Xlo,8($Xi) ldq $Xhi,0($Xi) - bsr $t0,picmeup - nop + lda $rem_4bit,rem_4bit ___ &loop(); @@ -336,8 +335,7 @@ gcm_ghash_4bit: ldq $Xhi,0($Xi) ldq $Xlo,8($Xi) - bsr $t0,picmeup - nop + lda $rem_4bit,rem_4bit .Louter: extql $inhi,$inp,$inhi @@ -430,23 +428,14 @@ $code.=<<___; ret (ra) .end gcm_ghash_4bit -.align 4 -.ent picmeup -picmeup: - .frame sp,0,$t0 - .prologue 0 - br $rem_4bit,.Lpic -.Lpic: lda $rem_4bit,12($rem_4bit) - ret ($t0) -.end picmeup - nop + .section .rodata + .align 4 rem_4bit: .long 0,0x0000<<16, 0,0x1C20<<16, 0,0x3840<<16, 0,0x2460<<16 .long 0,0x7080<<16, 0,0x6CA0<<16, 0,0x48C0<<16, 0,0x54E0<<16 .long 0,0xE100<<16, 0,0xFD20<<16, 0,0xD940<<16, 0,0xC560<<16 .long 0,0x9180<<16, 0,0x8DA0<<16, 0,0xA9C0<<16, 0,0xB5E0<<16 -.ascii "GHASH for Alpha, CRYPTOGAMS by " -.align 4 + .previous ___ $output=shift and open STDOUT,">$output"; diff --git a/lib/libcrypto/sha/asm/sha1-alpha.pl b/lib/libcrypto/sha/asm/sha1-alpha.pl index 44720c418c8..56b3369f090 100644 --- a/lib/libcrypto/sha/asm/sha1-alpha.pl +++ b/lib/libcrypto/sha/asm/sha1-alpha.pl @@ -309,7 +309,6 @@ $code.=<<___; lda sp,64(sp) ret (ra) .end sha1_block_data_order -.ascii "SHA1 block transform for Alpha, CRYPTOGAMS by " .align 2 ___ $output=shift and open STDOUT,">$output"; -- 2.20.1