diff options
author | H. Peter Anvin <hpa@zytor.com> | 2010-07-25 00:17:12 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-07-25 00:17:12 -0700 |
commit | b453c866ab27b4f4df36be9f0098337fea3b0432 (patch) | |
tree | 7404c62100b2d7bad7114674682e45e1f26c2311 | |
parent | a38b86aecff04de02f56d84aabe8eef9baee5959 (diff) | |
download | nasm-b453c866ab27b4f4df36be9f0098337fea3b0432.tar.gz |
nasm.h: move "regs.h" to top; make is_register() a bool
Move the #include of regs.h to the top with the other includes, and
make is_register() -- being a boolean predicate -- return bool.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | nasm.h | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -47,6 +47,7 @@ #include "insnsi.h" /* For enum opcode */ #include "directiv.h" /* For enum directive */ #include "opflags.h" +#include "regs.h" #define NO_SEG -1L /* null segment value */ #define SEG_ABS 0x40000000L /* mask for far-absolute segments */ @@ -418,11 +419,8 @@ enum { * ----------------------------------------------------------- */ -/* Register names automatically generated from regs.dat */ -#include "regs.h" - -/* verify value to be register */ -static inline int is_register(int reg) +/* Verify value to be a valid register */ +static inline bool is_register(int reg) { return reg >= EXPR_REG_START && reg < REG_ENUM_LIMIT; } |