+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
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
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)
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);
.*: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 .*
.* 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'
.* 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'
.*: 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
[ ]*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'
.*: 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
[ ]*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'