+2017-09-21 James Cowgill <James.Cowgill@imgtec.com>
+
+ PR gas/21762
+ * config/tc-mips.c (s_mips_stab): Insert call to
+ file_mips_check_options.
+ * testsuite/gas/mips/micromips@stabs-symbol-type.d: New test.
+ * testsuite/gas/mips/mips.exp: Run the new tests.
+ * testsuite/gas/mips/mips16@stabs-symbol-type.d: New test.
+ * testsuite/gas/mips/stabs-symbol-type.d: New test.
+ * testsuite/gas/mips/stabs-symbol-type.s: New test source.
+
2017-09-21 Alan Modra <amodra@gmail.com>
* config/tc-ppc.h (EH_FRAME_ALIGNMENT): Define.
static void
s_mips_stab (int type)
{
+ file_mips_check_options ();
mips_mark_labels ();
s_stab (type);
}
--- /dev/null
+#PROG: readelf
+#readelf: -s
+#name: MIPS .stab symbol type
+#as: -32
+#source: stabs-symbol-type.s
+
+# Verify the symbol type when emitting a .stab directive.
+# In this case, it should be MICROMIPS.
+#...
+ *[0-9]+: +[0-9]+ +[0-9]+ +NOTYPE +LOCAL +DEFAULT +\[MICROMIPS\] +[0-9]+ foo
+#pass
run_dump_test "org-11"
run_dump_test "org-12"
+ run_dump_test_arches "stabs-symbol-type" [mips_arch_list_all]
+
run_dump_test_arches "r6" [mips_arch_list_matching mips32r6]
if $has_newabi {
run_dump_test_arches "r6-n32" [mips_arch_list_matching mips64r6]
--- /dev/null
+#PROG: readelf
+#readelf: -s
+#name: MIPS .stab symbol type
+#as: -32
+#source: stabs-symbol-type.s
+
+# Verify the symbol type when emitting a .stab directive.
+# In this case, it should be MIPS16.
+#...
+ *[0-9]+: +[0-9]+ +[0-9]+ +NOTYPE +LOCAL +DEFAULT +\[MIPS16\] +[0-9]+ foo
+#pass
--- /dev/null
+#PROG: readelf
+#readelf: -s
+#name: MIPS .stab symbol type
+#as: -32
+
+# Verify the symbol type when emitting a .stab directive.
+# In this case, it should not be MIPS16 or MICROMIPS.
+#...
+ *[0-9]+: +[0-9]+ +[0-9]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ foo
+#pass
--- /dev/null
+ .text
+foo:
+ .stabd 0, 0, 0