diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2023-02-02 13:03:51 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2023-02-02 13:03:51 +0000 |
commit | 918097922473098d0a906a2dcaf6c994681176fb (patch) | |
tree | 741e96f472a191cc0531b8359e09a49e19e9bae0 | |
parent | 056aa319b5b57974ad14ca958d5d2340f6161120 (diff) |
Move all data blocks from .text to .rodata and cleanup up and homogeneize code
responsible from getting the proper address of those blocks.
-rw-r--r-- | lib/libcrypto/bn/asm/alpha-mont.pl | 1 | ||||
-rw-r--r-- | lib/libcrypto/modes/asm/ghash-alpha.pl | 21 | ||||
-rw-r--r-- | 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 <appro\@openssl.org>" .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 <appro\@openssl.org>" -.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 <appro\@openssl.org>" .align 2 ___ $output=shift and open STDOUT,">$output"; |