mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-10-10 00:25:06 -04:00
Rename REX_REAL to REX_MASK
"Real" doesn't reflect the meaning of this macro -- it rather represents a rex prefix mask. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
@@ -1323,7 +1323,7 @@ static int64_t calcsize(int32_t segment, int64_t offset, int bits,
|
|||||||
length += 3;
|
length += 3;
|
||||||
else
|
else
|
||||||
length += 2;
|
length += 2;
|
||||||
} else if (ins->rex & REX_REAL) {
|
} else if (ins->rex & REX_MASK) {
|
||||||
if (ins->rex & REX_H) {
|
if (ins->rex & REX_H) {
|
||||||
errfunc(ERR_NONFATAL, "cannot use high register in rex instruction");
|
errfunc(ERR_NONFATAL, "cannot use high register in rex instruction");
|
||||||
return -1;
|
return -1;
|
||||||
@@ -1365,8 +1365,8 @@ static int64_t calcsize(int32_t segment, int64_t offset, int bits,
|
|||||||
static inline unsigned int emit_rex(insn *ins, int32_t segment, int64_t offset, int bits)
|
static inline unsigned int emit_rex(insn *ins, int32_t segment, int64_t offset, int bits)
|
||||||
{
|
{
|
||||||
if (bits == 64) {
|
if (bits == 64) {
|
||||||
if ((ins->rex & REX_REAL) && !(ins->rex & (REX_V | REX_EV))) {
|
if ((ins->rex & REX_MASK) && !(ins->rex & (REX_V | REX_EV))) {
|
||||||
int rex = (ins->rex & REX_REAL) | REX_P;
|
int rex = (ins->rex & REX_MASK) | REX_P;
|
||||||
out(offset, segment, &rex, OUT_RAWDATA, 1, NO_SEG, NO_SEG);
|
out(offset, segment, &rex, OUT_RAWDATA, 1, NO_SEG, NO_SEG);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
2
nasm.h
2
nasm.h
@@ -500,7 +500,7 @@ static inline uint8_t get_cond_opcode(enum ccode c)
|
|||||||
/*
|
/*
|
||||||
* REX flags
|
* REX flags
|
||||||
*/
|
*/
|
||||||
#define REX_REAL 0x4f /* Actual REX prefix bits */
|
#define REX_MASK 0x4f /* Actual REX prefix bits */
|
||||||
#define REX_B 0x01 /* ModRM r/m extension */
|
#define REX_B 0x01 /* ModRM r/m extension */
|
||||||
#define REX_X 0x02 /* SIB index extension */
|
#define REX_X 0x02 /* SIB index extension */
|
||||||
#define REX_R 0x04 /* ModRM reg extension */
|
#define REX_R 0x04 /* ModRM reg extension */
|
||||||
|
|||||||
Reference in New Issue
Block a user