mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-27 08:10:07 +08:00
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>
This commit is contained in:
parent
a38b86aecf
commit
b453c866ab
8
nasm.h
8
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user