aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Martin <dave.martin@linaro.org>2011-08-19 12:59:27 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-10-17 04:12:40 -0400
commit85519189df91c8aa9c368de0bdcfd7812200e614 (patch)
tree2f57a4688097542e977497549420e081053f77e6
parent2ecccf90f2a6d821af4d33f086d59895e5d3bedc (diff)
ARM: 7030/1: entry: Remove unnecessary masking when decoding Thumb-2 instructions
When testing whether a Thumb-2 instruction is 32 bits long or not, the masking done in order to test bits 11-15 of the first instruction halfword won't affect the result of the comparison, so remove it. Signed-off-by: Dave Martin <dave.martin@linaro.org> Reviewed-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/kernel/entry-armv.S6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index a87cbf889ff..b7236d400ae 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -262,8 +262,7 @@ __und_svc:
262 ldr r0, [r4, #-4] 262 ldr r0, [r4, #-4]
263#else 263#else
264 ldrh r0, [r4, #-2] @ Thumb instruction at LR - 2 264 ldrh r0, [r4, #-2] @ Thumb instruction at LR - 2
265 and r9, r0, #0xf800 265 cmp r0, #0xe800 @ 32-bit instruction if xx >= 0
266 cmp r9, #0xe800 @ 32-bit instruction if xx >= 0
267 ldrhhs r9, [r4] @ bottom 16 bits 266 ldrhhs r9, [r4] @ bottom 16 bits
268 orrhs r0, r9, r0, lsl #16 267 orrhs r0, r9, r0, lsl #16
269#endif 268#endif
@@ -445,8 +444,7 @@ __und_usr:
445 ARM( ldrht r5, [r4], #2 ) 444 ARM( ldrht r5, [r4], #2 )
446 THUMB( ldrht r5, [r4] ) 445 THUMB( ldrht r5, [r4] )
447 THUMB( add r4, r4, #2 ) 446 THUMB( add r4, r4, #2 )
448 and r0, r5, #0xf800 @ mask bits 111x x... .... .... 447 cmp r5, #0xe800 @ 32bit instruction if xx != 0
449 cmp r0, #0xe800 @ 32bit instruction if xx != 0
450 blo __und_usr_unknown 448 blo __und_usr_unknown
4513: ldrht r0, [r4] 4493: ldrht r0, [r4]
452 add r2, r2, #2 @ r2 is PC + 2, make it PC + 4 450 add r2, r2, #2 @ r2 is PC + 2, make it PC + 4