sha/asm/sha512-armv8.pl: adapt for kernel use.
[openssl.git] / crypto / sha / asm / sha512-armv4.pl
index 56bb9fddffc7965e5335d0d3c0fa651fa7f99cf6..22b5a9d0b1328ded0db569ea8dfa91883ed3ed03 100644 (file)
@@ -1,4 +1,11 @@
-#!/usr/bin/env perl
+#! /usr/bin/env perl
+# Copyright 2007-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
@@ -51,8 +58,8 @@ $lo="LO";
 # ====================================================================
 
 $flavour = shift;
-if ($flavour=~/^\w[\w\-]*\.\w+$/) { $output=$flavour; undef $flavour; }
-else { while (($output=shift) && ($output!~/^\w[\w\-]*\.\w+$/)) {} }
+if ($flavour=~/\w[\w\-]*\.\w+$/) { $output=$flavour; undef $flavour; }
+else { while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {} }
 
 if ($flavour && $flavour ne "void") {
     $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
@@ -287,7 +294,7 @@ sha512_block_data_order:
 #ifdef __APPLE__
        ldr     r12,[r12]
 #endif
-       tst     r12,#1
+       tst     r12,#ARMV7_NEON
        bne     .LNEON
 #endif
        add     $len,$inp,$len,lsl#7    @ len to point at the end of inp