nasm.h: introduce is_class macro helper

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2009-10-13 19:02:47 +04:00
parent 1f75420d61
commit 1985416b0b

2
nasm.h
View File

@ -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 */