x86: Remove restriction on NOTRACK prefix position
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 9 Sep 2017 12:31:30 +0000 (05:31 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 9 Sep 2017 12:32:11 +0000 (05:32 -0700)
Since the NOTRACK prefix is no longer required to be the last prefix
before the REX prefix, restriction on the NOTRACK prefix position is
removed from assembler as well as disassembler.  Assembler encodes the
NOTRACK prefix the same way as the DS segment register, which places
it before other prefixes.  Disassembler displays prefixes in the order
they appear.

gas/

* config/tc-i386.c (NOTRACK_PREFIX): Removed.
(REX_PREFIX): Updated.
(MAX_PREFIXES): Likewise.
(parse_insn): Remove restriction on NOTRACK prefix position.
* testsuite/gas/i386/notrack.s: Add tests with NOTRACK prefix
before other prefixes.
* testsuite/gas/i386/x86-64-notrack.s: Likewise.
* testsuite/gas/i386/notrackbad.s: Remove tests with NOTRACK
prefix before other prefixes.
* testsuite/gas/i386/x86-64-notrackbad.s: Likewise.
* testsuite/gas/i386/notrack-intel.d: Updated.
* testsuite/gas/i386/notrack.d: Likewise.
* testsuite/gas/i386/notrackbad.l: Likewise.
* testsuite/gas/i386/x86-64-notrack-intel.d: Likewise.
* testsuite/gas/i386/x86-64-notrack.d: Likewise.
* testsuite/gas/i386/x86-64-notrackbad.l: Likewise.

opcodes/

* i386-dis.c (last_active_prefix): Removed.
(ckprefix): Don't set last_active_prefix.
(NOTRACK_Fixup): Don't check last_active_prefix.

14 files changed:
gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/gas/i386/notrack-intel.d
gas/testsuite/gas/i386/notrack.d
gas/testsuite/gas/i386/notrack.s
gas/testsuite/gas/i386/notrackbad.l
gas/testsuite/gas/i386/notrackbad.s
gas/testsuite/gas/i386/x86-64-notrack-intel.d
gas/testsuite/gas/i386/x86-64-notrack.d
gas/testsuite/gas/i386/x86-64-notrack.s
gas/testsuite/gas/i386/x86-64-notrackbad.l
gas/testsuite/gas/i386/x86-64-notrackbad.s
opcodes/ChangeLog
opcodes/i386-dis.c

index 5dc06f5e5cade58bc894235941550a490d406b07..1bbd8b8e7fea8b10f4e7b9895a2db079a052099a 100644 (file)
@@ -1,3 +1,22 @@
+2017-09-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * config/tc-i386.c (NOTRACK_PREFIX): Removed.
+       (REX_PREFIX): Updated.
+       (MAX_PREFIXES): Likewise.
+       (parse_insn): Remove restriction on NOTRACK prefix position.
+       * testsuite/gas/i386/notrack.s: Add tests with NOTRACK prefix
+       before other prefixes.
+       * testsuite/gas/i386/x86-64-notrack.s: Likewise.
+       * testsuite/gas/i386/notrackbad.s: Remove tests with NOTRACK
+       prefix before other prefixes.
+       * testsuite/gas/i386/x86-64-notrackbad.s: Likewise.
+       * testsuite/gas/i386/notrack-intel.d: Updated.
+       * testsuite/gas/i386/notrack.d: Likewise.
+       * testsuite/gas/i386/notrackbad.l: Likewise.
+       * testsuite/gas/i386/x86-64-notrack-intel.d: Likewise.
+       * testsuite/gas/i386/x86-64-notrack.d: Likewise.
+       * testsuite/gas/i386/x86-64-notrackbad.l: Likewise.
+
 2017-09-07  Palmer Dabbelt  <palmer@dabbelt.com>
 
        * config/tc-riscv.c (riscv_frag_align_code): Emit the entire
index 456be9e07cf805665a27f52e219c8275ebf00165..fdff30153dde318e01e46ff68efece6cda58b5f8 100644 (file)
 #define HLE_PREFIX     REP_PREFIX
 #define BND_PREFIX     REP_PREFIX
 #define LOCK_PREFIX    5
-/* Only one of NOTRACK_PREFIX and SEG_PREFIX can be used at the same
-   time.  */
-#define NOTRACK_PREFIX 6
-#define REX_PREFIX     7       /* must come last.  */
-#define MAX_PREFIXES   8       /* max prefixes per opcode */
+#define REX_PREFIX     6       /* must come last.  */
+#define MAX_PREFIXES   7       /* max prefixes per opcode */
 
 /* we define the syntax here (modulo base,index,scale syntax) */
 #define REGISTER_PREFIX '%'
@@ -3978,42 +3975,24 @@ parse_insn (char *line, char *mnemonic)
          else
            {
              /* Add prefix, checking for repeated prefixes.  */
-             enum PREFIX_GROUP p
-               = add_prefix (current_templates->start->base_opcode);
-             if (p == PREFIX_DS
-                 && current_templates->start->cpu_flags.bitfield.cpucet)
+             switch (add_prefix (current_templates->start->base_opcode))
                {
-                 i.notrack_prefix = current_templates->start->name;
-                 /* Move NOTRACK_PREFIX_OPCODE to NOTRACK_PREFIX slot so
-                    that it is placed before others.  */
-                 i.prefix[SEG_PREFIX] = 0;
-                 i.prefix[NOTRACK_PREFIX] = NOTRACK_PREFIX_OPCODE;
-               }
-             else
-               {
-                 switch (p)
-                   {
-                   case PREFIX_EXIST:
-                     return NULL;
-                   case PREFIX_REP:
-                     if (current_templates->start->cpu_flags.bitfield.cpuhle)
-                       i.hle_prefix = current_templates->start->name;
-                     else if (current_templates->start->cpu_flags.bitfield.cpumpx)
-                       i.bnd_prefix = current_templates->start->name;
-                     else
-                       i.rep_prefix = current_templates->start->name;
-                     break;
-                   default:
-                     break;
-                   }
-
-                 if (i.notrack_prefix != NULL)
-                   {
-                     /* There must be no other prefixes after NOTRACK
-                        prefix.  */
-                     as_bad (_("expecting no other prefixes after `notrack'"));
-                     return NULL;
-                   }
+               case PREFIX_EXIST:
+                 return NULL;
+               case PREFIX_DS:
+                 if (current_templates->start->cpu_flags.bitfield.cpucet)
+                   i.notrack_prefix = current_templates->start->name;
+                 break;
+               case PREFIX_REP:
+                 if (current_templates->start->cpu_flags.bitfield.cpuhle)
+                   i.hle_prefix = current_templates->start->name;
+                 else if (current_templates->start->cpu_flags.bitfield.cpumpx)
+                   i.bnd_prefix = current_templates->start->name;
+                 else
+                   i.rep_prefix = current_templates->start->name;
+                 break;
+               default:
+                 break;
                }
            }
          /* Skip past PREFIX_SEPARATOR and reset token_start.  */
index 2ab6a8a7f82e4dc2deed24e5875eb02e98f31338..7b72a39fd73df52a8996f0bf111ab0902a0ba8be 100644 (file)
@@ -9,37 +9,45 @@ Disassembly of section .text:
 
 0+ <_start>:
 [      ]*[a-f0-9]+:    3e ff d0                notrack call eax
-[      ]*[a-f0-9]+:    66 3e ff d0             notrack call ax
+[      ]*[a-f0-9]+:    3e 66 ff d0             notrack call ax
 [      ]*[a-f0-9]+:    3e ff e0                notrack jmp eax
-[      ]*[a-f0-9]+:    66 3e ff e0             notrack jmp ax
+[      ]*[a-f0-9]+:    3e 66 ff e0             notrack jmp ax
 [      ]*[a-f0-9]+:    3e ff 10                notrack call DWORD PTR \[eax\]
-[      ]*[a-f0-9]+:    66 3e ff 10             notrack call WORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e 66 ff 10             notrack call WORD PTR \[eax\]
 [      ]*[a-f0-9]+:    3e ff 20                notrack jmp DWORD PTR \[eax\]
-[      ]*[a-f0-9]+:    66 3e ff 20             notrack jmp WORD PTR \[eax\]
-[      ]*[a-f0-9]+:    f2 3e ff d0             bnd notrack call eax
-[      ]*[a-f0-9]+:    66 f2 3e ff d0          bnd notrack call ax
-[      ]*[a-f0-9]+:    f2 3e ff e0             bnd notrack jmp eax
-[      ]*[a-f0-9]+:    66 f2 3e ff e0          bnd notrack jmp ax
-[      ]*[a-f0-9]+:    f2 3e ff 10             bnd notrack call DWORD PTR \[eax\]
-[      ]*[a-f0-9]+:    66 f2 3e ff 10          bnd notrack call WORD PTR \[eax\]
-[      ]*[a-f0-9]+:    f2 3e ff 20             bnd notrack jmp DWORD PTR \[eax\]
-[      ]*[a-f0-9]+:    66 f2 3e ff 20          bnd notrack jmp WORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e 66 ff 20             notrack jmp WORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e f2 ff d0             notrack bnd call eax
+[      ]*[a-f0-9]+:    3e 66 f2 ff d0          notrack bnd call ax
+[      ]*[a-f0-9]+:    3e f2 ff e0             notrack bnd jmp eax
+[      ]*[a-f0-9]+:    3e 66 f2 ff e0          notrack bnd jmp ax
+[      ]*[a-f0-9]+:    3e f2 ff 10             notrack bnd call DWORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e 66 f2 ff 10          notrack bnd call WORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e f2 ff 20             notrack bnd jmp DWORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e 66 f2 ff 20          notrack bnd jmp WORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e f2 ff d0             notrack bnd call eax
+[      ]*[a-f0-9]+:    3e 66 f2 ff d0          notrack bnd call ax
+[      ]*[a-f0-9]+:    3e f2 ff 10             notrack bnd call DWORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e 66 f2 ff 10          notrack bnd call WORD PTR \[eax\]
 [      ]*[a-f0-9]+:    3e ff d0                notrack call eax
-[      ]*[a-f0-9]+:    66 3e ff d0             notrack call ax
+[      ]*[a-f0-9]+:    3e 66 ff d0             notrack call ax
 [      ]*[a-f0-9]+:    3e ff e0                notrack jmp eax
-[      ]*[a-f0-9]+:    66 3e ff e0             notrack jmp ax
+[      ]*[a-f0-9]+:    3e 66 ff e0             notrack jmp ax
 [      ]*[a-f0-9]+:    3e ff 10                notrack call DWORD PTR \[eax\]
-[      ]*[a-f0-9]+:    66 3e ff 10             notrack call WORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e 66 ff 10             notrack call WORD PTR \[eax\]
 [      ]*[a-f0-9]+:    3e ff 20                notrack jmp DWORD PTR \[eax\]
-[      ]*[a-f0-9]+:    66 3e ff 20             notrack jmp WORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e 66 ff 20             notrack jmp WORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e f2 ff d0             notrack bnd call eax
+[      ]*[a-f0-9]+:    3e 66 f2 ff d0          notrack bnd call ax
+[      ]*[a-f0-9]+:    3e f2 ff e0             notrack bnd jmp eax
+[      ]*[a-f0-9]+:    3e 66 f2 ff e0          notrack bnd jmp ax
+[      ]*[a-f0-9]+:    3e f2 ff 10             notrack bnd call DWORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e 66 f2 ff 10          notrack bnd call WORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e f2 ff 20             notrack bnd jmp DWORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e 66 f2 ff 20          notrack bnd jmp WORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e f2 ff d0             notrack bnd call eax
+[      ]*[a-f0-9]+:    3e 66 f2 ff d0          notrack bnd call ax
+[      ]*[a-f0-9]+:    3e f2 ff 10             notrack bnd call DWORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e 66 f2 ff 10          notrack bnd call WORD PTR \[eax\]
 [      ]*[a-f0-9]+:    f2 3e ff d0             bnd notrack call eax
-[      ]*[a-f0-9]+:    66 f2 3e ff d0          bnd notrack call ax
-[      ]*[a-f0-9]+:    f2 3e ff e0             bnd notrack jmp eax
-[      ]*[a-f0-9]+:    66 f2 3e ff e0          bnd notrack jmp ax
-[      ]*[a-f0-9]+:    f2 3e ff 10             bnd notrack call DWORD PTR \[eax\]
-[      ]*[a-f0-9]+:    66 f2 3e ff 10          bnd notrack call WORD PTR \[eax\]
-[      ]*[a-f0-9]+:    f2 3e ff 20             bnd notrack jmp DWORD PTR \[eax\]
-[      ]*[a-f0-9]+:    66 f2 3e ff 20          bnd notrack jmp WORD PTR \[eax\]
-[      ]*[a-f0-9]+:    3e f2 ff d0             ds bnd call eax
-[      ]*[a-f0-9]+:    3e 66 ff d0             ds call ax
+[      ]*[a-f0-9]+:    66 3e ff d0             notrack call ax
 #pass
index 11d0ce9e1551beb9e1dfa4c2db6d500493b92054..44fd11036e231b2b6ce53babf9d1522472161c02 100644 (file)
@@ -8,37 +8,45 @@ Disassembly of section .text:
 
 0+ <_start>:
 [      ]*[a-f0-9]+:    3e ff d0                notrack call \*%eax
-[      ]*[a-f0-9]+:    66 3e ff d0             notrack callw \*%ax
+[      ]*[a-f0-9]+:    3e 66 ff d0             notrack callw \*%ax
 [      ]*[a-f0-9]+:    3e ff e0                notrack jmp \*%eax
-[      ]*[a-f0-9]+:    66 3e ff e0             notrack jmpw \*%ax
+[      ]*[a-f0-9]+:    3e 66 ff e0             notrack jmpw \*%ax
 [      ]*[a-f0-9]+:    3e ff 10                notrack call \*\(%eax\)
-[      ]*[a-f0-9]+:    66 3e ff 10             notrack callw \*\(%eax\)
+[      ]*[a-f0-9]+:    3e 66 ff 10             notrack callw \*\(%eax\)
 [      ]*[a-f0-9]+:    3e ff 20                notrack jmp \*\(%eax\)
-[      ]*[a-f0-9]+:    66 3e ff 20             notrack jmpw \*\(%eax\)
-[      ]*[a-f0-9]+:    f2 3e ff d0             bnd notrack call \*%eax
-[      ]*[a-f0-9]+:    66 f2 3e ff d0          bnd notrack callw \*%ax
-[      ]*[a-f0-9]+:    f2 3e ff e0             bnd notrack jmp \*%eax
-[      ]*[a-f0-9]+:    66 f2 3e ff e0          bnd notrack jmpw \*%ax
-[      ]*[a-f0-9]+:    f2 3e ff 10             bnd notrack call \*\(%eax\)
-[      ]*[a-f0-9]+:    66 f2 3e ff 10          bnd notrack callw \*\(%eax\)
-[      ]*[a-f0-9]+:    f2 3e ff 20             bnd notrack jmp \*\(%eax\)
-[      ]*[a-f0-9]+:    66 f2 3e ff 20          bnd notrack jmpw \*\(%eax\)
+[      ]*[a-f0-9]+:    3e 66 ff 20             notrack jmpw \*\(%eax\)
+[      ]*[a-f0-9]+:    3e f2 ff d0             notrack bnd call \*%eax
+[      ]*[a-f0-9]+:    3e 66 f2 ff d0          notrack bnd callw \*%ax
+[      ]*[a-f0-9]+:    3e f2 ff e0             notrack bnd jmp \*%eax
+[      ]*[a-f0-9]+:    3e 66 f2 ff e0          notrack bnd jmpw \*%ax
+[      ]*[a-f0-9]+:    3e f2 ff 10             notrack bnd call \*\(%eax\)
+[      ]*[a-f0-9]+:    3e 66 f2 ff 10          notrack bnd callw \*\(%eax\)
+[      ]*[a-f0-9]+:    3e f2 ff 20             notrack bnd jmp \*\(%eax\)
+[      ]*[a-f0-9]+:    3e 66 f2 ff 20          notrack bnd jmpw \*\(%eax\)
+[      ]*[a-f0-9]+:    3e f2 ff d0             notrack bnd call \*%eax
+[      ]*[a-f0-9]+:    3e 66 f2 ff d0          notrack bnd callw \*%ax
+[      ]*[a-f0-9]+:    3e f2 ff 10             notrack bnd call \*\(%eax\)
+[      ]*[a-f0-9]+:    3e 66 f2 ff 10          notrack bnd callw \*\(%eax\)
 [      ]*[a-f0-9]+:    3e ff d0                notrack call \*%eax
-[      ]*[a-f0-9]+:    66 3e ff d0             notrack callw \*%ax
+[      ]*[a-f0-9]+:    3e 66 ff d0             notrack callw \*%ax
 [      ]*[a-f0-9]+:    3e ff e0                notrack jmp \*%eax
-[      ]*[a-f0-9]+:    66 3e ff e0             notrack jmpw \*%ax
+[      ]*[a-f0-9]+:    3e 66 ff e0             notrack jmpw \*%ax
 [      ]*[a-f0-9]+:    3e ff 10                notrack call \*\(%eax\)
-[      ]*[a-f0-9]+:    66 3e ff 10             notrack callw \*\(%eax\)
+[      ]*[a-f0-9]+:    3e 66 ff 10             notrack callw \*\(%eax\)
 [      ]*[a-f0-9]+:    3e ff 20                notrack jmp \*\(%eax\)
-[      ]*[a-f0-9]+:    66 3e ff 20             notrack jmpw \*\(%eax\)
+[      ]*[a-f0-9]+:    3e 66 ff 20             notrack jmpw \*\(%eax\)
+[      ]*[a-f0-9]+:    3e f2 ff d0             notrack bnd call \*%eax
+[      ]*[a-f0-9]+:    3e 66 f2 ff d0          notrack bnd callw \*%ax
+[      ]*[a-f0-9]+:    3e f2 ff e0             notrack bnd jmp \*%eax
+[      ]*[a-f0-9]+:    3e 66 f2 ff e0          notrack bnd jmpw \*%ax
+[      ]*[a-f0-9]+:    3e f2 ff 10             notrack bnd call \*\(%eax\)
+[      ]*[a-f0-9]+:    3e 66 f2 ff 10          notrack bnd callw \*\(%eax\)
+[      ]*[a-f0-9]+:    3e f2 ff 20             notrack bnd jmp \*\(%eax\)
+[      ]*[a-f0-9]+:    3e 66 f2 ff 20          notrack bnd jmpw \*\(%eax\)
+[      ]*[a-f0-9]+:    3e f2 ff d0             notrack bnd call \*%eax
+[      ]*[a-f0-9]+:    3e 66 f2 ff d0          notrack bnd callw \*%ax
+[      ]*[a-f0-9]+:    3e f2 ff 10             notrack bnd call \*\(%eax\)
+[      ]*[a-f0-9]+:    3e 66 f2 ff 10          notrack bnd callw \*\(%eax\)
 [      ]*[a-f0-9]+:    f2 3e ff d0             bnd notrack call \*%eax
-[      ]*[a-f0-9]+:    66 f2 3e ff d0          bnd notrack callw \*%ax
-[      ]*[a-f0-9]+:    f2 3e ff e0             bnd notrack jmp \*%eax
-[      ]*[a-f0-9]+:    66 f2 3e ff e0          bnd notrack jmpw \*%ax
-[      ]*[a-f0-9]+:    f2 3e ff 10             bnd notrack call \*\(%eax\)
-[      ]*[a-f0-9]+:    66 f2 3e ff 10          bnd notrack callw \*\(%eax\)
-[      ]*[a-f0-9]+:    f2 3e ff 20             bnd notrack jmp \*\(%eax\)
-[      ]*[a-f0-9]+:    66 f2 3e ff 20          bnd notrack jmpw \*\(%eax\)
-[      ]*[a-f0-9]+:    3e f2 ff d0             ds bnd call \*%eax
-[      ]*[a-f0-9]+:    3e 66 ff d0             ds callw \*%ax
+[      ]*[a-f0-9]+:    66 3e ff d0             notrack callw \*%ax
 #pass
index 8383645b0198b367aab4c9a1eb044f5422b182ae..e6db928feeb10d9d1f43fce5a82affc1a41d3ac5 100644 (file)
@@ -13,15 +13,20 @@ _start:
        notrack jmp *(%eax)
        notrack jmpw *(%eax)
 
+       notrack bnd call *%eax
+       notrack bnd call *%ax
+       notrack bnd jmp *%eax
+       notrack bnd jmp *%ax
+
+       notrack bnd call *(%eax)
+       notrack bnd callw *(%eax)
+       notrack bnd jmp *(%eax)
+       notrack bnd jmpw *(%eax)
+
        bnd notrack call *%eax
        bnd notrack call *%ax
-       bnd notrack jmp *%eax
-       bnd notrack jmp *%ax
-
        bnd notrack call *(%eax)
        bnd notrack callw *(%eax)
-       bnd notrack jmp *(%eax)
-       bnd notrack jmpw *(%eax)
 
        .intel_syntax noprefix
        notrack call eax
@@ -34,24 +39,29 @@ _start:
        notrack jmp DWORD PTR [eax]
        notrack jmp WORD PTR [eax]
 
+       notrack bnd call eax
+       notrack bnd call ax
+       notrack bnd jmp eax
+       notrack bnd jmp ax
+
+       notrack bnd call DWORD PTR [eax]
+       notrack bnd call WORD PTR [eax]
+       notrack bnd jmp DWORD PTR [eax]
+       notrack bnd jmp WORD PTR [eax]
+
        bnd notrack call eax
        bnd notrack call ax
-       bnd notrack jmp eax
-       bnd notrack jmp ax
-
        bnd notrack call DWORD PTR [eax]
        bnd notrack call WORD PTR [eax]
-       bnd notrack jmp DWORD PTR [eax]
-       bnd notrack jmp WORD PTR [eax]
 
-       # ds bnd call *%eax
-       .byte 0x3e
+       # bnd notrack call *%eax
        .byte 0xf2
+       .byte 0x3e
        .byte 0xff
        .byte 0xd0
 
-       # ds callw *%ax
-       .byte 0x3e
+       # notrack callw *%ax
        .byte 0x66
+       .byte 0x3e
        .byte 0xff
        .byte 0xd0
index 48ee69f96a11e70fc6705dc1c7b7b8e6d3c91e89..2271a92bf6ac3cff7bd9b0c9b309bc7ce8459343 100644 (file)
@@ -2,15 +2,10 @@
 .*:6: Error: expecting indirect branch instruction after `notrack'
 .*:6: Warning: skipping prefixes on this instruction
 .*:7: Error: expecting indirect branch instruction after `notrack'
-.*:7: Warning: skipping prefixes on this instruction
 .*:9: Error: same type of prefix used twice
-.*:10: Error: expecting no other prefixes after `notrack'
-.*:11: Error: expecting no other prefixes after `notrack'
-.*:12: Error: expecting no other prefixes after `notrack'
-.*:15: Error: same type of prefix used twice
-.*:16: Error: expecting no other prefixes after `notrack'
-.*:17: Error: expecting no other prefixes after `notrack'
-.*:18: Error: expecting no other prefixes after `notrack'
+.*:10: Error: same type of prefix used twice
+.*:13: Error: same type of prefix used twice
+.*:14: Error: same type of prefix used twice
 GAS LISTING .*
 
 
@@ -25,17 +20,12 @@ GAS LISTING .*
 [      ]*6[    ]+[0-9A-F]*
 [      ]*7[    ]+\?\?\?\? [0-9A-F]*            notrack jmp foo
 \*\*\*\*  Error: expecting indirect branch instruction after `notrack'
-\*\*\*\*  Warning: skipping prefixes on this instruction
 [      ]*7[    ]+[0-9A-F]*
 [      ]*8[    ]+
 [      ]*9[    ]+fs notrack call \*%eax
 [      ]*10[   ]+notrack fs call \*%eax
-[      ]*11[   ]+notrack bnd call \*%eax
-[      ]*12[   ]+notrack data16 call \*%eax
-[      ]*13[   ]+
-[      ]*14[   ]+\.intel_syntax noprefix
-[      ]*15[   ]+fs notrack call eax
-[      ]*16[   ]+notrack fs call eax
-[      ]*17[   ]+notrack bnd call eax
-[      ]*18[   ]+[\? 0-9A-F]*[         ]+notrack data16 call eax
+[      ]*11[   ]+
+[      ]*12[   ]+\.intel_syntax noprefix
+[      ]*13[   ]+fs notrack call eax
+[      ]*14[   ]+notrack fs call eax
 #pass
index 3f57ef0fb576337efdc0808fceaba97b5b328754..535ec56bba9b08861d2f809d8756e15313410138 100644 (file)
@@ -8,11 +8,9 @@ _start:
 
        fs notrack call *%eax
        notrack fs call *%eax
-       notrack bnd call *%eax
-       notrack data16 call *%eax
 
        .intel_syntax noprefix
        fs notrack call eax
        notrack fs call eax
-       notrack bnd call eax
-       notrack data16 call eax
+
+       .p2align        4,0
index 0170a82dbe962f3e3bdeaa8a61673060e8d0a8ec..b9967908324647b270dc5188fc3eb41d764ed902 100644 (file)
@@ -16,22 +16,28 @@ Disassembly of section .text:
 [      ]*[a-f0-9]+:    3e 41 ff 10             notrack call QWORD PTR \[r8\]
 [      ]*[a-f0-9]+:    3e ff 20                notrack jmp QWORD PTR \[rax\]
 [      ]*[a-f0-9]+:    3e 41 ff 20             notrack jmp QWORD PTR \[r8\]
-[      ]*[a-f0-9]+:    67 3e ff 10             notrack call QWORD PTR \[eax\]
-[      ]*[a-f0-9]+:    67 3e 41 ff 10          notrack call QWORD PTR \[r8d\]
-[      ]*[a-f0-9]+:    67 3e ff 20             notrack jmp QWORD PTR \[eax\]
-[      ]*[a-f0-9]+:    67 3e 41 ff 20          notrack jmp QWORD PTR \[r8d\]
-[      ]*[a-f0-9]+:    f2 3e ff d0             bnd notrack call rax
-[      ]*[a-f0-9]+:    f2 3e 41 ff d0          bnd notrack call r8
-[      ]*[a-f0-9]+:    f2 3e ff e0             bnd notrack jmp rax
-[      ]*[a-f0-9]+:    f2 3e 41 ff e0          bnd notrack jmp r8
-[      ]*[a-f0-9]+:    f2 3e ff 10             bnd notrack call QWORD PTR \[rax\]
-[      ]*[a-f0-9]+:    f2 3e 41 ff 10          bnd notrack call QWORD PTR \[r8\]
-[      ]*[a-f0-9]+:    f2 3e ff 20             bnd notrack jmp QWORD PTR \[rax\]
-[      ]*[a-f0-9]+:    f2 3e 41 ff 20          bnd notrack jmp QWORD PTR \[r8\]
-[      ]*[a-f0-9]+:    67 f2 3e ff 10          bnd notrack call QWORD PTR \[eax\]
-[      ]*[a-f0-9]+:    67 f2 3e 41 ff 10       bnd notrack call QWORD PTR \[r8d\]
-[      ]*[a-f0-9]+:    67 f2 3e ff 20          bnd notrack jmp QWORD PTR \[eax\]
-[      ]*[a-f0-9]+:    67 f2 3e 41 ff 20       bnd notrack jmp QWORD PTR \[r8d\]
+[      ]*[a-f0-9]+:    3e 67 ff 10             notrack call QWORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e 67 41 ff 10          notrack call QWORD PTR \[r8d\]
+[      ]*[a-f0-9]+:    3e 67 ff 20             notrack jmp QWORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e 67 41 ff 20          notrack jmp QWORD PTR \[r8d\]
+[      ]*[a-f0-9]+:    3e f2 ff d0             notrack bnd call rax
+[      ]*[a-f0-9]+:    3e f2 41 ff d0          notrack bnd call r8
+[      ]*[a-f0-9]+:    3e f2 ff e0             notrack bnd jmp rax
+[      ]*[a-f0-9]+:    3e f2 41 ff e0          notrack bnd jmp r8
+[      ]*[a-f0-9]+:    3e f2 ff 10             notrack bnd call QWORD PTR \[rax\]
+[      ]*[a-f0-9]+:    3e f2 41 ff 10          notrack bnd call QWORD PTR \[r8\]
+[      ]*[a-f0-9]+:    3e f2 ff 20             notrack bnd jmp QWORD PTR \[rax\]
+[      ]*[a-f0-9]+:    3e f2 41 ff 20          notrack bnd jmp QWORD PTR \[r8\]
+[      ]*[a-f0-9]+:    3e 67 f2 ff 10          notrack bnd call QWORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e 67 f2 41 ff 10       notrack bnd call QWORD PTR \[r8d\]
+[      ]*[a-f0-9]+:    3e 67 f2 ff 20          notrack bnd jmp QWORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e 67 f2 41 ff 20       notrack bnd jmp QWORD PTR \[r8d\]
+[      ]*[a-f0-9]+:    3e f2 ff d0             notrack bnd call rax
+[      ]*[a-f0-9]+:    3e f2 41 ff d0          notrack bnd call r8
+[      ]*[a-f0-9]+:    3e f2 ff 10             notrack bnd call QWORD PTR \[rax\]
+[      ]*[a-f0-9]+:    3e f2 41 ff 10          notrack bnd call QWORD PTR \[r8\]
+[      ]*[a-f0-9]+:    3e 67 f2 ff 10          notrack bnd call QWORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e 67 f2 41 ff 10       notrack bnd call QWORD PTR \[r8d\]
 [      ]*[a-f0-9]+:    3e ff d0                notrack call rax
 [      ]*[a-f0-9]+:    3e 41 ff d0             notrack call r8
 [      ]*[a-f0-9]+:    3e ff e0                notrack jmp rax
@@ -40,23 +46,29 @@ Disassembly of section .text:
 [      ]*[a-f0-9]+:    3e 41 ff 10             notrack call QWORD PTR \[r8\]
 [      ]*[a-f0-9]+:    3e ff 20                notrack jmp QWORD PTR \[rax\]
 [      ]*[a-f0-9]+:    3e 41 ff 20             notrack jmp QWORD PTR \[r8\]
-[      ]*[a-f0-9]+:    67 3e ff 10             notrack call QWORD PTR \[eax\]
-[      ]*[a-f0-9]+:    67 3e 41 ff 10          notrack call QWORD PTR \[r8d\]
-[      ]*[a-f0-9]+:    67 3e ff 20             notrack jmp QWORD PTR \[eax\]
-[      ]*[a-f0-9]+:    67 3e 41 ff 20          notrack jmp QWORD PTR \[r8d\]
+[      ]*[a-f0-9]+:    3e 67 ff 10             notrack call QWORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e 67 41 ff 10          notrack call QWORD PTR \[r8d\]
+[      ]*[a-f0-9]+:    3e 67 ff 20             notrack jmp QWORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e 67 41 ff 20          notrack jmp QWORD PTR \[r8d\]
+[      ]*[a-f0-9]+:    3e f2 ff d0             notrack bnd call rax
+[      ]*[a-f0-9]+:    3e f2 41 ff d0          notrack bnd call r8
+[      ]*[a-f0-9]+:    3e f2 ff e0             notrack bnd jmp rax
+[      ]*[a-f0-9]+:    3e f2 41 ff e0          notrack bnd jmp r8
+[      ]*[a-f0-9]+:    3e f2 ff 10             notrack bnd call QWORD PTR \[rax\]
+[      ]*[a-f0-9]+:    3e f2 41 ff 10          notrack bnd call QWORD PTR \[r8\]
+[      ]*[a-f0-9]+:    3e f2 ff 20             notrack bnd jmp QWORD PTR \[rax\]
+[      ]*[a-f0-9]+:    3e f2 41 ff 20          notrack bnd jmp QWORD PTR \[r8\]
+[      ]*[a-f0-9]+:    3e 67 f2 ff 10          notrack bnd call QWORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e 67 f2 41 ff 10       notrack bnd call QWORD PTR \[r8d\]
+[      ]*[a-f0-9]+:    3e 67 f2 ff 20          notrack bnd jmp QWORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e 67 f2 41 ff 20       notrack bnd jmp QWORD PTR \[r8d\]
+[      ]*[a-f0-9]+:    3e f2 ff d0             notrack bnd call rax
+[      ]*[a-f0-9]+:    3e f2 41 ff d0          notrack bnd call r8
+[      ]*[a-f0-9]+:    3e f2 ff 10             notrack bnd call QWORD PTR \[rax\]
+[      ]*[a-f0-9]+:    3e f2 41 ff 10          notrack bnd call QWORD PTR \[r8\]
+[      ]*[a-f0-9]+:    3e 67 f2 ff 10          notrack bnd call QWORD PTR \[eax\]
+[      ]*[a-f0-9]+:    3e 67 f2 41 ff 10       notrack bnd call QWORD PTR \[r8d\]
 [      ]*[a-f0-9]+:    f2 3e ff d0             bnd notrack call rax
-[      ]*[a-f0-9]+:    f2 3e 41 ff d0          bnd notrack call r8
-[      ]*[a-f0-9]+:    f2 3e ff e0             bnd notrack jmp rax
-[      ]*[a-f0-9]+:    f2 3e 41 ff e0          bnd notrack jmp r8
-[      ]*[a-f0-9]+:    f2 3e ff 10             bnd notrack call QWORD PTR \[rax\]
-[      ]*[a-f0-9]+:    f2 3e 41 ff 10          bnd notrack call QWORD PTR \[r8\]
-[      ]*[a-f0-9]+:    f2 3e ff 20             bnd notrack jmp QWORD PTR \[rax\]
-[      ]*[a-f0-9]+:    f2 3e 41 ff 20          bnd notrack jmp QWORD PTR \[r8\]
-[      ]*[a-f0-9]+:    67 f2 3e ff 10          bnd notrack call QWORD PTR \[eax\]
-[      ]*[a-f0-9]+:    67 f2 3e 41 ff 10       bnd notrack call QWORD PTR \[r8d\]
-[      ]*[a-f0-9]+:    67 f2 3e ff 20          bnd notrack jmp QWORD PTR \[eax\]
-[      ]*[a-f0-9]+:    67 f2 3e 41 ff 20       bnd notrack jmp QWORD PTR \[r8d\]
-[      ]*[a-f0-9]+:    3e f2 ff d0             ds bnd call rax
 [      ]*[a-f0-9]+:    3e 66 ff d0             ds call ax
 [      ]*[a-f0-9]+:    66 3e ff d0             ds call ax
 #pass
index cf725d45786c8c639914e18632dc21814fc8ae02..e525f43cbc83d57191f60a0e1291c52afc60c773 100644 (file)
@@ -15,22 +15,28 @@ Disassembly of section .text:
 [      ]*[a-f0-9]+:    3e 41 ff 10             notrack callq \*\(%r8\)
 [      ]*[a-f0-9]+:    3e ff 20                notrack jmpq \*\(%rax\)
 [      ]*[a-f0-9]+:    3e 41 ff 20             notrack jmpq \*\(%r8\)
-[      ]*[a-f0-9]+:    67 3e ff 10             notrack callq \*\(%eax\)
-[      ]*[a-f0-9]+:    67 3e 41 ff 10          notrack callq \*\(%r8d\)
-[      ]*[a-f0-9]+:    67 3e ff 20             notrack jmpq \*\(%eax\)
-[      ]*[a-f0-9]+:    67 3e 41 ff 20          notrack jmpq \*\(%r8d\)
-[      ]*[a-f0-9]+:    f2 3e ff d0             bnd notrack callq \*%rax
-[      ]*[a-f0-9]+:    f2 3e 41 ff d0          bnd notrack callq \*%r8
-[      ]*[a-f0-9]+:    f2 3e ff e0             bnd notrack jmpq \*%rax
-[      ]*[a-f0-9]+:    f2 3e 41 ff e0          bnd notrack jmpq \*%r8
-[      ]*[a-f0-9]+:    f2 3e ff 10             bnd notrack callq \*\(%rax\)
-[      ]*[a-f0-9]+:    f2 3e 41 ff 10          bnd notrack callq \*\(%r8\)
-[      ]*[a-f0-9]+:    f2 3e ff 20             bnd notrack jmpq \*\(%rax\)
-[      ]*[a-f0-9]+:    f2 3e 41 ff 20          bnd notrack jmpq \*\(%r8\)
-[      ]*[a-f0-9]+:    67 f2 3e ff 10          bnd notrack callq \*\(%eax\)
-[      ]*[a-f0-9]+:    67 f2 3e 41 ff 10       bnd notrack callq \*\(%r8d\)
-[      ]*[a-f0-9]+:    67 f2 3e ff 20          bnd notrack jmpq \*\(%eax\)
-[      ]*[a-f0-9]+:    67 f2 3e 41 ff 20       bnd notrack jmpq \*\(%r8d\)
+[      ]*[a-f0-9]+:    3e 67 ff 10             notrack callq \*\(%eax\)
+[      ]*[a-f0-9]+:    3e 67 41 ff 10          notrack callq \*\(%r8d\)
+[      ]*[a-f0-9]+:    3e 67 ff 20             notrack jmpq \*\(%eax\)
+[      ]*[a-f0-9]+:    3e 67 41 ff 20          notrack jmpq \*\(%r8d\)
+[      ]*[a-f0-9]+:    3e f2 ff d0             notrack bnd callq \*%rax
+[      ]*[a-f0-9]+:    3e f2 41 ff d0          notrack bnd callq \*%r8
+[      ]*[a-f0-9]+:    3e f2 ff e0             notrack bnd jmpq \*%rax
+[      ]*[a-f0-9]+:    3e f2 41 ff e0          notrack bnd jmpq \*%r8
+[      ]*[a-f0-9]+:    3e f2 ff 10             notrack bnd callq \*\(%rax\)
+[      ]*[a-f0-9]+:    3e f2 41 ff 10          notrack bnd callq \*\(%r8\)
+[      ]*[a-f0-9]+:    3e f2 ff 20             notrack bnd jmpq \*\(%rax\)
+[      ]*[a-f0-9]+:    3e f2 41 ff 20          notrack bnd jmpq \*\(%r8\)
+[      ]*[a-f0-9]+:    3e 67 f2 ff 10          notrack bnd callq \*\(%eax\)
+[      ]*[a-f0-9]+:    3e 67 f2 41 ff 10       notrack bnd callq \*\(%r8d\)
+[      ]*[a-f0-9]+:    3e 67 f2 ff 20          notrack bnd jmpq \*\(%eax\)
+[      ]*[a-f0-9]+:    3e 67 f2 41 ff 20       notrack bnd jmpq \*\(%r8d\)
+[      ]*[a-f0-9]+:    3e f2 ff d0             notrack bnd callq \*%rax
+[      ]*[a-f0-9]+:    3e f2 41 ff d0          notrack bnd callq \*%r8
+[      ]*[a-f0-9]+:    3e f2 ff 10             notrack bnd callq \*\(%rax\)
+[      ]*[a-f0-9]+:    3e f2 41 ff 10          notrack bnd callq \*\(%r8\)
+[      ]*[a-f0-9]+:    3e 67 f2 ff 10          notrack bnd callq \*\(%eax\)
+[      ]*[a-f0-9]+:    3e 67 f2 41 ff 10       notrack bnd callq \*\(%r8d\)
 [      ]*[a-f0-9]+:    3e ff d0                notrack callq \*%rax
 [      ]*[a-f0-9]+:    3e 41 ff d0             notrack callq \*%r8
 [      ]*[a-f0-9]+:    3e ff e0                notrack jmpq \*%rax
@@ -39,23 +45,29 @@ Disassembly of section .text:
 [      ]*[a-f0-9]+:    3e 41 ff 10             notrack callq \*\(%r8\)
 [      ]*[a-f0-9]+:    3e ff 20                notrack jmpq \*\(%rax\)
 [      ]*[a-f0-9]+:    3e 41 ff 20             notrack jmpq \*\(%r8\)
-[      ]*[a-f0-9]+:    67 3e ff 10             notrack callq \*\(%eax\)
-[      ]*[a-f0-9]+:    67 3e 41 ff 10          notrack callq \*\(%r8d\)
-[      ]*[a-f0-9]+:    67 3e ff 20             notrack jmpq \*\(%eax\)
-[      ]*[a-f0-9]+:    67 3e 41 ff 20          notrack jmpq \*\(%r8d\)
+[      ]*[a-f0-9]+:    3e 67 ff 10             notrack callq \*\(%eax\)
+[      ]*[a-f0-9]+:    3e 67 41 ff 10          notrack callq \*\(%r8d\)
+[      ]*[a-f0-9]+:    3e 67 ff 20             notrack jmpq \*\(%eax\)
+[      ]*[a-f0-9]+:    3e 67 41 ff 20          notrack jmpq \*\(%r8d\)
+[      ]*[a-f0-9]+:    3e f2 ff d0             notrack bnd callq \*%rax
+[      ]*[a-f0-9]+:    3e f2 41 ff d0          notrack bnd callq \*%r8
+[      ]*[a-f0-9]+:    3e f2 ff e0             notrack bnd jmpq \*%rax
+[      ]*[a-f0-9]+:    3e f2 41 ff e0          notrack bnd jmpq \*%r8
+[      ]*[a-f0-9]+:    3e f2 ff 10             notrack bnd callq \*\(%rax\)
+[      ]*[a-f0-9]+:    3e f2 41 ff 10          notrack bnd callq \*\(%r8\)
+[      ]*[a-f0-9]+:    3e f2 ff 20             notrack bnd jmpq \*\(%rax\)
+[      ]*[a-f0-9]+:    3e f2 41 ff 20          notrack bnd jmpq \*\(%r8\)
+[      ]*[a-f0-9]+:    3e 67 f2 ff 10          notrack bnd callq \*\(%eax\)
+[      ]*[a-f0-9]+:    3e 67 f2 41 ff 10       notrack bnd callq \*\(%r8d\)
+[      ]*[a-f0-9]+:    3e 67 f2 ff 20          notrack bnd jmpq \*\(%eax\)
+[      ]*[a-f0-9]+:    3e 67 f2 41 ff 20       notrack bnd jmpq \*\(%r8d\)
+[      ]*[a-f0-9]+:    3e f2 ff d0             notrack bnd callq \*%rax
+[      ]*[a-f0-9]+:    3e f2 41 ff d0          notrack bnd callq \*%r8
+[      ]*[a-f0-9]+:    3e f2 ff 10             notrack bnd callq \*\(%rax\)
+[      ]*[a-f0-9]+:    3e f2 41 ff 10          notrack bnd callq \*\(%r8\)
+[      ]*[a-f0-9]+:    3e 67 f2 ff 10          notrack bnd callq \*\(%eax\)
+[      ]*[a-f0-9]+:    3e 67 f2 41 ff 10       notrack bnd callq \*\(%r8d\)
 [      ]*[a-f0-9]+:    f2 3e ff d0             bnd notrack callq \*%rax
-[      ]*[a-f0-9]+:    f2 3e 41 ff d0          bnd notrack callq \*%r8
-[      ]*[a-f0-9]+:    f2 3e ff e0             bnd notrack jmpq \*%rax
-[      ]*[a-f0-9]+:    f2 3e 41 ff e0          bnd notrack jmpq \*%r8
-[      ]*[a-f0-9]+:    f2 3e ff 10             bnd notrack callq \*\(%rax\)
-[      ]*[a-f0-9]+:    f2 3e 41 ff 10          bnd notrack callq \*\(%r8\)
-[      ]*[a-f0-9]+:    f2 3e ff 20             bnd notrack jmpq \*\(%rax\)
-[      ]*[a-f0-9]+:    f2 3e 41 ff 20          bnd notrack jmpq \*\(%r8\)
-[      ]*[a-f0-9]+:    67 f2 3e ff 10          bnd notrack callq \*\(%eax\)
-[      ]*[a-f0-9]+:    67 f2 3e 41 ff 10       bnd notrack callq \*\(%r8d\)
-[      ]*[a-f0-9]+:    67 f2 3e ff 20          bnd notrack jmpq \*\(%eax\)
-[      ]*[a-f0-9]+:    67 f2 3e 41 ff 20       bnd notrack jmpq \*\(%r8d\)
-[      ]*[a-f0-9]+:    3e f2 ff d0             ds bnd callq \*%rax
 [      ]*[a-f0-9]+:    3e 66 ff d0             ds callw \*%ax
 [      ]*[a-f0-9]+:    66 3e ff d0             ds callw \*%ax
 #pass
index 7db0812024d0253ecf8ea941dec2552bd4e74b7c..aeebd11a766b6508e4d71056323a2a4b8aee9270 100644 (file)
@@ -18,20 +18,27 @@ _start:
        notrack jmp *(%eax)
        notrack jmp *(%r8d)
 
+       notrack bnd call *%rax
+       notrack bnd call *%r8
+       notrack bnd jmp *%rax
+       notrack bnd jmp *%r8
+
+       notrack bnd call *(%rax)
+       notrack bnd call *(%r8)
+       notrack bnd jmp *(%rax)
+       notrack bnd jmp *(%r8)
+
+       notrack bnd call *(%eax)
+       notrack bnd call *(%r8d)
+       notrack bnd jmp *(%eax)
+       notrack bnd jmp *(%r8d)
+
        bnd notrack call *%rax
        bnd notrack call *%r8
-       bnd notrack jmp *%rax
-       bnd notrack jmp *%r8
-
        bnd notrack call *(%rax)
        bnd notrack call *(%r8)
-       bnd notrack jmp *(%rax)
-       bnd notrack jmp *(%r8)
-
        bnd notrack call *(%eax)
        bnd notrack call *(%r8d)
-       bnd notrack jmp *(%eax)
-       bnd notrack jmp *(%r8d)
 
        .intel_syntax noprefix
        notrack call rax
@@ -49,24 +56,31 @@ _start:
        notrack jmp QWORD PTR [eax]
        notrack jmp QWORD PTR [r8d]
 
+       notrack bnd call rax
+       notrack bnd call r8
+       notrack bnd jmp rax
+       notrack bnd jmp r8
+
+       notrack bnd call QWORD PTR [rax]
+       notrack bnd call QWORD PTR [r8]
+       notrack bnd jmp QWORD PTR [rax]
+       notrack bnd jmp QWORD PTR [r8]
+
+       notrack bnd call QWORD PTR [eax]
+       notrack bnd call QWORD PTR [r8d]
+       notrack bnd jmp QWORD PTR [eax]
+       notrack bnd jmp QWORD PTR [r8d]
+
        bnd notrack call rax
        bnd notrack call r8
-       bnd notrack jmp rax
-       bnd notrack jmp r8
-
        bnd notrack call QWORD PTR [rax]
        bnd notrack call QWORD PTR [r8]
-       bnd notrack jmp QWORD PTR [rax]
-       bnd notrack jmp QWORD PTR [r8]
-
        bnd notrack call QWORD PTR [eax]
        bnd notrack call QWORD PTR [r8d]
-       bnd notrack jmp QWORD PTR [eax]
-       bnd notrack jmp QWORD PTR [r8d]
 
-       # ds bnd callq *%rax
-       .byte 0x3e
+       # bnd notrack callq *%rax
        .byte 0xf2
+       .byte 0x3e
        .byte 0xff
        .byte 0xd0
 
index cd516826b80d8eb3903aab1f6000fc051ca9146d..95a0f91ce1096642be6fd68f0bf5e23ef0280949 100644 (file)
@@ -2,15 +2,10 @@
 .*:6: Error: expecting indirect branch instruction after `notrack'
 .*:6: Warning: skipping prefixes on this instruction
 .*:7: Error: expecting indirect branch instruction after `notrack'
-.*:7: Warning: skipping prefixes on this instruction
 .*:9: Error: same type of prefix used twice
-.*:10: Error: expecting no other prefixes after `notrack'
-.*:11: Error: expecting no other prefixes after `notrack'
-.*:12: Error: expecting no other prefixes after `notrack'
-.*:15: Error: same type of prefix used twice
-.*:16: Error: expecting no other prefixes after `notrack'
-.*:17: Error: expecting no other prefixes after `notrack'
-.*:18: Error: expecting no other prefixes after `notrack'
+.*:10: Error: same type of prefix used twice
+.*:13: Error: same type of prefix used twice
+.*:14: Error: same type of prefix used twice
 GAS LISTING .*
 
 
@@ -25,17 +20,12 @@ GAS LISTING .*
 [      ]*6[    ]+[0-9A-F]*
 [      ]*7[    ]+\?\?\?\? [0-9A-F]*            notrack jmp foo
 \*\*\*\*  Error: expecting indirect branch instruction after `notrack'
-\*\*\*\*  Warning: skipping prefixes on this instruction
 [      ]*7[    ]+[0-9A-F]*
 [      ]*8[    ]+
 [      ]*9[    ]+fs notrack call \*%rax
 [      ]*10[   ]+notrack fs call \*%rax
-[      ]*11[   ]+notrack bnd call \*%rax
-[      ]*12[   ]+notrack data16 call \*%rax
-[      ]*13[   ]+
-[      ]*14[   ]+\.intel_syntax noprefix
-[      ]*15[   ]+fs notrack call rax
-[      ]*16[   ]+notrack fs call rax
-[      ]*17[   ]+notrack bnd call rax
-[      ]*18[   ]+[\? 0-9A-F]*[         ]+notrack data16 call rax
+[      ]*11[   ]+
+[      ]*12[   ]+\.intel_syntax noprefix
+[      ]*13[   ]+fs notrack call rax
+[      ]*14[   ]+notrack fs call rax
 #pass
index f859a9fb055430addb3173be161c1c8479105805..4f49328ac5b7aa55ec2343f044bcd684cd4860c4 100644 (file)
@@ -8,11 +8,9 @@ _start:
 
        fs notrack call *%rax
        notrack fs call *%rax
-       notrack bnd call *%rax
-       notrack data16 call *%rax
 
        .intel_syntax noprefix
        fs notrack call rax
        notrack fs call rax
-       notrack bnd call rax
-       notrack data16 call rax
+
+       .p2align        4,0
index b8c1586ae444d8efb522619b9aa9a0feb1d0ceeb..fb1fc362bf8db92be2d4ec04dfc695de1bbe568d 100644 (file)
@@ -1,3 +1,9 @@
+2017-09-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * i386-dis.c (last_active_prefix): Removed.
+       (ckprefix): Don't set last_active_prefix.
+       (NOTRACK_Fixup): Don't check last_active_prefix.
+
 2017-08-31  Nick Clifton  <nickc@redhat.com>
 
        * po/fr.po: Updated French translation.
index a3ce08d3084a19a905a0ee26679e5de18baa4fcc..edf534528dda70329c4b0fb6b80c00a37e3dcb65 100644 (file)
@@ -3169,7 +3169,6 @@ static int last_data_prefix;
 static int last_addr_prefix;
 static int last_rex_prefix;
 static int last_seg_prefix;
-static int last_active_prefix;
 static int fwait_prefix;
 /* The active segment register prefix.  */
 static int active_seg_prefix;
@@ -12303,7 +12302,6 @@ ckprefix (void)
   last_addr_prefix = -1;
   last_rex_prefix = -1;
   last_seg_prefix = -1;
-  last_active_prefix = -1;
   fwait_prefix = -1;
   active_seg_prefix = 0;
   for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
@@ -12416,10 +12414,7 @@ ckprefix (void)
          return 1;
        }
       if (*codep != FWAIT_OPCODE)
-       {
-         last_active_prefix = i;
-         all_prefixes[i++] = *codep;
-       }
+       all_prefixes[i++] = *codep;
       rex = newrex;
       codep++;
       length++;
@@ -16820,17 +16815,8 @@ NOTRACK_Fixup (int bytemode ATTRIBUTE_UNUSED,
   if (active_seg_prefix == PREFIX_DS
       && (address_mode != mode_64bit || last_data_prefix < 0))
     {
-      /* NOTRACK prefix is only valid on indirect branch instructions
-         and it must be the last prefix before REX prefix and opcode.
+      /* NOTRACK prefix is only valid on indirect branch instructions.
         NB: DATA prefix is unsupported for Intel64.  */
-      if (last_active_prefix >= 0)
-       {
-         int notrack_prefix = last_active_prefix;
-         if (last_rex_prefix == last_active_prefix)
-           notrack_prefix--;
-         if (all_prefixes[notrack_prefix] != NOTRACK_PREFIX_OPCODE)
-           return;
-       }
       active_seg_prefix = 0;
       all_prefixes[last_seg_prefix] = NOTRACK_PREFIX;
     }
This page took 0.079819 seconds and 4 git commands to generate.