Commit 7be7ee2d authored by Jon Medhurst's avatar Jon Medhurst Committed by Tixy

ARM: kprobes: Add BLX macro

This is for use by inline assembler which will be added to kprobes-arm.c
It saves memory when used on newer ARM architectures and also provides
correct interworking should ARM probes be required on Thumb kernels in
the future.
Signed-off-by: default avatarJon Medhurst <tixy@yxit.co.uk>
Acked-by: default avatarNicolas Pitre <nicolas.pitre@linaro.org>
parent df4fa1f8
...@@ -67,6 +67,13 @@ ...@@ -67,6 +67,13 @@
#define branch_displacement(insn) sign_extend(((insn) & 0xffffff) << 2, 25) #define branch_displacement(insn) sign_extend(((insn) & 0xffffff) << 2, 25)
#if __LINUX_ARM_ARCH__ >= 6
#define BLX(reg) "blx "reg" \n\t"
#else
#define BLX(reg) "mov lr, pc \n\t" \
"mov pc, "reg" \n\t"
#endif
#define is_r15(insn, bitpos) (((insn) & (0xf << bitpos)) == (0xf << bitpos)) #define is_r15(insn, bitpos) (((insn) & (0xf << bitpos)) == (0xf << bitpos))
#define PSR_fs (PSR_f|PSR_s) #define PSR_fs (PSR_f|PSR_s)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment