diff options
author | Jon Medhurst <tixy@yxit.co.uk> | 2011-04-06 06:17:12 -0400 |
---|---|---|
committer | Nicolas Pitre <nicolas.pitre@linaro.org> | 2011-04-28 23:40:55 -0400 |
commit | 896a74e19d0131413a96502429994bc8e6bbbe5a (patch) | |
tree | 26f549c6a0ce154d9d1c5baff8527241d9a71b45 /arch/arm/kernel | |
parent | ad111ce46674a473370d302325db8f418ac4fe92 (diff) |
ARM: kprobes: Fix emulation of Data-processing (immediate) instructions
Emulation of instructions like "ADD rd, rn, #<const>" would result in a
corrupted value for rd.
Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/kprobes-decode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/kernel/kprobes-decode.c b/arch/arm/kernel/kprobes-decode.c index ee29d3350437..baf053ea96eb 100644 --- a/arch/arm/kernel/kprobes-decode.c +++ b/arch/arm/kernel/kprobes-decode.c | |||
@@ -1207,7 +1207,7 @@ space_cccc_001x(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
1207 | * *S (bit 20) updates condition codes | 1207 | * *S (bit 20) updates condition codes |
1208 | * ADC/SBC/RSC reads the C flag | 1208 | * ADC/SBC/RSC reads the C flag |
1209 | */ | 1209 | */ |
1210 | insn &= 0xffff0fff; /* Rd = r0 */ | 1210 | insn &= 0xfff00fff; /* Rn = r0 and Rd = r0 */ |
1211 | asi->insn[0] = insn; | 1211 | asi->insn[0] = insn; |
1212 | 1212 | ||
1213 | if ((insn & 0x0f900000) == 0x03100000) { | 1213 | if ((insn & 0x0f900000) == 0x03100000) { |