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:
parent
d231a4010b
commit
a285992763
@ -75,6 +75,7 @@ $code=<<___;
|
|||||||
.thumb
|
.thumb
|
||||||
#else
|
#else
|
||||||
.code 32
|
.code 32
|
||||||
|
#undef __thumb2__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.type AES_Te,%object
|
.type AES_Te,%object
|
||||||
|
@ -731,6 +731,7 @@ $code.=<<___;
|
|||||||
.thumb
|
.thumb
|
||||||
#else
|
#else
|
||||||
.code 32
|
.code 32
|
||||||
|
# undef __thumb2__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.type _bsaes_decrypt8,%function
|
.type _bsaes_decrypt8,%function
|
||||||
|
@ -51,7 +51,7 @@ $code=<<___;
|
|||||||
#include "arm_arch.h"
|
#include "arm_arch.h"
|
||||||
|
|
||||||
.text
|
.text
|
||||||
#if defined(__thumb2__) && !defined(__APPLE__)
|
#if defined(__thumb2__)
|
||||||
.syntax unified
|
.syntax unified
|
||||||
.thumb
|
.thumb
|
||||||
#else
|
#else
|
||||||
|
@ -91,7 +91,7 @@ $code=<<___;
|
|||||||
#include "arm_arch.h"
|
#include "arm_arch.h"
|
||||||
|
|
||||||
.text
|
.text
|
||||||
#if defined(__thumb2__) && !defined(__APPLE__)
|
#if defined(__thumb2__)
|
||||||
.syntax unified
|
.syntax unified
|
||||||
.thumb
|
.thumb
|
||||||
#else
|
#else
|
||||||
|
@ -45,7 +45,7 @@ $code.=<<___;
|
|||||||
#include "arm_arch.h"
|
#include "arm_arch.h"
|
||||||
|
|
||||||
.text
|
.text
|
||||||
#if defined(__thumb2__) && !defined(__APPLE__)
|
#if defined(__thumb2__)
|
||||||
.syntax unified
|
.syntax unified
|
||||||
.thumb
|
.thumb
|
||||||
#else
|
#else
|
||||||
|
@ -136,7 +136,7 @@ $code=<<___;
|
|||||||
#include "arm_arch.h"
|
#include "arm_arch.h"
|
||||||
|
|
||||||
.text
|
.text
|
||||||
#if defined(__thumb2__) && !defined(__APPLE__)
|
#if defined(__thumb2__)
|
||||||
.syntax unified
|
.syntax unified
|
||||||
.thumb
|
.thumb
|
||||||
#else
|
#else
|
||||||
|
@ -66,6 +66,12 @@ my $extern = sub {
|
|||||||
};
|
};
|
||||||
my $type = sub {
|
my $type = sub {
|
||||||
if ($flavour =~ /linux/) { ".type\t".join(',',@_); }
|
if ($flavour =~ /linux/) { ".type\t".join(',',@_); }
|
||||||
|
elsif ($flavour =~ /ios32/) { if (join(',',@_) =~ /(\w+),%function/) {
|
||||||
|
"#ifdef __thumb2__\n".
|
||||||
|
".thumb_func $1\n".
|
||||||
|
"#endif";
|
||||||
|
}
|
||||||
|
}
|
||||||
else { ""; }
|
else { ""; }
|
||||||
};
|
};
|
||||||
my $size = sub {
|
my $size = sub {
|
||||||
|
@ -181,7 +181,7 @@ $code=<<___;
|
|||||||
#include "arm_arch.h"
|
#include "arm_arch.h"
|
||||||
|
|
||||||
.text
|
.text
|
||||||
#if defined(__thumb2__) && !defined(__APPLE__)
|
#if defined(__thumb2__)
|
||||||
.syntax unified
|
.syntax unified
|
||||||
.thumb
|
.thumb
|
||||||
#else
|
#else
|
||||||
@ -222,7 +222,7 @@ for($i=0;$i<5;$i++) {
|
|||||||
&BODY_00_15(@V); unshift(@V,pop(@V));
|
&BODY_00_15(@V); unshift(@V,pop(@V));
|
||||||
}
|
}
|
||||||
$code.=<<___;
|
$code.=<<___;
|
||||||
#if defined(__thumb2__) && !defined(__APPLE__)
|
#if defined(__thumb2__)
|
||||||
mov $t3,sp
|
mov $t3,sp
|
||||||
teq $Xi,$t3
|
teq $Xi,$t3
|
||||||
#else
|
#else
|
||||||
@ -246,7 +246,7 @@ for($i=0;$i<5;$i++) {
|
|||||||
&BODY_20_39(@V); unshift(@V,pop(@V));
|
&BODY_20_39(@V); unshift(@V,pop(@V));
|
||||||
}
|
}
|
||||||
$code.=<<___;
|
$code.=<<___;
|
||||||
#if defined(__thumb2__) && !defined(__APPLE__)
|
#if defined(__thumb2__)
|
||||||
mov $t3,sp
|
mov $t3,sp
|
||||||
teq $Xi,$t3
|
teq $Xi,$t3
|
||||||
#else
|
#else
|
||||||
@ -263,7 +263,7 @@ for($i=0;$i<5;$i++) {
|
|||||||
&BODY_40_59(@V); unshift(@V,pop(@V));
|
&BODY_40_59(@V); unshift(@V,pop(@V));
|
||||||
}
|
}
|
||||||
$code.=<<___;
|
$code.=<<___;
|
||||||
#if defined(__thumb2__) && !defined(__APPLE__)
|
#if defined(__thumb2__)
|
||||||
mov $t3,sp
|
mov $t3,sp
|
||||||
teq $Xi,$t3
|
teq $Xi,$t3
|
||||||
#else
|
#else
|
||||||
@ -610,7 +610,7 @@ my ($W0,$W1,$ABCD_SAVE)=map("q$_",(12..14));
|
|||||||
$code.=<<___;
|
$code.=<<___;
|
||||||
#if __ARM_MAX_ARCH__>=7
|
#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
|
# define INST(a,b,c,d) .byte c,d|0xf,a,b
|
||||||
# else
|
# else
|
||||||
# define INST(a,b,c,d) .byte a,b,c,d|0x10
|
# define INST(a,b,c,d) .byte a,b,c,d|0x10
|
||||||
|
@ -175,7 +175,7 @@ $code=<<___;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
.text
|
.text
|
||||||
#if defined(__thumb2__) && !defined(__APPLE__)
|
#if defined(__thumb2__)
|
||||||
.syntax unified
|
.syntax unified
|
||||||
.thumb
|
.thumb
|
||||||
# define adrl adr
|
# define adrl adr
|
||||||
@ -595,7 +595,7 @@ my $Ktbl="r3";
|
|||||||
$code.=<<___;
|
$code.=<<___;
|
||||||
#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
|
#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
|
# define INST(a,b,c,d) .byte c,d|0xc,a,b
|
||||||
# else
|
# else
|
||||||
# define INST(a,b,c,d) .byte a,b,c,d
|
# define INST(a,b,c,d) .byte a,b,c,d
|
||||||
|
@ -212,7 +212,7 @@ $code=<<___;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
.text
|
.text
|
||||||
#if defined(__thumb2__) && !defined(__APPLE__)
|
#if defined(__thumb2__)
|
||||||
.syntax unified
|
.syntax unified
|
||||||
.thumb
|
.thumb
|
||||||
# define adrl adr
|
# define adrl adr
|
||||||
|
Loading…
x
Reference in New Issue
Block a user