Update copyright year
[openssl.git] / crypto / aes / asm / bsaes-armv7.pl
index 33295881e1968b2e004e2c60d9d4ddd2a4f7bc69..bfe825af0d92b8c0b8f5ba53aed639de76765cff 100644 (file)
@@ -1,5 +1,5 @@
 #! /usr/bin/env perl
-# Copyright 2012-2016 The OpenSSL Project Authors. All Rights Reserved.
+# Copyright 2012-2018 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
@@ -14,8 +14,7 @@
 # details see http://www.openssl.org/~appro/cryptogams/.
 #
 # Specific modes and adaptation for Linux kernel by Ard Biesheuvel
-# <ard.biesheuvel@linaro.org>. Permission to use under GPL terms is
-# granted.
+# of Linaro. Permission to use under GPL terms is granted.
 # ====================================================================
 
 # Bit-sliced AES for ARM NEON
 #                                              <appro@openssl.org>
 
 # April-August 2013
-#
-# Add CBC, CTR and XTS subroutines, adapt for kernel use.
-#
-#                                      <ard.biesheuvel@linaro.org>
+# Add CBC, CTR and XTS subroutines and adapt for kernel use; courtesy of Ard.
 
 $flavour = shift;
 if ($flavour=~/\w[\w\-]*\.\w+$/) { $output=$flavour; undef $flavour; }
@@ -744,9 +740,9 @@ $code.=<<___;
 .type  _bsaes_decrypt8,%function
 .align 4
 _bsaes_decrypt8:
-       adr     $const,_bsaes_decrypt8
+       adr     $const,.
        vldmia  $key!, {@XMM[9]}                @ round 0 key
-#ifdef __APPLE__
+#if defined(__thumb2__) || defined(__APPLE__)
        adr     $const,.LM0ISR
 #else
        add     $const,$const,#.LM0ISR-_bsaes_decrypt8
@@ -843,9 +839,9 @@ _bsaes_const:
 .type  _bsaes_encrypt8,%function
 .align 4
 _bsaes_encrypt8:
-       adr     $const,_bsaes_encrypt8
+       adr     $const,.
        vldmia  $key!, {@XMM[9]}                @ round 0 key
-#ifdef __APPLE__
+#if defined(__thumb2__) || defined(__APPLE__)
        adr     $const,.LM0SR
 #else
        sub     $const,$const,#_bsaes_encrypt8-.LM0SR
@@ -951,9 +947,9 @@ $code.=<<___;
 .type  _bsaes_key_convert,%function
 .align 4
 _bsaes_key_convert:
-       adr     $const,_bsaes_key_convert
+       adr     $const,.
        vld1.8  {@XMM[7]},  [$inp]!             @ load round 0 key
-#ifdef __APPLE__
+#if defined(__thumb2__) || defined(__APPLE__)
        adr     $const,.LM0
 #else
        sub     $const,$const,#_bsaes_key_convert-.LM0
@@ -1365,7 +1361,7 @@ bsaes_cbc_encrypt:
        vmov    @XMM[4],@XMM[15]                @ just in case ensure that IV
        vmov    @XMM[5],@XMM[0]                 @ and input are preserved
        bl      AES_decrypt
-       vld1.8  {@XMM[0]}, [$fp,:64]            @ load result
+       vld1.8  {@XMM[0]}, [$fp]                @ load result
        veor    @XMM[0], @XMM[0], @XMM[4]       @ ^= IV
        vmov    @XMM[15], @XMM[5]               @ @XMM[5] holds input
        vst1.8  {@XMM[0]}, [$rounds]            @ write output