diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-08-28 17:47:16 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-08-28 17:47:16 -0700 |
commit | 962e30519cf128a7e2b78068ca8e697c6737b7a1 (patch) | |
tree | 61dcac8e2f6b4e1cc01fef2ef56a5889e0dba095 | |
parent | 7b4dc622c695213fa0ee5f8d0b74502412478375 (diff) | |
download | nasm-962e30519cf128a7e2b78068ca8e697c6737b7a1.tar.gz |
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.
-rw-r--r-- | assemble.c | 15 | ||||
-rw-r--r-- | disasm.c | 4 | ||||
-rw-r--r-- | insns.dat | 17 |
3 files changed, 28 insertions, 8 deletions
@@ -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"); @@ -882,6 +882,10 @@ static int matches(const struct itemplate *t, uint8_t *data, drep = P_REPE; break; + case 0336: + case 0337: + break; + case 0340: return false; @@ -3333,14 +3333,15 @@ VFNMSUBSS xmmreg,xmmreg,xmmrm,xmmreg [rsmv: vex.nds.128.66.0f3a.w0 7e /r /is4] F VFNMSUBSS xmmreg,xmmreg,xmmreg,xmmrm [rsvm: vex.nds.128.66.0f3a.w1 7e /r /is4] FMA,SANDYBRIDGE,SD ;# VIA (Centaur) security instructions -XSTORE void \360\3\x0F\xA7\xC0 PENT,CYRIX -XCRYPTECB void \363\3\x0F\xA7\xC8 PENT,CYRIX -XCRYPTCBC void \363\3\x0F\xA7\xD0 PENT,CYRIX -XCRYPTCFB void \363\3\x0F\xA7\xE0 PENT,CYRIX -XCRYPTOFB void \363\3\x0F\xA7\xE8 PENT,CYRIX -MONTMUL void \363\3\x0F\xA6\xC0 PENT,CYRIX -XSHA1 void \363\3\x0F\xA6\xC8 PENT,CYRIX -XSHA256 void \363\3\x0F\xA6\xD0 PENT,CYRIX +XSTORE void \3\x0F\xA7\xC0 PENT,CYRIX +XCRYPTECB void \336\3\x0F\xA7\xC8 PENT,CYRIX +XCRYPTCBC void \336\3\x0F\xA7\xD0 PENT,CYRIX +XCRYPTCTR void \336\3\x0F\xA7\xD8 PENT,CYRIX +XCRYPTCFB void \336\3\x0F\xA7\xE0 PENT,CYRIX +XCRYPTOFB void \336\3\x0F\xA7\xE8 PENT,CYRIX +MONTMUL void \336\3\x0F\xA6\xC0 PENT,CYRIX +XSHA1 void \336\3\x0F\xA6\xC8 PENT,CYRIX +XSHA256 void \336\3\x0F\xA6\xD0 PENT,CYRIX ;# Systematic names for the hinting nop instructions ; These should be last in the file |