Pseudo prefixes must be used on an instruction. Issue an error when
pseudo prefix is used without instruction.
PR gas/22623
* gas/config/tc-i386.c (output_insn): Check pseudo prefix
without instruction.
* testsuite/gas/i386/i386.exp: Run inval-pseudo.
* testsuite/gas/i386/inval-pseudo.l: New file.
* testsuite/gas/i386/inval-pseudo.s: Likewise.
+2017-12-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/22623
+ * gas/config/tc-i386.c (output_insn): Check pseudo prefix
+ without instruction.
+ * testsuite/gas/i386/i386.exp: Run inval-pseudo.
+ * testsuite/gas/i386/inval-pseudo.l: New file.
+ * testsuite/gas/i386/inval-pseudo.s: Likewise.
+
2017-12-15 Jan Beulich <jbeulich@suse.com>
* config/tc-i386.c (match_template): Add missing ! to
break;
case 1:
break;
+ case 0:
+ /* Check for pseudo prefixes. */
+ as_bad_where (insn_start_frag->fr_file,
+ insn_start_frag->fr_line,
+ _("pseudo prefix without instruction"));
+ return;
default:
abort ();
}
run_list_test "notrackbad" "-al"
run_dump_test "align-1a"
run_dump_test "align-1b"
+ run_list_test "inval-pseudo" "-al"
# These tests require support for 8 and 16 bit relocs,
# so we only run them for ELF and COFF targets.
--- /dev/null
+.*: Assembler messages:
+.*:3: Error: .*
+GAS LISTING .*
+
+
+[ ]*1[ ]+\.text
+[ ]*2[ ]+\?\?\?\? 90 nop
+[ ]*3[ ]+\{disp32\}
+[ ]*4[ ]+\?\?\?\? 90 nop
+[ ]*5[ ]+\?\?\?\? 00000000 \.p2align 4,0
+#...
--- /dev/null
+ .text
+ nop
+ {disp32}
+ nop
+ .p2align 4,0