crypto: arm/sha512-neon - avoid ADRL pseudo instruction
commit 0f5e8323777bfc1c1d2cba71242db6a361de03b6 upstream The ADRL pseudo instruction is not an architectural construct, but a convenience macro that was supported by the ARM proprietary assembler and adopted by binutils GAS as well, but only when assembling in 32-bit ARM mode. Therefore, it can only be used in assembler code that is known to assemble in ARM mode only, but as it turns out, the Clang assembler does not implement ADRL at all, and so it is better to get rid of it entirely. So replace the ADRL instruction with a ADR instruction that refers to a nearer symbol, and apply the delta explicitly using an additional instruction. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5e6f800332
commit
54e6ecd5b7
@@ -212,7 +212,6 @@ $code=<<___;
|
||||
#else
|
||||
.syntax unified
|
||||
# ifdef __thumb2__
|
||||
# define adrl adr
|
||||
.thumb
|
||||
# else
|
||||
.code 32
|
||||
@@ -602,7 +601,8 @@ sha512_block_data_order_neon:
|
||||
dmb @ errata #451034 on early Cortex A8
|
||||
add $len,$inp,$len,lsl#7 @ len to point at the end of inp
|
||||
VFP_ABI_PUSH
|
||||
adrl $Ktbl,K512
|
||||
adr $Ktbl,.Lsha512_block_data_order
|
||||
sub $Ktbl,$Ktbl,.Lsha512_block_data_order-K512
|
||||
vldmia $ctx,{$A-$H} @ load context
|
||||
.Loop_neon:
|
||||
___
|
||||
|
||||
@@ -79,7 +79,6 @@
|
||||
#else
|
||||
.syntax unified
|
||||
# ifdef __thumb2__
|
||||
# define adrl adr
|
||||
.thumb
|
||||
# else
|
||||
.code 32
|
||||
@@ -543,7 +542,8 @@ sha512_block_data_order_neon:
|
||||
dmb @ errata #451034 on early Cortex A8
|
||||
add r2,r1,r2,lsl#7 @ len to point at the end of inp
|
||||
VFP_ABI_PUSH
|
||||
adrl r3,K512
|
||||
adr r3,.Lsha512_block_data_order
|
||||
sub r3,r3,.Lsha512_block_data_order-K512
|
||||
vldmia r0,{d16-d23} @ load context
|
||||
.Loop_neon:
|
||||
vshr.u64 d24,d20,#14 @ 0
|
||||
|
||||
Reference in New Issue
Block a user