1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
Upstream-Status: Backport
From e45a3a5695408d472e8f0ca6c21eb03e5fd42817 Mon Sep 17 00:00:00 2001
From: Richard Sandiford <rsandifo@nildram.co.uk>
Date: Sun, 8 Jan 2012 12:34:30 +0000
Subject: [PATCH 052/262] gas/ * 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 | 4 ++++
gas/config/tc-mips.c | 1 +
gas/testsuite/ChangeLog | 5 +++++
gas/testsuite/gas/mips/mips.exp | 1 +
gas/testsuite/gas/mips/tls-relw.d | 8 ++++++++
gas/testsuite/gas/mips/tls-relw.s | 12 ++++++++++++
6 files changed, 31 insertions(+)
create mode 100644 gas/testsuite/gas/mips/tls-relw.d
create mode 100644 gas/testsuite/gas/mips/tls-relw.s
2012-01-08 Richard Sandiford <rdsandiford@googlemail.com>
* config/tc-mips.c (s_tls_rel_directive): Call mips_clear_insn_labels.
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 0fb3a6e..5324450 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -16591,6 +16591,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. */
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -878,6 +878,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
index 0000000..bc13b43
--- /dev/null
+++ b/gas/testsuite/gas/mips/tls-relw.d
@@ -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
index 0000000..6890685
--- /dev/null
+++ b/gas/testsuite/gas/mips/tls-relw.s
@@ -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
--
1.7.9.5
|