sha/asm/sha512-armv8.pl: adapt for kernel use.
[openssl.git] / crypto / sha / asm / sha512-parisc.pl
index e24ee58ae97f2a5c2bb78a93e1496462e1caaa28..d28a5af83554a7885530f1a5703299e4b2d440e1 100755 (executable)
@@ -1,4 +1,11 @@
-#!/usr/bin/env perl
+#! /usr/bin/env perl
+# Copyright 2009-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@fy.chalmers.se> for the OpenSSL
@@ -19,7 +26,7 @@
 # SHA512 performance is >2.9x better than gcc 3.2 generated code on
 # PA-7100LC, PA-RISC 1.1 processor. Then implementation detects if the
 # code is executed on PA-RISC 2.0 processor and switches to 64-bit
-# code path delivering adequate peformance even in "blended" 32-bit
+# code path delivering adequate performance even in "blended" 32-bit
 # build. Though 64-bit code is not any faster than code generated by
 # vendor compiler on PA-8600...
 #
@@ -361,7 +368,7 @@ L\$parisc1
 ___
 
 @V=(  $Ahi,  $Alo,  $Bhi,  $Blo,  $Chi,  $Clo,  $Dhi,  $Dlo,
-      $Ehi,  $Elo,  $Fhi,  $Flo,  $Ghi,  $Glo,  $Hhi,  $Hlo) = 
+      $Ehi,  $Elo,  $Fhi,  $Flo,  $Ghi,  $Glo,  $Hhi,  $Hlo) =
    ( "%r1", "%r2", "%r3", "%r4", "%r5", "%r6", "%r7", "%r8",
      "%r9","%r10","%r11","%r12","%r13","%r14","%r15","%r16");
 $a0 ="%r17";
@@ -412,7 +419,7 @@ $code.=<<___;
         add    $t0,$hlo,$hlo
        shd     $ahi,$alo,$Sigma0[0],$t0
         addc   $t1,$hhi,$hhi           ; h += Sigma1(e)
-       shd     $alo,$ahi,$Sigma0[0],$t1        
+       shd     $alo,$ahi,$Sigma0[0],$t1
         add    $a0,$hlo,$hlo
        shd     $ahi,$alo,$Sigma0[1],$t2
         addc   $a1,$hhi,$hhi           ; h += Ch(e,f,g)
@@ -785,6 +792,8 @@ foreach (split("\n",$code)) {
 
        s/cmpb,\*/comb,/ if ($SIZE_T==4);
 
+       s/\bbv\b/bve/    if ($SIZE_T==8);
+
        print $_,"\n";
 }