aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-04-01 08:22:47 +0000
committerNick Clifton <nickc@redhat.com>2004-04-01 08:22:47 +0000
commita7844384e8a2fc5db1a82c63ba6460e87f735a28 (patch)
tree673c2dfa6ba6d2b2815531158027615d4053e2b9 /gas/testsuite
parentfe046a1715e355f086a3f7a5b8efbfe11c9ba902 (diff)
downloadgdb-a7844384e8a2fc5db1a82c63ba6460e87f735a28.zip
gdb-a7844384e8a2fc5db1a82c63ba6460e87f735a28.tar.gz
gdb-a7844384e8a2fc5db1a82c63ba6460e87f735a28.tar.bz2
Correctly emit lo16 relocs for elf-dlx target, fixing bogus range checking bug.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog11
-rw-r--r--gas/testsuite/gas/dlx/alltests.exp1
-rw-r--r--gas/testsuite/gas/dlx/itype.d2
-rw-r--r--gas/testsuite/gas/dlx/lhi.d6
-rw-r--r--gas/testsuite/gas/dlx/lohi.d18
-rw-r--r--gas/testsuite/gas/dlx/lohi.s9
6 files changed, 43 insertions, 4 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index c11a82c..907a2e8 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,14 @@
+2004-04-01 Dave Korn <dk@artimi.com>
+
+ * gas/dlx/alltests.exp: Execute new lohi test.
+ * gas/dlx/lohi.s: New test for spurious lo16/hi16
+ reloc overflow checking.
+ * gas/dlx/lohi.d: New file: expected output.
+ * gas/dlx/lhi.d: Updated to properly expect lo16
+ relocations where asked for.
+ * gas/dlx/itype.d: Likewise.
+ * gas/dlx/lhi.d: Corrected cut+paste error in test name.
+
2004-03-30 Stan Shebs <shebs@apple.com>
* gas/macros/macros.exp: Remove mention of MPW config.
diff --git a/gas/testsuite/gas/dlx/alltests.exp b/gas/testsuite/gas/dlx/alltests.exp
index 003448b..cee7f35 100644
--- a/gas/testsuite/gas/dlx/alltests.exp
+++ b/gas/testsuite/gas/dlx/alltests.exp
@@ -5,6 +5,7 @@ if [istarget dlx*-*-*] {
run_dump_test "itype"
run_dump_test "lhi"
run_dump_test "load"
+ run_dump_test "lohi"
run_dump_test "rtype"
run_dump_test "store"
}
diff --git a/gas/testsuite/gas/dlx/itype.d b/gas/testsuite/gas/dlx/itype.d
index 845ae41..1b8e92b 100644
--- a/gas/testsuite/gas/dlx/itype.d
+++ b/gas/testsuite/gas/dlx/itype.d
@@ -16,7 +16,7 @@ Disassembly of section .text:
12: R_DLX_RELOC_16 .text
14: 35 4c 00 78 ori r12,r10,0x0078
18: 39 af 00 00 xori r15,r13,0x0000
- 1a: R_DLX_RELOC_16 .text
+ 1a: R_DLX_RELOC_16_LO .text
1c: da 30 00 1c slli r16,r17,0x001c
1e: R_DLX_RELOC_16 .text
20: e2 93 00 0f srai r19,r20,0x000f
diff --git a/gas/testsuite/gas/dlx/lhi.d b/gas/testsuite/gas/dlx/lhi.d
index db3b35d..e855129 100644
--- a/gas/testsuite/gas/dlx/lhi.d
+++ b/gas/testsuite/gas/dlx/lhi.d
@@ -1,6 +1,6 @@
#as:
#objdump: -dr
-#name: itype
+#name: lhi
.*: +file format .*
@@ -11,7 +11,7 @@ Disassembly of section .text:
4: 3c 03 00 00 lhi r3,0x0000
6: R_DLX_RELOC_16_HI .text
8: 3c 04 00 00 lhi r4,0x0000
- a: R_DLX_RELOC_16 .text
+ a: R_DLX_RELOC_16_LO .text
c: 3c 04 ff fb lhi r4,0xfffb
e: R_DLX_RELOC_16 .text
10: 3c 04 00 0c lhi r4,0x000c
@@ -19,5 +19,5 @@ Disassembly of section .text:
18: 20 04 00 00 addi r4,r0,0x0000
1a: R_DLX_RELOC_16_HI .text
1c: 34 84 00 18 ori r4,r4,0x0018
- 1e: R_DLX_RELOC_16 .text
+ 1e: R_DLX_RELOC_16_LO .text
20: 20 64 00 00 addi r4,r3,0x0000
diff --git a/gas/testsuite/gas/dlx/lohi.d b/gas/testsuite/gas/dlx/lohi.d
new file mode 100644
index 0000000..f97ef35
--- /dev/null
+++ b/gas/testsuite/gas/dlx/lohi.d
@@ -0,0 +1,18 @@
+#as:
+#objdump: -dr
+#name: lohi
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+00000000 <.text>:
+ 0: 00 00 00 00 nop
+ 4: 3c 01 00 03 lhi r1,0x0003
+ 6: R_DLX_RELOC_16_HI .text
+ 8: 34 01 0d 44 ori r1,r0,0x0d44
+ a: R_DLX_RELOC_16_LO .text
+ c: 3c 01 0b eb lhi r1,0x0beb
+ e: R_DLX_RELOC_16_HI .text
+ 10: 34 01 c2 04 ori r1,r0,0xc204
+ 12: R_DLX_RELOC_16_LO .text
diff --git a/gas/testsuite/gas/dlx/lohi.s b/gas/testsuite/gas/dlx/lohi.s
new file mode 100644
index 0000000..f88ad44
--- /dev/null
+++ b/gas/testsuite/gas/dlx/lohi.s
@@ -0,0 +1,9 @@
+ .text
+ .align 2
+ nop
+.L1:
+ lhi r1,%hi(.L1 + 200000)
+ ori r1,r0,%lo(.L1 + 200000)
+ lhi r1,%hi(.L1 + 200000000)
+ ori r1,r0,%lo(.L1 + 200000000)
+ .end