summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/modes/asm
diff options
context:
space:
mode:
authormiod <>2023-01-13 17:11:41 +0000
committermiod <>2023-01-13 17:11:41 +0000
commit364fc1ecd2d96b869246574350c6925835b991ab (patch)
tree754902f7e6ad288b35b04ef817ed997460a00546 /src/lib/libcrypto/modes/asm
parentf80a4029bb2f43fe5f0270857d48bc9d41d3ea4e (diff)
downloadopenbsd-364fc1ecd2d96b869246574350c6925835b991ab.tar.gz
openbsd-364fc1ecd2d96b869246574350c6925835b991ab.tar.bz2
openbsd-364fc1ecd2d96b869246574350c6925835b991ab.zip
Move all data tables from .text section to .rodata, and update the code to
fetch them correctly when building PIC. Also drop unused data, and remove --no-execute-only from linker flags. ok jsing@ kettenis@
Diffstat (limited to 'src/lib/libcrypto/modes/asm')
-rw-r--r--src/lib/libcrypto/modes/asm/ghash-parisc.pl33
1 files changed, 16 insertions, 17 deletions
diff --git a/src/lib/libcrypto/modes/asm/ghash-parisc.pl b/src/lib/libcrypto/modes/asm/ghash-parisc.pl
index 965802d3fa..3f98513105 100644
--- a/src/lib/libcrypto/modes/asm/ghash-parisc.pl
+++ b/src/lib/libcrypto/modes/asm/ghash-parisc.pl
@@ -81,12 +81,7 @@ $rem2="%r6"; # used in PA-RISC 2.0 code
81 81
82$code.=<<___; 82$code.=<<___;
83 .LEVEL $LEVEL 83 .LEVEL $LEVEL
84#if 0
85 .SPACE \$TEXT\$
86 .SUBSPA \$CODE\$,QUAD=0,ALIGN=8,ACCESS=0x2C,CODE_ONLY
87#else
88 .text 84 .text
89#endif
90 85
91 .EXPORT gcm_gmult_4bit,ENTRY,ARGW0=GR,ARGW1=GR 86 .EXPORT gcm_gmult_4bit,ENTRY,ARGW0=GR,ARGW1=GR
92 .ALIGN 64 87 .ALIGN 64
@@ -108,12 +103,14 @@ $code.=<<___ if ($SIZE_T==4);
108 $PUSH %r11,`-$FRAME+8*$SIZE_T`(%sp) 103 $PUSH %r11,`-$FRAME+8*$SIZE_T`(%sp)
109___ 104___
110$code.=<<___; 105$code.=<<___;
111 blr %r0,$rem_4bit
112 ldi 3,$rem
113L\$pic_gmult
114 andcm $rem_4bit,$rem,$rem_4bit
115 addl $inp,$len,$len 106 addl $inp,$len,$len
116 ldo L\$rem_4bit-L\$pic_gmult($rem_4bit),$rem_4bit 107#ifdef __PIC__
108 addil LT'L\$rem_4bit, %r19
109 ldw RT'L\$rem_4bit(%r1), $rem_4bit
110#else
111 ldil L'L\$rem_4bit, %t1
112 ldo R'L\$rem_4bit(%t1), $rem_4bit
113#endif
117 ldi 0xf0,$mask0xf0 114 ldi 0xf0,$mask0xf0
118___ 115___
119$code.=<<___ if ($SIZE_T==4); 116$code.=<<___ if ($SIZE_T==4);
@@ -363,12 +360,14 @@ $code.=<<___ if ($SIZE_T==4);
363 $PUSH %r11,`-$FRAME+8*$SIZE_T`(%sp) 360 $PUSH %r11,`-$FRAME+8*$SIZE_T`(%sp)
364___ 361___
365$code.=<<___; 362$code.=<<___;
366 blr %r0,$rem_4bit
367 ldi 3,$rem
368L\$pic_ghash
369 andcm $rem_4bit,$rem,$rem_4bit
370 addl $inp,$len,$len 363 addl $inp,$len,$len
371 ldo L\$rem_4bit-L\$pic_ghash($rem_4bit),$rem_4bit 364#ifdef __PIC__
365 addil LT'L\$rem_4bit, %r19
366 ldw RT'L\$rem_4bit(%r1), $rem_4bit
367#else
368 ldil L'L\$rem_4bit, %t1
369 ldo R'L\$rem_4bit(%t1), $rem_4bit
370#endif
372 ldi 0xf0,$mask0xf0 371 ldi 0xf0,$mask0xf0
373___ 372___
374$code.=<<___ if ($SIZE_T==4); 373$code.=<<___ if ($SIZE_T==4);
@@ -619,15 +618,15 @@ $code.=<<___;
619 $POPMB -$FRAME(%sp),%r3 618 $POPMB -$FRAME(%sp),%r3
620 .PROCEND 619 .PROCEND
621 620
621 .section .rodata
622 .ALIGN 64 622 .ALIGN 64
623L\$rem_4bit 623L\$rem_4bit
624 .WORD `0x0000<<16`,0,`0x1C20<<16`,0,`0x3840<<16`,0,`0x2460<<16`,0 624 .WORD `0x0000<<16`,0,`0x1C20<<16`,0,`0x3840<<16`,0,`0x2460<<16`,0
625 .WORD `0x7080<<16`,0,`0x6CA0<<16`,0,`0x48C0<<16`,0,`0x54E0<<16`,0 625 .WORD `0x7080<<16`,0,`0x6CA0<<16`,0,`0x48C0<<16`,0,`0x54E0<<16`,0
626 .WORD `0xE100<<16`,0,`0xFD20<<16`,0,`0xD940<<16`,0,`0xC560<<16`,0 626 .WORD `0xE100<<16`,0,`0xFD20<<16`,0,`0xD940<<16`,0,`0xC560<<16`,0
627 .WORD `0x9180<<16`,0,`0x8DA0<<16`,0,`0xA9C0<<16`,0,`0xB5E0<<16`,0 627 .WORD `0x9180<<16`,0,`0x8DA0<<16`,0,`0xA9C0<<16`,0,`0xB5E0<<16`,0
628 .previous
628 629
629 .data
630 .STRINGZ "GHASH for PA-RISC, GRYPTOGAMS by <appro\@openssl.org>"
631 .ALIGN 64 630 .ALIGN 64
632___ 631___
633 632