x86: adjust ignored prefix warning for branches
authorJan Beulich <jbeulich@suse.com>
Fri, 27 Dec 2019 08:39:58 +0000 (09:39 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 27 Dec 2019 08:39:58 +0000 (09:39 +0100)
There's no reason to not also issue them in Intel syntax mode, and it
can be quite helpful to mention the actual insn (after all there can be
multiple on a single line).

gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/gas/i386/mpx-inval-1.l
gas/testsuite/gas/i386/notrackbad.l
gas/testsuite/gas/i386/x86-64-notrackbad.l

index 286f018747b0564115c2f24a31bcb6785f7d796b..dc028c9f055fbfc67fd43da101c28ea5ac8dd5b4 100644 (file)
@@ -1,3 +1,12 @@
+2019-12-27  Jan Beulich  <jbeulich@suse.com>
+
+       * config/tc-i386.c (output_branch, output_jump,
+       output_interseg_jump): Also emit skipped prefix warning in Intel
+       syntax mode. Name instruction in the warning text.
+       * testsuite/gas/i386/mpx-inval-1.l,
+       testsuite/gas/i386/notrackbad.l,
+       testsuite/gas/i386/x86-64-notrackbad.l: Adjust expectations.
+
 2019-12-27  Jan Beulich  <jbeulich@suse.com>
 
        * config/tc-i386.c (output_branch): Handle BND prefix the same
index 8e89b00f8d1e89ae79815cb1d02ccc0d44a21b6a..a78aaba6cda8a27f20b9cb2b61230ea5bce47a89 100644 (file)
@@ -7914,8 +7914,8 @@ output_branch (void)
       i.prefixes--;
     }
 
-  if (i.prefixes != 0 && !intel_syntax)
-    as_warn (_("skipping prefixes on this instruction"));
+  if (i.prefixes != 0)
+    as_warn (_("skipping prefixes on `%s'"), i.tm.name);
 
   /* It's always a symbol;  End frag & setup for relax.
      Make sure there is enough room in this frag for the largest
@@ -8057,8 +8057,8 @@ output_jump (void)
       i.prefixes -= 1;
     }
 
-  if (i.prefixes != 0 && !intel_syntax)
-    as_warn (_("skipping prefixes on this instruction"));
+  if (i.prefixes != 0)
+    as_warn (_("skipping prefixes on `%s'"), i.tm.name);
 
   p = frag_more (i.tm.opcode_length + size);
   switch (i.tm.opcode_length)
@@ -8118,8 +8118,8 @@ output_interseg_jump (void)
   if (code16)
     size = 2;
 
-  if (i.prefixes != 0 && !intel_syntax)
-    as_warn (_("skipping prefixes on this instruction"));
+  if (i.prefixes != 0)
+    as_warn (_("skipping prefixes on `%s'"), i.tm.name);
 
   /* 1 opcode; 2 segment; offset  */
   p = frag_more (prefix + 1 + 2 + size);
index b356080cd533da3744477d247023498be58b3c8b..f50fd7f06ca356420bc7ff66ab5e1cfdf15e9a47 100644 (file)
@@ -2,15 +2,17 @@
 .*:6: Error: expecting valid branch instruction after `bnd'
 .*:7: Error: expecting valid branch instruction after `bnd'
 .*:8: Error: expecting valid branch instruction after `bnd'
-.*:8: Warning: skipping prefixes on this instruction
+.*:8: Warning: skipping prefixes on `lcall'
 .*:9: Error: expecting valid branch instruction after `bnd'
-.*:9: Warning: skipping prefixes on this instruction
+.*:9: Warning: skipping prefixes on `ljmp'
 .*:10: Error: expecting valid branch instruction after `bnd'
 .*:11: Error: expecting valid branch instruction after `bnd'
 .*:14: Error: expecting valid branch instruction after `bnd'
 .*:15: Error: expecting valid branch instruction after `bnd'
 .*:16: Error: expecting valid branch instruction after `bnd'
+.*:16: Warning: skipping prefixes on `lcall'
 .*:17: Error: expecting valid branch instruction after `bnd'
+.*:17: Warning: skipping prefixes on `ljmp'
 .*:18: Error: expecting valid branch instruction after `bnd'
 .*:19: Error: expecting valid branch instruction after `bnd'
 GAS LISTING .*
@@ -27,11 +29,11 @@ GAS LISTING .*
 .*  Error: expecting valid branch instruction after `bnd'
 [      ]*8[    ]+\?\?\?\? 9A000000             bnd lcall \$0x1234,\$xxx
 .*  Error: expecting valid branch instruction after `bnd'
-.*  Warning: skipping prefixes on this instruction
+.*  Warning: skipping prefixes on `lcall'
 [      ]*8[    ]+003412
 [      ]*9[    ]+\?\?\?\? EA000000             bnd ljmp \$0x1234,\$xxx
 .*  Error: expecting valid branch instruction after `bnd'
-.*  Warning: skipping prefixes on this instruction
+.*  Warning: skipping prefixes on `ljmp'
 [      ]*9[    ]+003412
 [      ]*10[   ]+\?\?\?\? F2E2E9               bnd loop foo
 .*  Error: expecting valid branch instruction after `bnd'
@@ -45,9 +47,11 @@ GAS LISTING .*
 .*  Error: expecting valid branch instruction after `bnd'
 [      ]*16[   ]+\?\?\?\? 9A000000             bnd lcall 0x1234,xxx
 .*  Error: expecting valid branch instruction after `bnd'
+.*  Warning: skipping prefixes on `lcall'
 [      ]*16[   ]+003412
 [      ]*17[   ]+\?\?\?\? EA000000             bnd ljmp 0x1234,xxx
 .*  Error: expecting valid branch instruction after `bnd'
+.*  Warning: skipping prefixes on `ljmp'
 [      ]*17[   ]+003412
 [      ]*18[   ]+\?\?\?\? F2E2CE               bnd loop foo
 .*  Error: expecting valid branch instruction after `bnd'
index 2271a92bf6ac3cff7bd9b0c9b309bc7ce8459343..75d55536ee1c95e30130a416dbbac0a2665a7f3b 100644 (file)
@@ -1,6 +1,6 @@
 .*: Assembler messages:
 .*:6: Error: expecting indirect branch instruction after `notrack'
-.*:6: Warning: skipping prefixes on this instruction
+.*:6: Warning: skipping prefixes on `call'
 .*:7: Error: expecting indirect branch instruction after `notrack'
 .*:9: Error: same type of prefix used twice
 .*:10: Error: same type of prefix used twice
@@ -16,7 +16,7 @@ GAS LISTING .*
 [      ]*5[    ]+_start:
 [      ]*6[    ]+\?\?\?\? [0-9A-F]*            notrack call foo
 \*\*\*\*  Error: expecting indirect branch instruction after `notrack'
-\*\*\*\*  Warning: skipping prefixes on this instruction
+\*\*\*\*  Warning: skipping prefixes on `call'
 [      ]*6[    ]+[0-9A-F]*
 [      ]*7[    ]+\?\?\?\? [0-9A-F]*            notrack jmp foo
 \*\*\*\*  Error: expecting indirect branch instruction after `notrack'
index 95a0f91ce1096642be6fd68f0bf5e23ef0280949..173b3d1508cf60ee4497a2585a6f1a53e8cffef0 100644 (file)
@@ -1,6 +1,6 @@
 .*: Assembler messages:
 .*:6: Error: expecting indirect branch instruction after `notrack'
-.*:6: Warning: skipping prefixes on this instruction
+.*:6: Warning: skipping prefixes on `call'
 .*:7: Error: expecting indirect branch instruction after `notrack'
 .*:9: Error: same type of prefix used twice
 .*:10: Error: same type of prefix used twice
@@ -16,7 +16,7 @@ GAS LISTING .*
 [      ]*5[    ]+_start:
 [      ]*6[    ]+\?\?\?\? [0-9A-F]*            notrack call foo
 \*\*\*\*  Error: expecting indirect branch instruction after `notrack'
-\*\*\*\*  Warning: skipping prefixes on this instruction
+\*\*\*\*  Warning: skipping prefixes on `call'
 [      ]*6[    ]+[0-9A-F]*
 [      ]*7[    ]+\?\?\?\? [0-9A-F]*            notrack jmp foo
 \*\*\*\*  Error: expecting indirect branch instruction after `notrack'
This page took 0.032848 seconds and 4 git commands to generate.