summaryrefslogtreecommitdiff
path: root/parser.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2013-10-02 18:25:19 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2013-10-02 18:28:49 -0700
commit9d5461069d80d0201efb1e98d31a29fdc0fcfbce (patch)
tree011fbf0a026325d6657c72cb06c9d4993dc01c18 /parser.c
parenta9ecfa5ae8ef8c770955c6aaf23a49f92ef576b5 (diff)
downloadnasm-9d5461069d80d0201efb1e98d31a29fdc0fcfbce.tar.gz
nasm-9d5461069d80d0201efb1e98d31a29fdc0fcfbce.tar.bz2
nasm-9d5461069d80d0201efb1e98d31a29fdc0fcfbce.zip
Add support for DZ and RESZ, document the ZWORD keyword
Add the DZ and RESZ pseudoinstructions and add ZWORD to the documentation. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/parser.c b/parser.c
index 1b08657..37a5e1c 100644
--- a/parser.c
+++ b/parser.c
@@ -406,7 +406,8 @@ restart_parse:
if (result->opcode == I_DB || result->opcode == I_DW ||
result->opcode == I_DD || result->opcode == I_DQ ||
result->opcode == I_DT || result->opcode == I_DO ||
- result->opcode == I_DY || result->opcode == I_INCBIN) {
+ result->opcode == I_DY || result->opcode == I_DZ ||
+ result->opcode == I_INCBIN) {
extop *eop, **tail = &result->eops, **fixptr;
int oper_num = 0;
int32_t sign;
@@ -414,7 +415,7 @@ restart_parse:
result->eops_float = false;
/*
- * Begin to read the DB/DW/DD/DQ/DT/DO/INCBIN operands.
+ * Begin to read the DB/DW/DD/DQ/DT/DO/DY/DZ/INCBIN operands.
*/
while (1) {
i = stdscan(NULL, &tokval);
@@ -495,7 +496,7 @@ is_float:
eop->stringlen = idata_bytes(result->opcode);
if (eop->stringlen > 16) {
nasm_error(ERR_NONFATAL, "floating-point constant"
- " encountered in DY instruction");
+ " encountered in DY or DZ instruction");
eop->stringlen = 0;
} else if (eop->stringlen < 1) {
nasm_error(ERR_NONFATAL, "floating-point constant"
@@ -1049,7 +1050,7 @@ is_expression:
result->oprs[operand++].type = 0;
/*
- * Transform RESW, RESD, RESQ, REST, RESO, RESY into RESB.
+ * Transform RESW, RESD, RESQ, REST, RESO, RESY, RESZ into RESB.
*/
switch (result->opcode) {
case I_RESW:
@@ -1076,6 +1077,10 @@ is_expression:
result->opcode = I_RESB;
result->oprs[0].offset *= 32;
break;
+ case I_RESZ:
+ result->opcode = I_RESB;
+ result->oprs[0].offset *= 64;
+ break;
default:
break;
}