Add vex.ww (for VEX.W follows REX.W) and vex.wx (for VEX.W is a don't
care); vex.wx is the default since that seems to match existing usage
better.
* VEX prefixes are followed by the sequence:
* \mm\wlp where mm is the M field; and wlp is:
* 00 0ww lpp
- * ww = 0 for W = 0
- * ww = 1 for W = 1
- * ww = 2 for W used as REX.W
+ * [w0] ww = 0 for W = 0
+ * [w1] ww = 1 for W = 1
+ * [wx] ww = 2 for W don't care (always assembled as 0)
+ * [ww] ww = 3 for W used as REX.W
+ *
*
* \310 - indicates fixed 16-bit address size, i.e. optional 0x67.
* \311 - indicates fixed 32-bit address size, i.e. optional 0x67.
}
switch (ins->vex_wlp & 030) {
case 000:
+ case 020:
ins->rex &= ~REX_W;
break;
case 010:
ins->rex |= REX_W;
bad32 &= ~REX_W;
break;
- default:
+ case 030:
/* Follow REX_W */
break;
}
case 010:
if (!(prefix->rex & REX_W))
return false;
+ ins->rex &= ~REX_W;
+ break;
+ case 020: /* VEX.W is a don't care */
+ ins->rex &= ~REX_W;
+ break;
+ case 030:
break;
- default:
- break; /* XXX: Need to do anything special here? */
}
if ((vexwlp & 007) != prefix->vex_lp)
$w = 0;
} elsif ($oq eq 'w1') {
$w = 1;
+ } elsif ($oq eq 'wx') {
+ $w = 2;
+ } elsif ($oq eq 'ww') {
+ $w = 3;
} elsif ($oq eq '66') {
$p = 1;
} elsif ($oq eq 'f3') {