aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorClaudiu Zissulescu <claziss@synopsys.com>2016-09-07 09:47:34 +0200
committerClaudiu Zissulescu <claziss@synopsys.com>2016-09-14 14:04:34 +0200
commit32348c581bf104d46c3fb42a7ff5cefe8ef65f7f (patch)
tree77a4af6b1cd84c5dbda269dc94bb872934351bcf /gas
parentdce084426d75b45ef728425a880d642a604c36a7 (diff)
downloadgdb-32348c581bf104d46c3fb42a7ff5cefe8ef65f7f.zip
gdb-32348c581bf104d46c3fb42a7ff5cefe8ef65f7f.tar.gz
gdb-32348c581bf104d46c3fb42a7ff5cefe8ef65f7f.tar.bz2
[ARC] Fix parsing dtpoff relocation expression.
The assembler accepts dtpoff complex relocation expression like identifier@dtpoff + const. However, it doesn't accept an expression such as identifier@dtpoff@base + const. This patch solves this issue, and adds a number of tests. ld/ 2016-09-14 Claudiu Zissulescu <claziss@synopsys.com> * testsuite/ld-arc/tls-dtpoff.dd: New file. * testsuite/ld-arc/tls-dtpoff.rd: Likewise. * testsuite/ld-arc/tls-dtpoff.s: Likewise. * testsuite/ld-arc/tls-relocs.ld: Likewise. * testsuite/ld-arc/arc.exp: Add new tdpoff test. gas/ 2016-09-14 Claudiu Zissulescu <claziss@synopsys.com> * testsuite/gas/arc/tls-relocs2.d: New file. * testsuite/gas/arc/tls-relocs2.s: Likewise. * config/tc-arc.c (tokenize_arguments): Accept offsets when base is used.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-arc.c2
-rw-r--r--gas/testsuite/gas/arc/tls-relocs2.d10
-rw-r--r--gas/testsuite/gas/arc/tls-relocs2.s12
4 files changed, 30 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 6544175..12fd861 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2016-09-14 Claudiu Zissulescu <claziss@synopsys.com>
+
+ * testsuite/gas/arc/tls-relocs2.d: New file.
+ * testsuite/gas/arc/tls-relocs2.s: Likewise.
+ * config/tc-arc.c (tokenize_arguments): Accept offsets when base
+ is used.
+
2016-09-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/tc-s390.c (s390_parse_cpu): Support alternate arch
diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c
index 4e4dcb3..58adf0b 100644
--- a/gas/config/tc-arc.c
+++ b/gas/config/tc-arc.c
@@ -1157,7 +1157,7 @@ tokenize_arguments (char *str,
restore_line_pointer (c);
tmpE.X_add_number = 0;
}
- else if ((*input_line_pointer != '+')
+ if ((*input_line_pointer != '+')
&& (*input_line_pointer != '-'))
{
tmpE.X_add_number = 0;
diff --git a/gas/testsuite/gas/arc/tls-relocs2.d b/gas/testsuite/gas/arc/tls-relocs2.d
new file mode 100644
index 0000000..e52318f
--- /dev/null
+++ b/gas/testsuite/gas/arc/tls-relocs2.d
@@ -0,0 +1,10 @@
+#as: -mcpu=archs
+#objdump: -dr
+
+.*: +file format .*arc.*
+
+
+Disassembly of section .text:
+
+00000000 <.text>:
+ 0: 70c3 0000 0804 add_s r0,r0,0x804
diff --git a/gas/testsuite/gas/arc/tls-relocs2.s b/gas/testsuite/gas/arc/tls-relocs2.s
new file mode 100644
index 0000000..1f1d045
--- /dev/null
+++ b/gas/testsuite/gas/arc/tls-relocs2.s
@@ -0,0 +1,12 @@
+ .cpu HS
+;;; Test if palette is resolved by the assembler.
+ add_s r0,r0,@palette@dtpoff@.tbss+2048
+
+ .section .tbss,"awT",@nobits
+ .align 4
+ .zero 4
+ .align 4
+ .type palette, @object
+ .size palette, 6144
+palette:
+ .zero 6144