summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2009-10-13 19:02:47 +0400
committerCyrill Gorcunov <gorcunov@gmail.com>2009-10-13 19:41:45 +0400
commit1985416b0ba9e482404b3804977a745c791ab672 (patch)
tree7bf50b83f047ebe717250330ca0b67acea70c75d
parent1f75420d6145ecfac615814715ae5830b9753430 (diff)
downloadnasm-1985416b0ba9e482404b3804977a745c791ab672.tar.gz
nasm.h: introduce is_class macro helper
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--nasm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/nasm.h b/nasm.h
index 00cbddcb..2982101a 100644
--- a/nasm.h
+++ b/nasm.h
@@ -539,6 +539,8 @@ typedef uint32_t opflags_t;
#define MEMORY 0x0000c000U
#define REGMEM 0x00008000U /* for r/m, ie EA, operands */
+#define is_class(class, op) (!((opflags_t)(class) & ~(opflags_t)(op)))
+
/* Register classes */
#define REG_EA 0x00009000U /* 'normal' reg, qualifies as EA */
#define RM_GPR 0x00208000U /* integer operand */