From: Cyrill Gorcunov Date: Tue, 13 Oct 2009 15:02:47 +0000 (+0400) Subject: nasm.h: introduce is_class macro helper X-Git-Tag: nasm-2.11.05~814 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1985416b0ba9e482404b3804977a745c791ab672;p=platform%2Fupstream%2Fnasm.git nasm.h: introduce is_class macro helper Signed-off-by: Cyrill Gorcunov --- diff --git a/nasm.h b/nasm.h index 00cbddc..2982101 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 */