diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-08-25 15:59:15 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-08-25 17:14:42 +0200 |
commit | 08446b129bbde34665c423d882f857a45b8c3aed (patch) | |
tree | 7278a8a8e379265d9853f41af208bc7e1c738196 /arch/arm/mm/abort-macro.S | |
parent | ARM: domains: remove DOMAIN_TABLE (diff) | |
download | linux-08446b129bbde34665c423d882f857a45b8c3aed.tar.xz linux-08446b129bbde34665c423d882f857a45b8c3aed.zip |
ARM: mm: improve do_ldrd_abort macro
Improve the do_ldrd_abort macro code - firstly, it inefficiently checks
for the LDRD encoding by doing a multi-stage test of various bits. This
can be simplified by generating a mask, bitmasking the instruction and
then comparing the result.
Secondly, we want to be able to test the result rather than branching
to do_DataAbort, so remove the branch at the end and rename the macro
to 'teq_ldrd' to reflect it's new usage. teq_ldrd macro returns 'eq'
if the instruction was a LDRD.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/abort-macro.S')
-rw-r--r-- | arch/arm/mm/abort-macro.S | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/arm/mm/abort-macro.S b/arch/arm/mm/abort-macro.S index 2cbf68ef0e83..50d6c0a900b1 100644 --- a/arch/arm/mm/abort-macro.S +++ b/arch/arm/mm/abort-macro.S @@ -29,12 +29,9 @@ not_thumb: * [7:4] == 1101 * [20] == 0 */ - .macro do_ldrd_abort, tmp, insn - tst \insn, #0x0e100000 @ [27:25,20] == 0 - bne not_ldrd - and \tmp, \insn, #0x000000f0 @ [7:4] == 1101 - cmp \tmp, #0x000000d0 - beq do_DataAbort -not_ldrd: + .macro teq_ldrd, tmp, insn + mov \tmp, #0x0e100000 + orr \tmp, #0x000000f0 + and \tmp, \insn, \tmp + teq \tmp, #0x000000d0 .endm - |