Make F2 and F3 SSE prefixes override 66
authorBen Rudiak-Gould <benrudiak@gmail.com>
Sun, 10 Mar 2013 17:46:12 +0000 (21:46 +0400)
committerCyrill Gorcunov <gorcunov@gmail.com>
Sun, 10 Mar 2013 17:46:12 +0000 (21:46 +0400)
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>
assemble.c
disasm.c
insns.pl

index be3caaf..235be13 100644 (file)
  * \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;
index 89e16ab..97bf27e 100644 (file)
--- a/disasm.c
+++ b/disasm.c
@@ -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;
index c9ccf24..a63ee71 100755 (executable)
--- a/insns.pl
+++ b/insns.pl
@@ -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);
             }