[openssl-commits] [openssl] master update

Andy Polyakov appro at openssl.org
Mon Dec 7 11:07:38 UTC 2015


The branch master has been updated
       via  a285992763f3961f69a8d86bf7dfff020a08cef9 (commit)
      from  d231a4010bfa4032dc24a74c6cd3073e252864c4 (commit)


- Log -----------------------------------------------------------------
commit a285992763f3961f69a8d86bf7dfff020a08cef9
Author: Andy Polyakov <appro at openssl.org>
Date:   Sun Dec 6 22:02:39 2015 +0100

    ARMv4 assembly pack: allow Thumb2 even in iOS build,
    and engage it in most modules.
    
    Reviewed-by: Tim Hudson <tjh at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 crypto/aes/asm/aes-armv4.pl         |  1 +
 crypto/aes/asm/bsaes-armv7.pl       |  1 +
 crypto/bn/asm/armv4-gf2m.pl         |  2 +-
 crypto/bn/asm/armv4-mont.pl         |  2 +-
 crypto/ec/asm/ecp_nistz256-armv4.pl |  2 +-
 crypto/modes/asm/ghash-armv4.pl     |  2 +-
 crypto/perlasm/arm-xlate.pl         |  6 ++++++
 crypto/sha/asm/sha1-armv4-large.pl  | 10 +++++-----
 crypto/sha/asm/sha256-armv4.pl      |  4 ++--
 crypto/sha/asm/sha512-armv4.pl      |  2 +-
 10 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/crypto/aes/asm/aes-armv4.pl b/crypto/aes/asm/aes-armv4.pl
index c3d166f..fbe4597 100644
--- a/crypto/aes/asm/aes-armv4.pl
+++ b/crypto/aes/asm/aes-armv4.pl
@@ -75,6 +75,7 @@ $code=<<___;
 .thumb
 #else
 .code	32
+#undef __thumb2__
 #endif
 
 .type	AES_Te,%object
diff --git a/crypto/aes/asm/bsaes-armv7.pl b/crypto/aes/asm/bsaes-armv7.pl
index f9293d5..03b8d82 100644
--- a/crypto/aes/asm/bsaes-armv7.pl
+++ b/crypto/aes/asm/bsaes-armv7.pl
@@ -731,6 +731,7 @@ $code.=<<___;
 .thumb
 #else
 .code   32
+# undef __thumb2__
 #endif
 
 .type	_bsaes_decrypt8,%function
diff --git a/crypto/bn/asm/armv4-gf2m.pl b/crypto/bn/asm/armv4-gf2m.pl
index 227581e..22aa483 100644
--- a/crypto/bn/asm/armv4-gf2m.pl
+++ b/crypto/bn/asm/armv4-gf2m.pl
@@ -51,7 +51,7 @@ $code=<<___;
 #include "arm_arch.h"
 
 .text
-#if defined(__thumb2__) && !defined(__APPLE__)
+#if defined(__thumb2__)
 .syntax	unified
 .thumb
 #else
diff --git a/crypto/bn/asm/armv4-mont.pl b/crypto/bn/asm/armv4-mont.pl
index 48e5230..7017ad5 100644
--- a/crypto/bn/asm/armv4-mont.pl
+++ b/crypto/bn/asm/armv4-mont.pl
@@ -91,7 +91,7 @@ $code=<<___;
 #include "arm_arch.h"
 
 .text
-#if defined(__thumb2__) && !defined(__APPLE__)
+#if defined(__thumb2__)
 .syntax	unified
 .thumb
 #else
diff --git a/crypto/ec/asm/ecp_nistz256-armv4.pl b/crypto/ec/asm/ecp_nistz256-armv4.pl
index aeeb190..3a636ea 100755
--- a/crypto/ec/asm/ecp_nistz256-armv4.pl
+++ b/crypto/ec/asm/ecp_nistz256-armv4.pl
@@ -45,7 +45,7 @@ $code.=<<___;
 #include "arm_arch.h"
 
 .text
-#if defined(__thumb2__) && !defined(__APPLE__)
+#if defined(__thumb2__)
 .syntax	unified
 .thumb
 #else
diff --git a/crypto/modes/asm/ghash-armv4.pl b/crypto/modes/asm/ghash-armv4.pl
index 245ac92..0d5b8ef 100644
--- a/crypto/modes/asm/ghash-armv4.pl
+++ b/crypto/modes/asm/ghash-armv4.pl
@@ -136,7 +136,7 @@ $code=<<___;
 #include "arm_arch.h"
 
 .text
-#if defined(__thumb2__) && !defined(__APPLE__)
+#if defined(__thumb2__)
 .syntax	unified
 .thumb
 #else
diff --git a/crypto/perlasm/arm-xlate.pl b/crypto/perlasm/arm-xlate.pl
index 81ceb31..ecd3198 100755
--- a/crypto/perlasm/arm-xlate.pl
+++ b/crypto/perlasm/arm-xlate.pl
@@ -66,6 +66,12 @@ my $extern = sub {
 };
 my $type = sub {
     if ($flavour =~ /linux/)	{ ".type\t".join(',', at _); }
+    elsif ($flavour =~ /ios32/)	{ if (join(',', at _) =~ /(\w+),%function/) {
+					"#ifdef __thumb2__\n".
+					".thumb_func	$1\n".
+					"#endif";
+				  }
+			        }
     else			{ ""; }
 };
 my $size = sub {
diff --git a/crypto/sha/asm/sha1-armv4-large.pl b/crypto/sha/asm/sha1-armv4-large.pl
index 9d34e04..e1bb92b 100644
--- a/crypto/sha/asm/sha1-armv4-large.pl
+++ b/crypto/sha/asm/sha1-armv4-large.pl
@@ -181,7 +181,7 @@ $code=<<___;
 #include "arm_arch.h"
 
 .text
-#if defined(__thumb2__) && !defined(__APPLE__)
+#if defined(__thumb2__)
 .syntax	unified
 .thumb
 #else
@@ -222,7 +222,7 @@ for($i=0;$i<5;$i++) {
 	&BODY_00_15(@V);	unshift(@V,pop(@V));
 }
 $code.=<<___;
-#if defined(__thumb2__) && !defined(__APPLE__)
+#if defined(__thumb2__)
 	mov	$t3,sp
 	teq	$Xi,$t3
 #else
@@ -246,7 +246,7 @@ for($i=0;$i<5;$i++) {
 	&BODY_20_39(@V);	unshift(@V,pop(@V));
 }
 $code.=<<___;
-#if defined(__thumb2__) && !defined(__APPLE__)
+#if defined(__thumb2__)
 	mov	$t3,sp
 	teq	$Xi,$t3
 #else
@@ -263,7 +263,7 @@ for($i=0;$i<5;$i++) {
 	&BODY_40_59(@V);	unshift(@V,pop(@V));
 }
 $code.=<<___;
-#if defined(__thumb2__) && !defined(__APPLE__)
+#if defined(__thumb2__)
 	mov	$t3,sp
 	teq	$Xi,$t3
 #else
@@ -610,7 +610,7 @@ my ($W0,$W1,$ABCD_SAVE)=map("q$_",(12..14));
 $code.=<<___;
 #if __ARM_MAX_ARCH__>=7
 
-# if defined(__thumb2__) && !defined(__APPLE__)
+# if defined(__thumb2__)
 #  define INST(a,b,c,d)	.byte	c,d|0xf,a,b
 # else
 #  define INST(a,b,c,d)	.byte	a,b,c,d|0x10
diff --git a/crypto/sha/asm/sha256-armv4.pl b/crypto/sha/asm/sha256-armv4.pl
index c65073b..b6b39dc 100644
--- a/crypto/sha/asm/sha256-armv4.pl
+++ b/crypto/sha/asm/sha256-armv4.pl
@@ -175,7 +175,7 @@ $code=<<___;
 #endif
 
 .text
-#if defined(__thumb2__) && !defined(__APPLE__)
+#if defined(__thumb2__)
 .syntax unified
 .thumb
 # define adrl adr
@@ -595,7 +595,7 @@ my $Ktbl="r3";
 $code.=<<___;
 #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
 
-# if defined(__thumb2__) && !defined(__APPLE__)
+# if defined(__thumb2__)
 #  define INST(a,b,c,d)	.byte	c,d|0xc,a,b
 # else
 #  define INST(a,b,c,d)	.byte	a,b,c,d
diff --git a/crypto/sha/asm/sha512-armv4.pl b/crypto/sha/asm/sha512-armv4.pl
index a83d677..56bb9fd 100644
--- a/crypto/sha/asm/sha512-armv4.pl
+++ b/crypto/sha/asm/sha512-armv4.pl
@@ -212,7 +212,7 @@ $code=<<___;
 #endif
 
 .text
-#if defined(__thumb2__) && !defined(__APPLE__)
+#if defined(__thumb2__)
 .syntax unified
 .thumb
 # define adrl adr


More information about the openssl-commits mailing list