ARMv4 assembly pack: allow Thumb2 even in iOS build,

and engage it in most modules.

Reviewed-by: Tim Hudson <tjh@openssl.org>
This commit is contained in:
Andy Polyakov 2015-12-06 22:02:39 +01:00
parent d231a4010b
commit a285992763
10 changed files with 20 additions and 12 deletions

View File

@ -75,6 +75,7 @@ $code=<<___;
.thumb
#else
.code 32
#undef __thumb2__
#endif
.type AES_Te,%object

View File

@ -731,6 +731,7 @@ $code.=<<___;
.thumb
#else
.code 32
# undef __thumb2__
#endif
.type _bsaes_decrypt8,%function

View File

@ -51,7 +51,7 @@ $code=<<___;
#include "arm_arch.h"
.text
#if defined(__thumb2__) && !defined(__APPLE__)
#if defined(__thumb2__)
.syntax unified
.thumb
#else

View File

@ -91,7 +91,7 @@ $code=<<___;
#include "arm_arch.h"
.text
#if defined(__thumb2__) && !defined(__APPLE__)
#if defined(__thumb2__)
.syntax unified
.thumb
#else

View File

@ -45,7 +45,7 @@ $code.=<<___;
#include "arm_arch.h"
.text
#if defined(__thumb2__) && !defined(__APPLE__)
#if defined(__thumb2__)
.syntax unified
.thumb
#else

View File

@ -136,7 +136,7 @@ $code=<<___;
#include "arm_arch.h"
.text
#if defined(__thumb2__) && !defined(__APPLE__)
#if defined(__thumb2__)
.syntax unified
.thumb
#else

View File

@ -66,6 +66,12 @@ my $extern = sub {
};
my $type = sub {
if ($flavour =~ /linux/) { ".type\t".join(',',@_); }
elsif ($flavour =~ /ios32/) { if (join(',',@_) =~ /(\w+),%function/) {
"#ifdef __thumb2__\n".
".thumb_func $1\n".
"#endif";
}
}
else { ""; }
};
my $size = sub {

View File

@ -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

View File

@ -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

View File

@ -212,7 +212,7 @@ $code=<<___;
#endif
.text
#if defined(__thumb2__) && !defined(__APPLE__)
#if defined(__thumb2__)
.syntax unified
.thumb
# define adrl adr