Make F2 and F3 SSE prefixes override 66

According to XED and experimentation, the 66 is ignored.

Signed-off-by: Ben Rudiak-Gould <benrudiak@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Ben Rudiak-Gould 2013-03-10 21:46:12 +04:00 committed by Cyrill Gorcunov
parent 6e87893f06
commit 94ba02fa16
3 changed files with 3 additions and 24 deletions

View file

@ -126,8 +126,6 @@
* \341 - this instruction needs a WAIT "prefix"
* \360 - no SSE prefix (== \364\331)
* \361 - 66 SSE prefix (== \366\331)
* \362 - F2 SSE prefix (== \364\332)
* \363 - F3 SSE prefix (== \364\333)
* \364 - operand-size prefix (0x66) not permitted
* \365 - address-size prefix (0x67) not permitted
* \366 - operand-size prefix (0x66) used as opcode extension
@ -1049,7 +1047,7 @@ static int64_t calcsize(int32_t segment, int64_t offset, int bits,
case 0360:
break;
case3(0361):
case 0361:
length++;
break;
@ -1603,13 +1601,6 @@ static void gencode(int32_t segment, int64_t offset, int bits,
offset += 1;
break;
case 0362:
case 0363:
bytes[0] = c - 0362 + 0xf2;
out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG);
offset += 1;
break;
case 0364:
case 0365:
break;

View file

@ -834,18 +834,6 @@ static int matches(const struct itemplate *t, uint8_t *data,
o_used = true;
break;
case 0362:
if (prefix->osp || prefix->rep != 0xf2)
return false;
drep = 0;
break;
case 0363:
if (prefix->osp || prefix->rep != 0xf3)
return false;
drep = 0;
break;
case 0364:
if (prefix->osp)
return false;

View file

@ -746,9 +746,9 @@ sub byte_code_compile($$) {
if ($op eq '66') {
push(@codes, 0361);
} elsif ($op eq 'f2') {
push(@codes, 0362);
push(@codes, 0332);
} elsif ($op eq 'f3') {
push(@codes, 0363);
push(@codes, 0333);
} else {
push(@codes, 0360);
}