aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ia64
diff options
context:
space:
mode:
authorAnil S Keshavamurthy <anil.s.keshavamurthy@intel.com>2005-06-23 03:09:29 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-23 12:45:23 -0400
commitcd2675bf65455a45b54228b7acc0c6a26a164cb6 (patch)
tree102dd9bdf79ce8a5728dd098fb2b3a574c113186 /include/asm-ia64
parentb2761dc262b428475890fffd979687051beb12ba (diff)
[PATCH] Kprobes/IA64: support kprobe on branch/call instructions
This patch is required to support kprobe on branch/call instructions. Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-ia64')
-rw-r--r--include/asm-ia64/kprobes.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/asm-ia64/kprobes.h b/include/asm-ia64/kprobes.h
index fec3506e53f8..d30af77a0b11 100644
--- a/include/asm-ia64/kprobes.h
+++ b/include/asm-ia64/kprobes.h
@@ -44,6 +44,17 @@ typedef struct _bundle {
44 44
45#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry 45#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry
46 46
47#define SLOT0_OPCODE_SHIFT (37)
48#define SLOT1_p1_OPCODE_SHIFT (37 - (64-46))
49#define SLOT2_OPCODE_SHIFT (37)
50
51#define INDIRECT_CALL_OPCODE (1)
52#define IP_RELATIVE_CALL_OPCODE (5)
53#define IP_RELATIVE_BRANCH_OPCODE (4)
54#define IP_RELATIVE_PREDICT_OPCODE (7)
55#define LONG_BRANCH_OPCODE (0xC)
56#define LONG_CALL_OPCODE (0xD)
57
47typedef struct kprobe_opcode { 58typedef struct kprobe_opcode {
48 bundle_t bundle; 59 bundle_t bundle;
49} kprobe_opcode_t; 60} kprobe_opcode_t;
@@ -55,8 +66,12 @@ struct fnptr {
55 66
56/* Architecture specific copy of original instruction*/ 67/* Architecture specific copy of original instruction*/
57struct arch_specific_insn { 68struct arch_specific_insn {
58 /* copy of the original instruction */ 69 /* copy of the instruction to be emulated */
59 kprobe_opcode_t insn; 70 kprobe_opcode_t insn;
71 #define INST_FLAG_FIX_RELATIVE_IP_ADDR 1
72 #define INST_FLAG_FIX_BRANCH_REG 2
73 unsigned long inst_flag;
74 unsigned short target_br_reg;
60}; 75};
61 76
62/* ia64 does not need this */ 77/* ia64 does not need this */