From 0a3663a64f00b6337ec80d78c8945f2c77c63dba Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Mon, 12 Jun 2017 19:09:57 -0400 Subject: [PATCH] ARMv4 assembly pack: harmonize Thumb-ification of iOS build. Three modules were left behind in I59df0b567e8e80befe5c399f817d6410ddafc577. (Imported from upstream's c93f06c12f10c07cea935abd78a07a037e27f155.) This actually meant functions defined in those two files were non-functional. I'm guessing no one noticed upstream because, if you go strictly by iOS compile-time capabilities, all this code is unreachable on ios32, only ios64. Change-Id: I55035edf2aebf96d14bdf66161afa2374643d4ec Reviewed-on: https://boringssl-review.googlesource.com/17113 Reviewed-by: David Benjamin --- crypto/fipsmodule/aes/asm/aesv8-armx.pl | 9 ++++++--- crypto/fipsmodule/modes/asm/ghashv8-armx.pl | 6 +++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/crypto/fipsmodule/aes/asm/aesv8-armx.pl b/crypto/fipsmodule/aes/asm/aesv8-armx.pl index f7310100..ee07a3a7 100644 --- a/crypto/fipsmodule/aes/asm/aesv8-armx.pl +++ b/crypto/fipsmodule/aes/asm/aesv8-armx.pl @@ -63,9 +63,12 @@ $code.=<<___ if ($flavour =~ /64/); .arch armv8-a+crypto #endif ___ -$code.=".arch armv7-a\n.fpu neon\n.code 32\n" if ($flavour !~ /64/); - #^^^^^^ this is done to simplify adoption by not depending - # on latest binutils. +$code.=<<___ if ($flavour !~ /64/); +.arch armv7-a // don't confuse not-so-latest binutils with argv8 :-) +.fpu neon +.code 32 +#undef __thumb2__ +___ # Assembler mnemonics are an eclectic mix of 32- and 64-bit syntax, # NEON is mostly 32-bit mnemonics, integer - mostly 64. Goal is to diff --git a/crypto/fipsmodule/modes/asm/ghashv8-armx.pl b/crypto/fipsmodule/modes/asm/ghashv8-armx.pl index 858421a0..b1b24810 100644 --- a/crypto/fipsmodule/modes/asm/ghashv8-armx.pl +++ b/crypto/fipsmodule/modes/asm/ghashv8-armx.pl @@ -71,7 +71,11 @@ $code.=<<___ if ($flavour =~ /64/); .arch armv8-a+crypto #endif ___ -$code.=".fpu neon\n.code 32\n" if ($flavour !~ /64/); +$code.=<<___ if ($flavour !~ /64/); +.fpu neon +.code 32 +#undef __thumb2__ +___ ################################################################################ # void gcm_init_v8(u128 Htable[16],const u64 H[2]);