mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-09-22 10:43:39 -04:00
Get rid of magic open-coded "register numbers"
Get rid of magic open-coded register numbers. We now keep track of a total of three different kinds of register numbers: the register enumeration (regs.h), the x86 register value, and the register flags. That has all the information we need. Additionally, do massive revamping of the EA generation code and the REX generation logic.
This commit is contained in:
9
disasm.c
9
disasm.c
@@ -35,15 +35,6 @@ extern struct itemplate **itable[];
|
||||
#define SEG_SIGNED 128
|
||||
#define SEG_64BIT 256
|
||||
|
||||
/*
|
||||
* REX flags
|
||||
*/
|
||||
#define REX_P 0x40 /* REX prefix present */
|
||||
#define REX_W 0x08 /* 64-bit operand size */
|
||||
#define REX_R 0x04 /* ModRM reg extension */
|
||||
#define REX_X 0x02 /* SIB index extension */
|
||||
#define REX_B 0x01 /* ModRM r/m extension */
|
||||
|
||||
#include "regdis.c"
|
||||
|
||||
#define getu8(x) (*(uint8_t *)(x))
|
||||
|
Reference in New Issue
Block a user