summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-07-25 00:17:12 -0700
committerH. Peter Anvin <hpa@zytor.com>2010-07-25 00:17:12 -0700
commitb453c866ab27b4f4df36be9f0098337fea3b0432 (patch)
tree7404c62100b2d7bad7114674682e45e1f26c2311
parenta38b86aecff04de02f56d84aabe8eef9baee5959 (diff)
downloadnasm-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.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/nasm.h b/nasm.h
index cbd9462f..d7cbf496 100644
--- a/nasm.h
+++ b/nasm.h
@@ -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;
}