PA-RISC assembler pack: switch to bve in 64-bit builds.
PR: 3074
This commit is contained in:
parent
8a99cb29d1
commit
02450ec69d
@ -1015,7 +1015,8 @@ foreach (split("\n",$code)) {
|
|||||||
$SIZE_T==4 ? sprintf("extru%s,%d,8,",$1,31-$2)
|
$SIZE_T==4 ? sprintf("extru%s,%d,8,",$1,31-$2)
|
||||||
: sprintf("extrd,u%s,%d,8,",$1,63-$2)/e;
|
: sprintf("extrd,u%s,%d,8,",$1,63-$2)/e;
|
||||||
|
|
||||||
s/,\*/,/ if ($SIZE_T==4);
|
s/,\*/,/ if ($SIZE_T==4);
|
||||||
|
s/\bbv\b(.*\(%r2\))/bve$1/ if ($SIZE_T==8);
|
||||||
print $_,"\n";
|
print $_,"\n";
|
||||||
}
|
}
|
||||||
close STDOUT;
|
close STDOUT;
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
# of arithmetic operations, most notably multiplications. It requires
|
# of arithmetic operations, most notably multiplications. It requires
|
||||||
# more memory references, most notably to tp[num], but this doesn't
|
# more memory references, most notably to tp[num], but this doesn't
|
||||||
# seem to exhaust memory port capacity. And indeed, dedicated PA-RISC
|
# seem to exhaust memory port capacity. And indeed, dedicated PA-RISC
|
||||||
# 2.0 code path, provides virtually same performance as pa-risc2[W].s:
|
# 2.0 code path provides virtually same performance as pa-risc2[W].s:
|
||||||
# it's ~10% better for shortest key length and ~10% worse for longest
|
# it's ~10% better for shortest key length and ~10% worse for longest
|
||||||
# one.
|
# one.
|
||||||
#
|
#
|
||||||
@ -988,6 +988,8 @@ foreach (split("\n",$code)) {
|
|||||||
# assemble 2.0 instructions in 32-bit mode...
|
# assemble 2.0 instructions in 32-bit mode...
|
||||||
s/^\s+([a-z]+)([\S]*)\s+([\S]*)/&assemble($1,$2,$3)/e if ($BN_SZ==4);
|
s/^\s+([a-z]+)([\S]*)\s+([\S]*)/&assemble($1,$2,$3)/e if ($BN_SZ==4);
|
||||||
|
|
||||||
|
s/\bbv\b/bve/gm if ($SIZE_T==8);
|
||||||
|
|
||||||
print $_,"\n";
|
print $_,"\n";
|
||||||
}
|
}
|
||||||
close STDOUT;
|
close STDOUT;
|
||||||
|
@ -724,6 +724,7 @@ foreach (split("\n",$code)) {
|
|||||||
s/cmpb,\*/comb,/;
|
s/cmpb,\*/comb,/;
|
||||||
s/,\*/,/;
|
s/,\*/,/;
|
||||||
}
|
}
|
||||||
|
s/\bbv\b/bve/ if ($SIZE_T==8);
|
||||||
print $_,"\n";
|
print $_,"\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,33 +97,33 @@ OPENSSL_cleanse
|
|||||||
.PROC
|
.PROC
|
||||||
.CALLINFO NO_CALLS
|
.CALLINFO NO_CALLS
|
||||||
.ENTRY
|
.ENTRY
|
||||||
cmpib,*= 0,$len,Ldone
|
cmpib,*= 0,$len,L\$done
|
||||||
nop
|
nop
|
||||||
cmpib,*>>= 15,$len,Little
|
cmpib,*>>= 15,$len,L\$ittle
|
||||||
ldi $SIZE_T-1,%r1
|
ldi $SIZE_T-1,%r1
|
||||||
|
|
||||||
Lalign
|
L\$align
|
||||||
and,*<> $inp,%r1,%r28
|
and,*<> $inp,%r1,%r28
|
||||||
b,n Laligned
|
b,n L\$aligned
|
||||||
stb %r0,0($inp)
|
stb %r0,0($inp)
|
||||||
ldo -1($len),$len
|
ldo -1($len),$len
|
||||||
b Lalign
|
b L\$align
|
||||||
ldo 1($inp),$inp
|
ldo 1($inp),$inp
|
||||||
|
|
||||||
Laligned
|
L\$aligned
|
||||||
andcm $len,%r1,%r28
|
andcm $len,%r1,%r28
|
||||||
Lot
|
L\$ot
|
||||||
$ST %r0,0($inp)
|
$ST %r0,0($inp)
|
||||||
addib,*<> -$SIZE_T,%r28,Lot
|
addib,*<> -$SIZE_T,%r28,L\$ot
|
||||||
ldo $SIZE_T($inp),$inp
|
ldo $SIZE_T($inp),$inp
|
||||||
|
|
||||||
and,*<> $len,%r1,$len
|
and,*<> $len,%r1,$len
|
||||||
b,n Ldone
|
b,n L\$done
|
||||||
Little
|
L\$ittle
|
||||||
stb %r0,0($inp)
|
stb %r0,0($inp)
|
||||||
addib,*<> -1,$len,Little
|
addib,*<> -1,$len,L\$ittle
|
||||||
ldo 1($inp),$inp
|
ldo 1($inp),$inp
|
||||||
Ldone
|
L\$done
|
||||||
bv ($rp)
|
bv ($rp)
|
||||||
.EXIT
|
.EXIT
|
||||||
nop
|
nop
|
||||||
@ -151,7 +151,7 @@ OPENSSL_instrument_bus
|
|||||||
ldw 0($out),$tick
|
ldw 0($out),$tick
|
||||||
add $diff,$tick,$tick
|
add $diff,$tick,$tick
|
||||||
stw $tick,0($out)
|
stw $tick,0($out)
|
||||||
Loop
|
L\$oop
|
||||||
mfctl %cr16,$tick
|
mfctl %cr16,$tick
|
||||||
sub $tick,$lasttick,$diff
|
sub $tick,$lasttick,$diff
|
||||||
copy $tick,$lasttick
|
copy $tick,$lasttick
|
||||||
@ -161,7 +161,7 @@ Loop
|
|||||||
add $diff,$tick,$tick
|
add $diff,$tick,$tick
|
||||||
stw $tick,0($out)
|
stw $tick,0($out)
|
||||||
|
|
||||||
addib,<> -1,$cnt,Loop
|
addib,<> -1,$cnt,L\$oop
|
||||||
addi 4,$out,$out
|
addi 4,$out,$out
|
||||||
|
|
||||||
bv ($rp)
|
bv ($rp)
|
||||||
@ -190,14 +190,14 @@ OPENSSL_instrument_bus2
|
|||||||
mfctl %cr16,$tick
|
mfctl %cr16,$tick
|
||||||
sub $tick,$lasttick,$diff
|
sub $tick,$lasttick,$diff
|
||||||
copy $tick,$lasttick
|
copy $tick,$lasttick
|
||||||
Loop2
|
L\$oop2
|
||||||
copy $diff,$lastdiff
|
copy $diff,$lastdiff
|
||||||
fdc 0($out)
|
fdc 0($out)
|
||||||
ldw 0($out),$tick
|
ldw 0($out),$tick
|
||||||
add $diff,$tick,$tick
|
add $diff,$tick,$tick
|
||||||
stw $tick,0($out)
|
stw $tick,0($out)
|
||||||
|
|
||||||
addib,= -1,$max,Ldone2
|
addib,= -1,$max,L\$done2
|
||||||
nop
|
nop
|
||||||
|
|
||||||
mfctl %cr16,$tick
|
mfctl %cr16,$tick
|
||||||
@ -208,17 +208,18 @@ Loop2
|
|||||||
|
|
||||||
ldi 1,%r1
|
ldi 1,%r1
|
||||||
xor %r1,$tick,$tick
|
xor %r1,$tick,$tick
|
||||||
addb,<> $tick,$cnt,Loop2
|
addb,<> $tick,$cnt,L\$oop2
|
||||||
shladd,l $tick,2,$out,$out
|
shladd,l $tick,2,$out,$out
|
||||||
Ldone2
|
L\$done2
|
||||||
bv ($rp)
|
bv ($rp)
|
||||||
.EXIT
|
.EXIT
|
||||||
add $rv,$cnt,$rv
|
add $rv,$cnt,$rv
|
||||||
.PROCEND
|
.PROCEND
|
||||||
___
|
___
|
||||||
}
|
}
|
||||||
$code =~ s/cmpib,\*/comib,/gm if ($SIZE_T==4);
|
$code =~ s/cmpib,\*/comib,/gm if ($SIZE_T==4);
|
||||||
$code =~ s/,\*/,/gm if ($SIZE_T==4);
|
$code =~ s/,\*/,/gm if ($SIZE_T==4);
|
||||||
|
$code =~ s/\bbv\b/bve/gm if ($SIZE_T==8);
|
||||||
print $code;
|
print $code;
|
||||||
close STDOUT;
|
close STDOUT;
|
||||||
|
|
||||||
|
@ -307,7 +307,8 @@ L\$opts
|
|||||||
.STRINGZ "RC4 for PA-RISC, CRYPTOGAMS by <appro\@openssl.org>"
|
.STRINGZ "RC4 for PA-RISC, CRYPTOGAMS by <appro\@openssl.org>"
|
||||||
___
|
___
|
||||||
$code =~ s/\`([^\`]*)\`/eval $1/gem;
|
$code =~ s/\`([^\`]*)\`/eval $1/gem;
|
||||||
$code =~ s/cmpib,\*/comib,/gm if ($SIZE_T==4);
|
$code =~ s/cmpib,\*/comib,/gm if ($SIZE_T==4);
|
||||||
|
$code =~ s/\bbv\b/bve/gm if ($SIZE_T==8);
|
||||||
|
|
||||||
print $code;
|
print $code;
|
||||||
close STDOUT;
|
close STDOUT;
|
||||||
|
@ -254,6 +254,7 @@ $code.=<<___;
|
|||||||
___
|
___
|
||||||
|
|
||||||
$code =~ s/\`([^\`]*)\`/eval $1/gem;
|
$code =~ s/\`([^\`]*)\`/eval $1/gem;
|
||||||
$code =~ s/,\*/,/gm if ($SIZE_T==4);
|
$code =~ s/,\*/,/gm if ($SIZE_T==4);
|
||||||
|
$code =~ s/\bbv\b/bve/gm if ($SIZE_T==8);
|
||||||
print $code;
|
print $code;
|
||||||
close STDOUT;
|
close STDOUT;
|
||||||
|
@ -785,6 +785,8 @@ foreach (split("\n",$code)) {
|
|||||||
|
|
||||||
s/cmpb,\*/comb,/ if ($SIZE_T==4);
|
s/cmpb,\*/comb,/ if ($SIZE_T==4);
|
||||||
|
|
||||||
|
s/\bbv\b/bve/ if ($SIZE_T==8);
|
||||||
|
|
||||||
print $_,"\n";
|
print $_,"\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user