Move all data blocks from .text to .rodata and cleanup up and homogeneize code
authormiod <miod@openbsd.org>
Thu, 2 Feb 2023 13:03:50 +0000 (13:03 +0000)
committermiod <miod@openbsd.org>
Thu, 2 Feb 2023 13:03:50 +0000 (13:03 +0000)
responsible from getting the proper address of those blocks.

lib/libcrypto/bn/asm/alpha-mont.pl
lib/libcrypto/modes/asm/ghash-alpha.pl
lib/libcrypto/sha/asm/sha1-alpha.pl

index 41700d5..874597f 100644 (file)
@@ -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
 ___
 
index b6d6ea5..9d84700 100644 (file)
@@ -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";
index 44720c4..56b3369 100644 (file)
@@ -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";