diff options
author | miod <> | 2023-02-02 13:03:50 +0000 |
---|---|---|
committer | miod <> | 2023-02-02 13:03:50 +0000 |
commit | 5e57ccce4a59f140361732f9ee810f0e5080eb2d (patch) | |
tree | d5e74c7d1a6076c7b1aef3316e2ec21e186ed3d4 | |
parent | c68d3edadf095fb8eaaf9a3000e39b27a909f557 (diff) | |
download | openbsd-5e57ccce4a59f140361732f9ee810f0e5080eb2d.tar.gz openbsd-5e57ccce4a59f140361732f9ee810f0e5080eb2d.tar.bz2 openbsd-5e57ccce4a59f140361732f9ee810f0e5080eb2d.zip |
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-- | src/lib/libcrypto/bn/asm/alpha-mont.pl | 1 | ||||
-rw-r--r-- | src/lib/libcrypto/modes/asm/ghash-alpha.pl | 21 | ||||
-rw-r--r-- | src/lib/libcrypto/sha/asm/sha1-alpha.pl | 1 |
3 files changed, 5 insertions, 18 deletions
diff --git a/src/lib/libcrypto/bn/asm/alpha-mont.pl b/src/lib/libcrypto/bn/asm/alpha-mont.pl index 41700d5bd5..874597f1c0 100644 --- a/src/lib/libcrypto/bn/asm/alpha-mont.pl +++ b/src/lib/libcrypto/bn/asm/alpha-mont.pl | |||
@@ -308,7 +308,6 @@ bn_mul_mont: | |||
308 | lda sp,48(sp) | 308 | lda sp,48(sp) |
309 | ret (ra) | 309 | ret (ra) |
310 | .end bn_mul_mont | 310 | .end bn_mul_mont |
311 | .ascii "Montgomery Multiplication for Alpha, CRYPTOGAMS by <appro\@openssl.org>" | ||
312 | .align 2 | 311 | .align 2 |
313 | ___ | 312 | ___ |
314 | 313 | ||
diff --git a/src/lib/libcrypto/modes/asm/ghash-alpha.pl b/src/lib/libcrypto/modes/asm/ghash-alpha.pl index b6d6ea5a62..9d847006c4 100644 --- a/src/lib/libcrypto/modes/asm/ghash-alpha.pl +++ b/src/lib/libcrypto/modes/asm/ghash-alpha.pl | |||
@@ -261,8 +261,7 @@ gcm_gmult_4bit: | |||
261 | ldq $Xlo,8($Xi) | 261 | ldq $Xlo,8($Xi) |
262 | ldq $Xhi,0($Xi) | 262 | ldq $Xhi,0($Xi) |
263 | 263 | ||
264 | bsr $t0,picmeup | 264 | lda $rem_4bit,rem_4bit |
265 | nop | ||
266 | ___ | 265 | ___ |
267 | 266 | ||
268 | &loop(); | 267 | &loop(); |
@@ -336,8 +335,7 @@ gcm_ghash_4bit: | |||
336 | ldq $Xhi,0($Xi) | 335 | ldq $Xhi,0($Xi) |
337 | ldq $Xlo,8($Xi) | 336 | ldq $Xlo,8($Xi) |
338 | 337 | ||
339 | bsr $t0,picmeup | 338 | lda $rem_4bit,rem_4bit |
340 | nop | ||
341 | 339 | ||
342 | .Louter: | 340 | .Louter: |
343 | extql $inhi,$inp,$inhi | 341 | extql $inhi,$inp,$inhi |
@@ -430,23 +428,14 @@ $code.=<<___; | |||
430 | ret (ra) | 428 | ret (ra) |
431 | .end gcm_ghash_4bit | 429 | .end gcm_ghash_4bit |
432 | 430 | ||
433 | .align 4 | 431 | .section .rodata |
434 | .ent picmeup | 432 | .align 4 |
435 | picmeup: | ||
436 | .frame sp,0,$t0 | ||
437 | .prologue 0 | ||
438 | br $rem_4bit,.Lpic | ||
439 | .Lpic: lda $rem_4bit,12($rem_4bit) | ||
440 | ret ($t0) | ||
441 | .end picmeup | ||
442 | nop | ||
443 | rem_4bit: | 433 | rem_4bit: |
444 | .long 0,0x0000<<16, 0,0x1C20<<16, 0,0x3840<<16, 0,0x2460<<16 | 434 | .long 0,0x0000<<16, 0,0x1C20<<16, 0,0x3840<<16, 0,0x2460<<16 |
445 | .long 0,0x7080<<16, 0,0x6CA0<<16, 0,0x48C0<<16, 0,0x54E0<<16 | 435 | .long 0,0x7080<<16, 0,0x6CA0<<16, 0,0x48C0<<16, 0,0x54E0<<16 |
446 | .long 0,0xE100<<16, 0,0xFD20<<16, 0,0xD940<<16, 0,0xC560<<16 | 436 | .long 0,0xE100<<16, 0,0xFD20<<16, 0,0xD940<<16, 0,0xC560<<16 |
447 | .long 0,0x9180<<16, 0,0x8DA0<<16, 0,0xA9C0<<16, 0,0xB5E0<<16 | 437 | .long 0,0x9180<<16, 0,0x8DA0<<16, 0,0xA9C0<<16, 0,0xB5E0<<16 |
448 | .ascii "GHASH for Alpha, CRYPTOGAMS by <appro\@openssl.org>" | 438 | .previous |
449 | .align 4 | ||
450 | 439 | ||
451 | ___ | 440 | ___ |
452 | $output=shift and open STDOUT,">$output"; | 441 | $output=shift and open STDOUT,">$output"; |
diff --git a/src/lib/libcrypto/sha/asm/sha1-alpha.pl b/src/lib/libcrypto/sha/asm/sha1-alpha.pl index 44720c418c..56b3369f09 100644 --- a/src/lib/libcrypto/sha/asm/sha1-alpha.pl +++ b/src/lib/libcrypto/sha/asm/sha1-alpha.pl | |||
@@ -309,7 +309,6 @@ $code.=<<___; | |||
309 | lda sp,64(sp) | 309 | lda sp,64(sp) |
310 | ret (ra) | 310 | ret (ra) |
311 | .end sha1_block_data_order | 311 | .end sha1_block_data_order |
312 | .ascii "SHA1 block transform for Alpha, CRYPTOGAMS by <appro\@openssl.org>" | ||
313 | .align 2 | 312 | .align 2 |
314 | ___ | 313 | ___ |
315 | $output=shift and open STDOUT,">$output"; | 314 | $output=shift and open STDOUT,">$output"; |