diff options
author | Dave Martin <dave.martin@linaro.org> | 2013-01-10 12:20:15 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-01-13 12:41:22 +0000 |
commit | 638591cd7b601d403ed703d55062b48c32ea8cfb (patch) | |
tree | eb7f735b59d7609976b768fc7deb020b6f3d955a /crypto/fcrypt.c | |
parent | 9931faca02c604c22335f5a935a501bb2ace6e20 (diff) | |
download | linux-638591cd7b601d403ed703d55062b48c32ea8cfb.tar.gz linux-638591cd7b601d403ed703d55062b48c32ea8cfb.tar.bz2 linux-638591cd7b601d403ed703d55062b48c32ea8cfb.zip |
ARM: 7626/1: arm/crypto: Make asm SHA-1 and AES code Thumb-2 compatible
This patch fixes aes-armv4.S and sha1-armv4-large.S to work
natively in Thumb. This allows ARM/Thumb interworking workarounds
to be removed.
I also take the opportunity to convert some explicit assembler
directives for exported functions to the standard
ENTRY()/ENDPROC().
For the code itself:
* In sha1_block_data_order, use of TEQ with sp is deprecated in
ARMv7 and not supported in Thumb. For the branches back to
.L_00_15 and .L_40_59, the TEQ is converted to a CMP, under the
assumption that clobbering the C flag here will not cause
incorrect behaviour.
For the first branch back to .L_20_39_or_60_79 the C flag is
important, so sp is moved temporarily into another register so
that TEQ can be used for the comparison.
* In the AES code, most forms of register-indexed addressing with
shifts and rotates are not permitted for loads and stores in
Thumb, so the address calculation is done using a separate
instruction for the Thumb case.
The resulting code is unlikely to be optimally scheduled, but it
should not have a large impact given the overall size of the code.
I haven't run any benchmarks.
Signed-off-by: Dave Martin <dave.martin@linaro.org>
Tested-by: David McCullough <ucdevel@gmail.com> (ARM only)
Acked-by: David McCullough <ucdevel@gmail.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'crypto/fcrypt.c')
0 files changed, 0 insertions, 0 deletions