Rename REGNORM to REG_EA

Rename REGNORM to REG_EA to make the distinction between REG_GPR and
REG_EA clearer.
This commit is contained in:
H. Peter Anvin 2007-05-30 00:18:26 +00:00
parent 1ffbd70af0
commit dbf130e681
2 changed files with 3 additions and 2 deletions

View File

@ -647,6 +647,7 @@ int32_t disasm(uint8_t *data, char *output, int outbufsize, int segsize,
works = TRUE;
/*
* Final check to make sure the types of r/m match up.
* XXX: Need to make sure this is actually correct.
*/
for (i = 0; i < (*p)->operands; i++) {
if (
@ -655,7 +656,7 @@ int32_t disasm(uint8_t *data, char *output, int outbufsize, int segsize,
!(MEMORY & ~(*p)->opd[i])) ||
/* If it's a reg-only EA but we have a memory ref, die. */
(!(tmp_ins.oprs[i].segment & SEG_RMREG) &&
!(REGNORM & ~(*p)->opd[i]) &&
!(REG_EA & ~(*p)->opd[i]) &&
!((*p)->opd[i] & REG_SMASK)) ||
/* Register type mismatch (eg FS vs REG_DESS): die. */
((((*p)->opd[i] & (REGISTER | FPUREG)) ||

2
nasm.h
View File

@ -467,7 +467,7 @@ enum {
#define REGMEM 0x00008000L /* for r/m, ie EA, operands */
/* Register classes */
#define REGNORM 0x00009000L /* 'normal' reg, qualifies as EA */
#define REG_EA 0x00009000L /* 'normal' reg, qualifies as EA */
#define REG_GPR 0x00209000L /* integer register */
#define REG8 0x00209001L /* 8-bit GPR */
#define REG16 0x00209002L /* 16-bit GPR */