diff options
author | Jon Medhurst <tixy@yxit.co.uk> | 2011-04-12 02:45:25 -0400 |
---|---|---|
committer | Nicolas Pitre <nicolas.pitre@linaro.org> | 2011-04-28 23:40:58 -0400 |
commit | 038c3839c917e3eea1150a1dc55607b9bde2d5ac (patch) | |
tree | fa78e7983b7f54c9644ed11582f00e4e949a39a8 /arch/arm/kernel/kprobes-decode.c | |
parent | 8dd7cfbed83c74b1fb991fae264944e041e22e62 (diff) |
ARM: kprobes: Fix emulation of SMUAD, SMUSD and SMMUL instructions
The signed multiply instructions were being decoded incorrectly.
Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Diffstat (limited to 'arch/arm/kernel/kprobes-decode.c')
-rw-r--r-- | arch/arm/kernel/kprobes-decode.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/arch/arm/kernel/kprobes-decode.c b/arch/arm/kernel/kprobes-decode.c index 1e413a9c17ef..068e5c846571 100644 --- a/arch/arm/kernel/kprobes-decode.c +++ b/arch/arm/kernel/kprobes-decode.c | |||
@@ -1436,18 +1436,26 @@ space_cccc_0111__1(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
1436 | return prep_emulate_rdhi16rdlo12rs8rm0_wflags(insn, asi); | 1436 | return prep_emulate_rdhi16rdlo12rs8rm0_wflags(insn, asi); |
1437 | 1437 | ||
1438 | /* SMLAD : cccc 0111 0000 xxxx xxxx xxxx 00x1 xxxx :Q */ | 1438 | /* SMLAD : cccc 0111 0000 xxxx xxxx xxxx 00x1 xxxx :Q */ |
1439 | /* SMUAD : cccc 0111 0000 xxxx 1111 xxxx 00x1 xxxx :Q */ | ||
1439 | /* SMLSD : cccc 0111 0000 xxxx xxxx xxxx 01x1 xxxx :Q */ | 1440 | /* SMLSD : cccc 0111 0000 xxxx xxxx xxxx 01x1 xxxx :Q */ |
1441 | /* SMUSD : cccc 0111 0000 xxxx 1111 xxxx 01x1 xxxx : */ | ||
1440 | /* SMMLA : cccc 0111 0101 xxxx xxxx xxxx 00x1 xxxx : */ | 1442 | /* SMMLA : cccc 0111 0101 xxxx xxxx xxxx 00x1 xxxx : */ |
1441 | /* SMMLS : cccc 0111 0101 xxxx xxxx xxxx 11x1 xxxx : */ | 1443 | /* SMMUL : cccc 0111 0101 xxxx 1111 xxxx 00x1 xxxx : */ |
1442 | if ((insn & 0x0ff00090) == 0x07000010 || | 1444 | if ((insn & 0x0ff00090) == 0x07000010 || |
1443 | (insn & 0x0ff000d0) == 0x07500010 || | 1445 | (insn & 0x0ff000d0) == 0x07500010) { |
1444 | (insn & 0x0ff000d0) == 0x075000d0) | 1446 | |
1447 | if ((insn & 0x0000f000) == 0x0000f000) { | ||
1448 | return prep_emulate_rd16rs8rm0_wflags(insn, asi); | ||
1449 | } else { | ||
1450 | return prep_emulate_rd16rn12rs8rm0_wflags(insn, asi); | ||
1451 | } | ||
1452 | } | ||
1453 | |||
1454 | /* SMMLS : cccc 0111 0101 xxxx xxxx xxxx 11x1 xxxx : */ | ||
1455 | if ((insn & 0x0ff000d0) == 0x075000d0) | ||
1445 | return prep_emulate_rd16rn12rs8rm0_wflags(insn, asi); | 1456 | return prep_emulate_rd16rn12rs8rm0_wflags(insn, asi); |
1446 | 1457 | ||
1447 | /* SMUSD : cccc 0111 0000 xxxx xxxx xxxx 01x1 xxxx : */ | 1458 | return INSN_REJECTED; |
1448 | /* SMUAD : cccc 0111 0000 xxxx 1111 xxxx 00x1 xxxx :Q */ | ||
1449 | /* SMMUL : cccc 0111 0101 xxxx 1111 xxxx 00x1 xxxx : */ | ||
1450 | return prep_emulate_rd16rs8rm0_wflags(insn, asi); | ||
1451 | } | 1459 | } |
1452 | 1460 | ||
1453 | static enum kprobe_insn __kprobes | 1461 | static enum kprobe_insn __kprobes |