mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-21 03:14:19 +08:00
Add tokens vex.ww and vex.wx; vex.wx is the default
Add vex.ww (for VEX.W follows REX.W) and vex.wx (for VEX.W is a don't care); vex.wx is the default since that seems to match existing usage better.
This commit is contained in:
parent
7c71949931
commit
bd420c7095
11
assemble.c
11
assemble.c
@ -64,9 +64,11 @@
|
||||
* VEX prefixes are followed by the sequence:
|
||||
* \mm\wlp where mm is the M field; and wlp is:
|
||||
* 00 0ww lpp
|
||||
* ww = 0 for W = 0
|
||||
* ww = 1 for W = 1
|
||||
* ww = 2 for W used as REX.W
|
||||
* [w0] ww = 0 for W = 0
|
||||
* [w1] ww = 1 for W = 1
|
||||
* [wx] ww = 2 for W don't care (always assembled as 0)
|
||||
* [ww] ww = 3 for W used as REX.W
|
||||
*
|
||||
*
|
||||
* \310 - indicates fixed 16-bit address size, i.e. optional 0x67.
|
||||
* \311 - indicates fixed 32-bit address size, i.e. optional 0x67.
|
||||
@ -1159,13 +1161,14 @@ static int64_t calcsize(int32_t segment, int64_t offset, int bits,
|
||||
}
|
||||
switch (ins->vex_wlp & 030) {
|
||||
case 000:
|
||||
case 020:
|
||||
ins->rex &= ~REX_W;
|
||||
break;
|
||||
case 010:
|
||||
ins->rex |= REX_W;
|
||||
bad32 &= ~REX_W;
|
||||
break;
|
||||
default:
|
||||
case 030:
|
||||
/* Follow REX_W */
|
||||
break;
|
||||
}
|
||||
|
8
disasm.c
8
disasm.c
@ -709,9 +709,13 @@ static int matches(const struct itemplate *t, uint8_t *data,
|
||||
case 010:
|
||||
if (!(prefix->rex & REX_W))
|
||||
return false;
|
||||
ins->rex &= ~REX_W;
|
||||
break;
|
||||
case 020: /* VEX.W is a don't care */
|
||||
ins->rex &= ~REX_W;
|
||||
break;
|
||||
case 030:
|
||||
break;
|
||||
default:
|
||||
break; /* XXX: Need to do anything special here? */
|
||||
}
|
||||
|
||||
if ((vexwlp & 007) != prefix->vex_lp)
|
||||
|
Loading…
Reference in New Issue
Block a user