ARM: Thumb-2: Support Thumb-2 in undefined instruction handler
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / include / asm / ptrace.h
index 312d10877bd74d4df144bbdbbd99e083ea784828..d484871698da38160828ee96845061d07043950a 100644 (file)
@@ -199,6 +199,14 @@ extern unsigned long profile_pc(struct pt_regs *regs);
 #define predicate(x)           ((x) & 0xf0000000)
 #define PREDICATE_ALWAYS       0xe0000000
 
+/*
+ * True if instr is a 32-bit thumb instruction. This works if instr
+ * is the first or only half-word of a thumb instruction. It also works
+ * when instr holds all 32-bits of a wide thumb instruction if stored
+ * in the form (first_half<<16)|(second_half)
+ */
+#define is_wide_instruction(instr)     ((unsigned)(instr) >= 0xe800)
+
 /*
  * kprobe-based event tracer support
  */