diff options
author | miod <> | 2014-12-07 15:55:58 +0000 |
---|---|---|
committer | miod <> | 2014-12-07 15:55:58 +0000 |
commit | 7b2dca192e4d7b709c9f3f00542509fcd3b58b39 (patch) | |
tree | 1bcb120b12cbccfa0ccbdffff9a2f365a3532eb6 /src/lib/libcrypto/sha | |
parent | 2a5c8a2aac92f6b7274d00080eb7e865b9d4ff56 (diff) | |
download | openbsd-7b2dca192e4d7b709c9f3f00542509fcd3b58b39.tar.gz openbsd-7b2dca192e4d7b709c9f3f00542509fcd3b58b39.tar.bz2 openbsd-7b2dca192e4d7b709c9f3f00542509fcd3b58b39.zip |
Make sure to load absolute symbol address with `dla' instead of `la' when
generating code for 64-bit mips userland.
Diffstat (limited to 'src/lib/libcrypto/sha')
-rw-r--r-- | src/lib/libcrypto/sha/asm/sha512-mips.pl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libcrypto/sha/asm/sha512-mips.pl b/src/lib/libcrypto/sha/asm/sha512-mips.pl index 2714794c2f..495a000695 100644 --- a/src/lib/libcrypto/sha/asm/sha512-mips.pl +++ b/src/lib/libcrypto/sha/asm/sha512-mips.pl | |||
@@ -47,6 +47,12 @@ | |||
47 | # | 47 | # |
48 | $flavour = shift; # supported flavours are o32,n32,64,nubi32,nubi64 | 48 | $flavour = shift; # supported flavours are o32,n32,64,nubi32,nubi64 |
49 | 49 | ||
50 | if ($flavour =~ /64/i) { | ||
51 | $LA="dla"; | ||
52 | } else { | ||
53 | $LA="la"; | ||
54 | } | ||
55 | |||
50 | if ($flavour =~ /64|n32/i) { | 56 | if ($flavour =~ /64|n32/i) { |
51 | $PTR_ADD="dadd"; # incidentally works even on n32 | 57 | $PTR_ADD="dadd"; # incidentally works even on n32 |
52 | $PTR_SUB="dsub"; # incidentally works even on n32 | 58 | $PTR_SUB="dsub"; # incidentally works even on n32 |
@@ -284,7 +290,7 @@ $code.=<<___ if ($flavour !~ /o32/i); # non-o32 PIC-ification | |||
284 | ___ | 290 | ___ |
285 | $code.=<<___; | 291 | $code.=<<___; |
286 | .set reorder | 292 | .set reorder |
287 | la $Ktbl,K${label} # PIC-ified 'load address' | 293 | $LA $Ktbl,K${label} # PIC-ified 'load address' |
288 | 294 | ||
289 | $LD $A,0*$SZ($ctx) # load context | 295 | $LD $A,0*$SZ($ctx) # load context |
290 | $LD $B,1*$SZ($ctx) | 296 | $LD $B,1*$SZ($ctx) |