diff options
author | Doug Evans <dje@google.com> | 1999-08-19 05:45:30 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 1999-08-19 05:45:30 +0000 |
commit | cd93a2af413eaf1d4dda28ddefcd284825865c6d (patch) | |
tree | 951189f8cdb611fa349e915f7fb12b876dfd4561 /include/opcode/cgen.h | |
parent | 37ffd3c5b7c75b67b58c6abb0af3299bfc16b10a (diff) | |
download | gdb-cd93a2af413eaf1d4dda28ddefcd284825865c6d.tar.gz |
* cgen.h (CGEN_INSN_MACH_HAS_P): New macro.
Diffstat (limited to 'include/opcode/cgen.h')
-rw-r--r-- | include/opcode/cgen.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/opcode/cgen.h b/include/opcode/cgen.h index 84542a37ce1..2a5fd0da833 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. |