summaryrefslogtreecommitdiff
path: root/assemble.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-08-28 17:47:16 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-08-28 17:47:16 -0700
commit962e30519cf128a7e2b78068ca8e697c6737b7a1 (patch)
tree61dcac8e2f6b4e1cc01fef2ef56a5889e0dba095 /assemble.c
parent7b4dc622c695213fa0ee5f8d0b74502412478375 (diff)
downloadnasm-962e30519cf128a7e2b78068ca8e697c6737b7a1.tar.gz
nasm-962e30519cf128a7e2b78068ca8e697c6737b7a1.tar.bz2
nasm-962e30519cf128a7e2b78068ca8e697c6737b7a1.zip
BR 2029829: Accept VIA XCRYPT instructions with or without REP
Accept the VIA XCRYPT instructions either with or without a REP prefix, as documented. Add the missing XCRYPTCTR instruction.
Diffstat (limited to 'assemble.c')
-rw-r--r--assemble.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/assemble.c b/assemble.c
index 9345fd8..70228ac 100644
--- a/assemble.c
+++ b/assemble.c
@@ -93,6 +93,9 @@
* \333 - REP prefix (0xF3 byte) used as opcode extension.
* \334 - LOCK prefix used instead of REX.R
* \335 - disassemble a rep (0xF3 byte) prefix as repe not rep.
+ * \336 - force a REP(E) prefix (0xF2) even if not specified.
+ * \337 - force a REPNE prefix (0xF3) even if not specified.
+ * \336-\337 are still listed as prefixes in the disassembler.
* \340 - reserve <operand 0> bytes of uninitialized storage.
* Operand 0 had better be a segmentless constant.
* \360 - no SSE prefix (== \364\331)
@@ -1039,6 +1042,14 @@ static int64_t calcsize(int32_t segment, int64_t offset, int bits,
break;
case 0335:
break;
+ case 0336:
+ if (!ins->prefixes[PPS_LREP])
+ ins->prefixes[PPS_LREP] = P_REP;
+ break;
+ case 0337:
+ if (!ins->prefixes[PPS_LREP])
+ ins->prefixes[PPS_LREP] = P_REPNE;
+ break;
case 0340:
if (ins->oprs[0].segment != NO_SEG)
errfunc(ERR_NONFATAL, "attempt to reserve non-constant"
@@ -1705,6 +1716,10 @@ static void gencode(int32_t segment, int64_t offset, int bits,
case 0335:
break;
+ case 0336:
+ case 0337:
+ break;
+
case 0340:
if (ins->oprs[0].segment != NO_SEG)
errfunc(ERR_PANIC, "non-constant BSS size in pass two");