ARM: kprobes: Add common decoding function for LDM and STM
authorJon Medhurst <tixy@yxit.co.uk>
Thu, 7 Jul 2011 07:57:22 +0000 (08:57 +0100)
committerTixy <tixy@medhuaa1.miniserver.com>
Wed, 13 Jul 2011 17:32:45 +0000 (17:32 +0000)
commit235a4ce79feb8d5351f9164981bc57d5e29f974b
treec3dd0e698781faf592b2b01880103cf0d57d8a92
parent263e368a2f1f960db07d7524a4a3e7df951f1f72
ARM: kprobes: Add common decoding function for LDM and STM

The encoding of these instructions is substantially the same for both
ARM and Thumb, so we can have common decoding and simulation functions.

This patch moves the simulation functions from kprobes-arm.c to
kprobes-common.c. It also adds a new simulation function
(simulate_ldm1_pc) for the case where we load into PC because this may
need to interwork.

The instruction decoding is done by a custom function
(kprobe_decode_ldmstm) rather than just relying on decoding table
entries because we will later be adding optimisation code.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
arch/arm/kernel/kprobes-arm.c
arch/arm/kernel/kprobes-common.c
arch/arm/kernel/kprobes.h