]> WPIA git - cassiopeia.git/blobdiff - lib/openssl/crypto/modes/asm/ghash-s390x.pl
upd: openssl to 1.1.0
[cassiopeia.git] / lib / openssl / crypto / modes / asm / ghash-s390x.pl
index 6a40d5d89c0cd25ca6e884746f58b25ccf726bba..65ffaf98bca606279f7eeb9ff05be88c86e37d0e 100644 (file)
@@ -1,4 +1,11 @@
-#!/usr/bin/env perl
+#! /usr/bin/env perl
+# Copyright 2010-2016 The OpenSSL Project Authors. All Rights Reserved.
+#
+# Licensed under the OpenSSL license (the "License").  You may not use
+# this file except in compliance with the License.  You can obtain a copy
+# in the file LICENSE in the source distribution or at
+# https://www.openssl.org/source/license.html
+
 
 # ====================================================================
 # Written by Andy Polyakov <appro@openssl.org> for the OpenSSL
@@ -47,7 +54,7 @@ if ($flavour =~ /3[12]/) {
        $g="g";
 }
 
-while (($output=shift) && ($output!~/^\w[\w\-]*\.\w+$/)) {}
+while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {}
 open STDOUT,">$output";
 
 $softonly=0;
@@ -85,9 +92,7 @@ $code.=<<___ if(!$softonly && 0);     # hardware is slow for single block...
        tmhl    %r0,0x4000      # check for message-security-assist
        jz      .Lsoft_gmult
        lghi    %r0,0
-       la      %r1,16($sp)
-       .long   0xb93e0004      # kimd %r0,%r4
-       lg      %r1,24($sp)
+       lg      %r1,24(%r1)     # load second word of kimd capabilities vector
        tmhh    %r1,0x4000      # check for function 65
        jz      .Lsoft_gmult
        stg     %r0,16($sp)     # arrange 16 bytes of zero input
@@ -186,13 +191,13 @@ $code.=<<___;
        sllg    $rem1,$Zlo,3
        xgr     $Zlo,$tmp
        ngr     $rem1,$x78
+       sllg    $tmp,$Zhi,60
        j       .Lghash_inner
 .align 16
 .Lghash_inner:
        srlg    $Zlo,$Zlo,4
-       sllg    $tmp,$Zhi,60
-       xg      $Zlo,8($nlo,$Htbl)
        srlg    $Zhi,$Zhi,4
+       xg      $Zlo,8($nlo,$Htbl)
        llgc    $xi,0($cnt,$Xi)
        xg      $Zhi,0($nlo,$Htbl)
        sllg    $nlo,$xi,4
@@ -213,9 +218,9 @@ $code.=<<___;
        sllg    $rem1,$Zlo,3
        xgr     $Zlo,$tmp
        ngr     $rem1,$x78
+       sllg    $tmp,$Zhi,60
        brct    $cnt,.Lghash_inner
 
-       sllg    $tmp,$Zhi,60
        srlg    $Zlo,$Zlo,4
        srlg    $Zhi,$Zhi,4
        xg      $Zlo,8($nlo,$Htbl)