mirror of
https://github.com/netwide-assembler/nasm
synced 2026-08-26 16:23:04 -04:00
scanner: generalize the handling of {dfv=}
Change the handling of {dfv=} to a more general "braced constant"
expression, to be tagged with an instruction flag to make sure they
match the instruction in question.
This really ought to be an operand flag, but the opflags are precious;
as the CCMP/CTEST instructions can also take an immediate it probably
is necessary to invent a "special immediate" operand type that can
fold these together.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
4f0d89dbe6
commit
6389ac8e47
3 changed files with 9 additions and 4 deletions
|
|
@ -170,10 +170,10 @@ rz-sae
|
|||
sae
|
||||
z
|
||||
|
||||
% TOKEN_DFV, 0, TFLAG_BRC, 0
|
||||
% TOKEN_BRCCONST, IF_DFV, TFLAG_BRC, 0
|
||||
dfv=
|
||||
|
||||
% TOKEN_DFV, 0, TFLAG_BRC | TFLAG_ORBIT, DFV_{dfv=*}
|
||||
% TOKEN_BRCCONST, IF_DFV, TFLAG_BRC | TFLAG_ORBIT, DFV_{dfv=*}
|
||||
dfv=cf
|
||||
dfv=zf
|
||||
dfv=sf
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ enum token_type { /* token types, other than chars */
|
|||
TOKEN_SIZE, /* BYTE, WORD, DWORD, QWORD, etc */
|
||||
TOKEN_SPECIAL, /* REL, FAR, NEAR, STRICT, NOSPLIT, etc */
|
||||
TOKEN_PREFIX, /* A32, O16, LOCK, REPNZ, TIMES, etc */
|
||||
TOKEN_DFV, /* {dfv=} */
|
||||
TOKEN_BRCCONST, /* braced constant expression */
|
||||
TOKEN_REG, /* register name */
|
||||
TOKEN_INSN, /* instruction name */
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,12 @@ if_("AR2", "SB, SW, SD applies to argument 2");
|
|||
if_("AR3", "SB, SW, SD applies to argument 3");
|
||||
if_("AR4", "SB, SW, SD applies to argument 4");
|
||||
if_("OPT", "Optimizing assembly only");
|
||||
if_("LATEVEX", "Only if EVEX instructions are disabled");
|
||||
if_("LATEVEX", "Only if EVEX instructions are disabled");
|
||||
|
||||
#
|
||||
# special immediates like {dfv=}
|
||||
#
|
||||
if_("DFV", "Destination flag values");
|
||||
|
||||
#
|
||||
# dword bound - instruction feature filtering flags
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue