aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJon Medhurst <tixy@yxit.co.uk>2011-04-12 02:45:26 -0400
committerNicolas Pitre <nicolas.pitre@linaro.org>2011-04-28 23:40:58 -0400
commitc6e4ae32911c2a0ad02d47ee59ccba352a74c38e (patch)
tree848b1626961fc717fd4b9d5836741cbbdb515421 /arch
parent038c3839c917e3eea1150a1dc55607b9bde2d5ac (diff)
ARM: kprobes: Fix emulation of USAD8 instructions
The USAD8 instruction wasn't being explicitly decoded leading to the incorrect emulation routine being called. It can be correctly decoded in the same way as the signed multiply instructions so we move the decoding there. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/kprobes-decode.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/arm/kernel/kprobes-decode.c b/arch/arm/kernel/kprobes-decode.c
index 068e5c846571..8391dac41855 100644
--- a/arch/arm/kernel/kprobes-decode.c
+++ b/arch/arm/kernel/kprobes-decode.c
@@ -1425,11 +1425,6 @@ space_cccc_0111__1(kprobe_opcode_t insn, struct arch_specific_insn *asi)
1425 if ((insn & 0x0ff000f0) == 0x03f000f0) 1425 if ((insn & 0x0ff000f0) == 0x03f000f0)
1426 return INSN_REJECTED; 1426 return INSN_REJECTED;
1427 1427
1428 /* USADA8 : cccc 0111 1000 xxxx xxxx xxxx 0001 xxxx */
1429 /* USAD8 : cccc 0111 1000 xxxx 1111 xxxx 0001 xxxx */
1430 if ((insn & 0x0ff000f0) == 0x07800010)
1431 return prep_emulate_rd16rn12rs8rm0_wflags(insn, asi);
1432
1433 /* SMLALD : cccc 0111 0100 xxxx xxxx xxxx 00x1 xxxx */ 1428 /* SMLALD : cccc 0111 0100 xxxx xxxx xxxx 00x1 xxxx */
1434 /* SMLSLD : cccc 0111 0100 xxxx xxxx xxxx 01x1 xxxx */ 1429 /* SMLSLD : cccc 0111 0100 xxxx xxxx xxxx 01x1 xxxx */
1435 if ((insn & 0x0ff00090) == 0x07400010) 1430 if ((insn & 0x0ff00090) == 0x07400010)
@@ -1441,8 +1436,11 @@ space_cccc_0111__1(kprobe_opcode_t insn, struct arch_specific_insn *asi)
1441 /* SMUSD : cccc 0111 0000 xxxx 1111 xxxx 01x1 xxxx : */ 1436 /* SMUSD : cccc 0111 0000 xxxx 1111 xxxx 01x1 xxxx : */
1442 /* SMMLA : cccc 0111 0101 xxxx xxxx xxxx 00x1 xxxx : */ 1437 /* SMMLA : cccc 0111 0101 xxxx xxxx xxxx 00x1 xxxx : */
1443 /* SMMUL : cccc 0111 0101 xxxx 1111 xxxx 00x1 xxxx : */ 1438 /* SMMUL : cccc 0111 0101 xxxx 1111 xxxx 00x1 xxxx : */
1439 /* USADA8 : cccc 0111 1000 xxxx xxxx xxxx 0001 xxxx : */
1440 /* USAD8 : cccc 0111 1000 xxxx 1111 xxxx 0001 xxxx : */
1444 if ((insn & 0x0ff00090) == 0x07000010 || 1441 if ((insn & 0x0ff00090) == 0x07000010 ||
1445 (insn & 0x0ff000d0) == 0x07500010) { 1442 (insn & 0x0ff000d0) == 0x07500010 ||
1443 (insn & 0x0ff000f0) == 0x07800010) {
1446 1444
1447 if ((insn & 0x0000f000) == 0x0000f000) { 1445 if ((insn & 0x0000f000) == 0x0000f000) {
1448 return prep_emulate_rd16rs8rm0_wflags(insn, asi); 1446 return prep_emulate_rd16rs8rm0_wflags(insn, asi);