aboutsummaryrefslogtreecommitdiff
path: root/include/opcode
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>1999-08-19 05:45:30 +0000
committerDoug Evans <dje@google.com>1999-08-19 05:45:30 +0000
commite8da1bf1bdc46de31ac99966e8f9085792985165 (patch)
tree47bae75eb548d70764d73427f86ebbf96e769e0f /include/opcode
parentb2d638c7ec140644c3df7d8abf9ca886b1f20ae0 (diff)
downloadgdb-e8da1bf1bdc46de31ac99966e8f9085792985165.zip
gdb-e8da1bf1bdc46de31ac99966e8f9085792985165.tar.gz
gdb-e8da1bf1bdc46de31ac99966e8f9085792985165.tar.bz2
* cgen.h (CGEN_INSN_MACH_HAS_P): New macro.
Diffstat (limited to 'include/opcode')
-rw-r--r--include/opcode/ChangeLog4
-rw-r--r--include/opcode/cgen.h6
2 files changed, 10 insertions, 0 deletions
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index cfb23891..41c3eea 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,3 +1,7 @@
+Wed Aug 18 18:14:40 1999 Doug Evans <devans@canuck.cygnus.com>
+
+ * cgen.h (CGEN_INSN_MACH_HAS_P): New macro.
+
Fri Aug 6 09:46:35 1999 Jerry Quinn <jquinn@nortelnetworks.com>
* hppa.h (pa_opcodes): Add 64 bit versions of or, xor, and,
diff --git a/include/opcode/cgen.h b/include/opcode/cgen.h
index 84542a3..2a5fd0d 100644
--- a/include/opcode/cgen.h
+++ b/include/opcode/cgen.h
@@ -1037,6 +1037,12 @@ extern int cgen_macro_insn_count PARAMS ((CGEN_CPU_DESC));
/* Return value of base part of INSN. */
#define CGEN_INSN_BASE_VALUE(insn) \
CGEN_OPCODE_BASE_VALUE (CGEN_INSN_OPCODE (insn))
+
+/* Standard way to test whether INSN is supported by MACH.
+ MACH is one of enum mach_attr.
+ The "|1" is because the base mach is always selected. */
+#define CGEN_INSN_MACH_HAS_P(insn, mach) \
+((CGEN_INSN_ATTR_VALUE ((insn), CGEN_INSN_MACH) & ((1 << (mach)) | 1)) != 0)
/* Macro instructions.
Macro insns aren't real insns, they map to one or more real insns.