ec/curve25519.c: avoid 2^51 radix on SPARC.
[openssl.git] / crypto / aes / asm / aes-s390x.pl
index 77b4640bd6d9aebc70dbc1a4e196e3c2b76fa612..0ef1f6b50ab447716c0a92747e88e01c455a0e12 100644 (file)
@@ -44,7 +44,7 @@
 # minimize/avoid Address Generation Interlock hazard and to favour
 # dual-issue z10 pipeline. This gave ~25% improvement on z10 and
 # almost 50% on z9. The gain is smaller on z10, because being dual-
-# issue z10 makes it improssible to eliminate the interlock condition:
+# issue z10 makes it impossible to eliminate the interlock condition:
 # critial path is not long enough. Yet it spends ~24 cycles per byte
 # processed with 128-bit key.
 #
@@ -129,6 +129,8 @@ sub _data_word()
 }
 
 $code=<<___;
+#include "s390x_arch.h"
+
 .text
 
 .type  AES_Te,\@object
@@ -823,8 +825,8 @@ $code.=<<___ if (!$softonly);
        larl    %r1,OPENSSL_s390xcap_P
        llihh   %r0,0x8000
        srlg    %r0,%r0,0(%r5)
-       ng      %r0,32(%r1)     # check availability of both km...
-       ng      %r0,48(%r1)     # ...and kmc support for given key length
+       ng      %r0,S390X_KM(%r1)  # check availability of both km...
+       ng      %r0,S390X_KMC(%r1) # ...and kmc support for given key length
        jz      .Lekey_internal
 
        lmg     %r0,%r1,0($inp) # just copy 128 bits...
@@ -1442,7 +1444,7 @@ $code.=<<___ if (!$softonly && 0);# kmctr code was measured to be ~12% slower
        larl    %r1,OPENSSL_s390xcap_P
        llihh   %r0,0x8000      # check if kmctr supports the function code
        srlg    %r0,%r0,0($s0)
-       ng      %r0,64(%r1)     # check kmctr capability vector
+       ng      %r0,S390X_KMCTR(%r1)    # check kmctr capability vector
        lgr     %r0,$s0
        lgr     %r1,$s1
        jz      .Lctr32_km_loop
@@ -1592,7 +1594,7 @@ $code.=<<___ if(1);
        larl    %r1,OPENSSL_s390xcap_P
        llihh   %r0,0x8000
        srlg    %r0,%r0,32($s1)         # check for 32+function code
-       ng      %r0,32(%r1)             # check km capability vector
+       ng      %r0,S390X_KM(%r1)       # check km capability vector
        lgr     %r0,$s0                 # restore the function code
        la      %r1,0($key1)            # restore $key1
        jz      .Lxts_km_vanilla
@@ -2219,7 +2221,6 @@ ___
 }
 $code.=<<___;
 .string        "AES for s390x, CRYPTOGAMS by <appro\@openssl.org>"
-.comm  OPENSSL_s390xcap_P,80,8
 ___
 
 $code =~ s/\`([^\`]*)\`/eval $1/gem;