summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2010-10-01 22:54:11 +0000
committerDamien Miller <djm@cvs.openbsd.org>2010-10-01 22:54:11 +0000
commit873b69bcc86a63fef7793e328557bb6167befb9a (patch)
tree6291f5e8ae9981442180409678a5e937198542b1 /lib
parentd3977a40290d1168c90924d29c764e0beb2b49e2 (diff)
import OpenSSL-1.0.0a
Diffstat (limited to 'lib')
-rw-r--r--lib/libssl/src/crypto/rc4/asm/rc4-s390x.pl47
1 files changed, 9 insertions, 38 deletions
diff --git a/lib/libssl/src/crypto/rc4/asm/rc4-s390x.pl b/lib/libssl/src/crypto/rc4/asm/rc4-s390x.pl
index 7528ece13c3..96681fa05ec 100644
--- a/lib/libssl/src/crypto/rc4/asm/rc4-s390x.pl
+++ b/lib/libssl/src/crypto/rc4/asm/rc4-s390x.pl
@@ -13,29 +13,6 @@
# "cluster" Address Generation Interlocks, so that one pipeline stall
# resolves several dependencies.
-# November 2010.
-#
-# Adapt for -m31 build. If kernel supports what's called "highgprs"
-# feature on Linux [see /proc/cpuinfo], it's possible to use 64-bit
-# instructions and achieve "64-bit" performance even in 31-bit legacy
-# application context. The feature is not specific to any particular
-# processor, as long as it's "z-CPU". Latter implies that the code
-# remains z/Architecture specific. On z990 it was measured to perform
-# 50% better than code generated by gcc 4.3.
-
-$flavour = shift;
-
-if ($flavour =~ /3[12]/) {
- $SIZE_T=4;
- $g="";
-} else {
- $SIZE_T=8;
- $g="g";
-}
-
-while (($output=shift) && ($output!~/^\w[\w\-]*\.\w+$/)) {}
-open STDOUT,">$output";
-
$rp="%r14";
$sp="%r15";
$code=<<___;
@@ -62,12 +39,7 @@ $code.=<<___;
.type RC4,\@function
.align 64
RC4:
- stm${g} %r6,%r11,6*$SIZE_T($sp)
-___
-$code.=<<___ if ($flavour =~ /3[12]/);
- llgfr $len,$len
-___
-$code.=<<___;
+ stmg %r6,%r11,48($sp)
llgc $XX[0],0($key)
llgc $YY,1($key)
la $XX[0],1($XX[0])
@@ -118,7 +90,7 @@ $code.=<<___;
xgr $acc,$TX[1]
stg $acc,0($out)
la $out,8($out)
- brctg $cnt,.Loop8
+ brct $cnt,.Loop8
.Lshort:
lghi $acc,7
@@ -150,7 +122,7 @@ $code.=<<___;
ahi $XX[0],-1
stc $XX[0],0($key)
stc $YY,1($key)
- lm${g} %r6,%r11,6*$SIZE_T($sp)
+ lmg %r6,%r11,48($sp)
br $rp
.size RC4,.-RC4
.string "RC4 for s390x, CRYPTOGAMS by <appro\@openssl.org>"
@@ -171,11 +143,11 @@ $ikey="%r7";
$iinp="%r8";
$code.=<<___;
-.globl private_RC4_set_key
-.type private_RC4_set_key,\@function
+.globl RC4_set_key
+.type RC4_set_key,\@function
.align 64
-private_RC4_set_key:
- stm${g} %r6,%r8,6*$SIZE_T($sp)
+RC4_set_key:
+ stmg %r6,%r8,48($sp)
lhi $cnt,256
la $idx,0(%r0)
sth $idx,0($key)
@@ -208,9 +180,9 @@ private_RC4_set_key:
la $iinp,0(%r0)
j .L2ndloop
.Ldone:
- lm${g} %r6,%r8,6*$SIZE_T($sp)
+ lmg %r6,%r8,48($sp)
br $rp
-.size private_RC4_set_key,.-private_RC4_set_key
+.size RC4_set_key,.-RC4_set_key
___
}
@@ -231,4 +203,3 @@ RC4_options:
___
print $code;
-close STDOUT; # force flush