X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fsha%2Fasm%2Fsha1-sparcv9.pl;h=b5efcde5c13962f37c0a7aad65269969759154c0;hp=f661e96524eb2b1f77bc6cd376917d14fd6b79ed;hb=32213d8d77e0ce6afc4b19f94c228812d0bf8fd5;hpb=3ed6e2277158868a5bbd438ef0aa7b9d86cf6393 diff --git a/crypto/sha/asm/sha1-sparcv9.pl b/crypto/sha/asm/sha1-sparcv9.pl index f661e96524..b5efcde5c1 100644 --- a/crypto/sha/asm/sha1-sparcv9.pl +++ b/crypto/sha/asm/sha1-sparcv9.pl @@ -25,11 +25,6 @@ # single-process result on 8-core processor, or ~9GBps per 2.85GHz # socket. -$bits=32; -for (@ARGV) { $bits=64 if (/\-m64/ || /\-xarch\=v9/); } -if ($bits==64) { $bias=2047; $frame=192; } -else { $bias=0; $frame=112; } - $output=shift; open STDOUT,">$output"; @@ -185,13 +180,14 @@ $code.=<<___; ___ } -$code.=<<___ if ($bits==64); -.register %g2,#scratch -.register %g3,#scratch -___ $code.=<<___; #include "sparc_arch.h" +#ifdef __arch64__ +.register %g2,#scratch +.register %g3,#scratch +#endif + .section ".text",#alloc,#execinstr #ifdef __PIC__ @@ -227,10 +223,11 @@ sha1_block_data_order: subcc %o2, 1, %o2 ! done yet? ldd [%o1 + 0x38], %f22 add %o1, 0x40, %o1 + prefetch [%o1 + 63], 20 .word 0x81b02820 ! SHA1 - bne,pt `$bits==64?"%xcc":"%icc"`, .Lhw_loop + bne,pt SIZE_T_CC, .Lhw_loop nop .Lhwfinish: @@ -257,6 +254,7 @@ sha1_block_data_order: subcc %o2, 1, %o2 ! done yet? ldd [%o1 + 0x40], %f26 add %o1, 0x40, %o1 + prefetch [%o1 + 63], 20 faligndata %f10, %f12, %f8 faligndata %f12, %f14, %f10 @@ -269,7 +267,7 @@ sha1_block_data_order: .word 0x81b02820 ! SHA1 - bne,pt `$bits==64?"%xcc":"%icc"`, .Lhwunaligned_loop + bne,pt SIZE_T_CC, .Lhwunaligned_loop for %f26, %f26, %f10 ! %f10=%f26 ba .Lhwfinish @@ -277,7 +275,7 @@ sha1_block_data_order: .align 16 .Lsoftware: - save %sp,-$frame,%sp + save %sp,-STACK_FRAME,%sp sllx $len,6,$len add $inp,$len,$len @@ -357,7 +355,7 @@ $code.=<<___; add $E,@X[4],$E st $E,[$ctx+16] - bne `$bits==64?"%xcc":"%icc"`,.Lloop + bne SIZE_T_CC,.Lloop andn $inp,7,$tmp0 ret