mirror of
https://github.com/netwide-assembler/nasm
synced 2026-08-26 16:23:04 -04:00
eval: recognize TOKEN_BRCCONST as integers
If TOKEN_BRCCONST are used in an expression (including simply wrapping
them in parentheses), then just treat them as integers. This makes
things like ({dfv=cf}|{dfv=of}) work.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
6389ac8e47
commit
bdfa9f952d
1 changed files with 3 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/* ----------------------------------------------------------------------- *
|
||||
*
|
||||
* Copyright 1996-2018 The NASM Authors - All Rights Reserved
|
||||
* Copyright 1996-2024 The NASM Authors - All Rights Reserved
|
||||
* See the file AUTHORS included with the NASM distribution for
|
||||
* the specific copyright holders.
|
||||
*
|
||||
|
|
@ -918,6 +918,7 @@ static expr *expr6(void)
|
|||
return e;
|
||||
|
||||
case TOKEN_NUM:
|
||||
case TOKEN_BRCCONST:
|
||||
case TOKEN_STR:
|
||||
case TOKEN_REG:
|
||||
case TOKEN_ID:
|
||||
|
|
@ -928,6 +929,7 @@ static expr *expr6(void)
|
|||
begintemp();
|
||||
switch (tt) {
|
||||
case TOKEN_NUM:
|
||||
case TOKEN_BRCCONST:
|
||||
addtotemp(EXPR_SIMPLE, tokval->t_integer);
|
||||
break;
|
||||
case TOKEN_STR:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue