gas/
authorRichard Sandiford <rdsandiford@googlemail.com>
Sun, 8 Jan 2012 12:33:54 +0000 (12:33 +0000)
committerRichard Sandiford <rdsandiford@googlemail.com>
Sun, 8 Jan 2012 12:33:54 +0000 (12:33 +0000)
* config/tc-mips.c (s_tls_rel_directive): Call mips_clear_insn_labels.

gas/testsuite/
* gas/mips/tls-relw.s, gas/mips/tls-relw.d: New test.
* gas/mips/mips.exp: Run it.

gas/ChangeLog
gas/config/tc-mips.c
gas/testsuite/ChangeLog
gas/testsuite/gas/mips/mips.exp
gas/testsuite/gas/mips/tls-relw.d [new file with mode: 0644]
gas/testsuite/gas/mips/tls-relw.s [new file with mode: 0644]

index 9f9d5a082522f84b9d6c7e131130778f896587ef..c90543977b172049b045f5199afcb4f19909f71a 100644 (file)
@@ -1,3 +1,7 @@
+2012-01-08  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * config/tc-mips.c (s_tls_rel_directive): Call mips_clear_insn_labels.
+
 2012-01-08  Andrew Pinski  <andrew.pinski@caviumnetworks.com>
            Richard Sandiford  <rdsandiford@googlemail.com>
 
index 842d8906022e31dd066f99e3409cfdd30748ebdf..f23835a3cf642351afb258565c2f67c39be36e46 100644 (file)
@@ -16630,6 +16630,7 @@ s_tls_rel_directive (const size_t bytes, const char *dirstr,
   md_number_to_chars (p, 0, bytes);
   fix_new_exp (frag_now, p - frag_now->fr_literal, bytes, &ex, FALSE, rtype);
   demand_empty_rest_of_line ();
+  mips_clear_insn_labels ();
 }
 
 /* Handle .dtprelword.  */
index e8075e6d9df9445b987fafa50b7cb4c2858f0692..c638cdc19a5e023f45408a80c5e11dbd1619903a 100644 (file)
@@ -1,3 +1,8 @@
+2012-01-08  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * gas/mips/tls-relw.s, gas/mips/tls-relw.d: New test.
+       * gas/mips/mips.exp: Run it.
+
 2012-01-08  Richard Sandiford  <rdsandiford@googlemail.com>
 
        * gas/mips/align3.s, gas/mips/align3.d: New testcase.
index 597c572dd5fd9ce3691f1af289199ae7e6ac1b50..92de0faabd1ed1e23fd4711e0ffaee4daa9c0c1a 100644 (file)
@@ -913,6 +913,7 @@ if { [istarget mips*-*-vxworks*] } {
 
        run_list_test "tls-ill" "-32"
        run_dump_test "tls-o32"
+       run_dump_test "tls-relw"
        run_dump_test "jalr2"
 
        run_dump_test_arches "aent"     [mips_arch_list_matching mips1]
diff --git a/gas/testsuite/gas/mips/tls-relw.d b/gas/testsuite/gas/mips/tls-relw.d
new file mode 100644 (file)
index 0000000..bc13b43
--- /dev/null
@@ -0,0 +1,8 @@
+# as: -EB
+# objdump: -sj.data
+
+.*
+
+Contents of section \.data:
+ 0000 00000001 00000000 00000002 00000004  ................
+ 0010 00000000 00000003 00000010 00000000  ................
diff --git a/gas/testsuite/gas/mips/tls-relw.s b/gas/testsuite/gas/mips/tls-relw.s
new file mode 100644 (file)
index 0000000..6890685
--- /dev/null
@@ -0,0 +1,12 @@
+       .data
+start:
+       .word   1
+a:
+       .tprelword t1
+       .word   2
+       .word   a-start
+b:
+       .dtprelword t2
+       .word   3
+       .word   b-start
+       .word   0