aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2004-12-16 16:56:04 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2004-12-16 16:56:04 +0000
commit1e50d24d553250622687bbc21027e8bfdb31870f (patch)
treec66a5fff096c41f49cd675874937fafe98209022 /gas/testsuite
parent2fbd2a87e2cd23eba4eae6341661ce0149be08b1 (diff)
downloadgdb-1e50d24d553250622687bbc21027e8bfdb31870f.zip
gdb-1e50d24d553250622687bbc21027e8bfdb31870f.tar.gz
gdb-1e50d24d553250622687bbc21027e8bfdb31870f.tar.bz2
include/elf/
* v850.h (R_V850_LO16_SPLIT_OFFSET): New reloc. bfd/ * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type. * elf32-v850.c (v850_elf_howto_table): Add entry for R_V850_LO16_SPLIT_OFFSET. (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET. (v850_elf_perform_lo16_relocation): New function, extracted from... (v850_elf_perform_relocation): ...here. Use it to handle R_V850_LO16_SPLIT_OFFSET. (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle R_V850_LO16_SPLIT_OFFSET. * libbfd.h, bfd-in2.h: Regenerate. gas/ * config/tc-v850.c (handle_lo16): New function. (v850_reloc_prefix): Use it to check lo(). (md_assemble, md_apply_fix3): Handle BFD_RELOC_V850_LO16_SPLIT_OFFSET. gas/testsuite/ * gas/v850/split-lo16.{s,d}: New test. * gas/v850/v850.exp: Run it. ld/testsuite/ * ld-v850: New directory.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/v850/basic.exp1
-rw-r--r--gas/testsuite/gas/v850/split-lo16.d16
-rw-r--r--gas/testsuite/gas/v850/split-lo16.s7
4 files changed, 29 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 56c056e..3b19181 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2004-12-16 Richard Sandiford <rsandifo@redhat.com>
+
+ * gas/v850/split-lo16.{s,d}: New test.
+ * gas/v850/v850.exp: Run it.
+
2004-12-15 Jan Beulich <jbeulich@novell.com>
* gas/elf/section5.[els]: New.
diff --git a/gas/testsuite/gas/v850/basic.exp b/gas/testsuite/gas/v850/basic.exp
index e3b0713..1cf251e 100644
--- a/gas/testsuite/gas/v850/basic.exp
+++ b/gas/testsuite/gas/v850/basic.exp
@@ -436,4 +436,5 @@ if [istarget v850*-*-*] then {
gas_test_error "range.s" "-mwarn-signed-overflow" "Check for range error on byte load/store"
run_dump_test "v850e1"
+ run_dump_test "split-lo16"
}
diff --git a/gas/testsuite/gas/v850/split-lo16.d b/gas/testsuite/gas/v850/split-lo16.d
new file mode 100644
index 0000000..9503ac9
--- /dev/null
+++ b/gas/testsuite/gas/v850/split-lo16.d
@@ -0,0 +1,16 @@
+#objdump: -dr
+#name: V850E split LO16 tests
+#as: -mv850e
+#...
+00000000 <.*>:
+ 0: 40 0e 00 00 movhi 0, r0, r1
+ 2: R_V850_HI16_S foo
+ 4: 01 16 00 00 addi 0, r1, r2
+ 6: R_V850_LO16 foo
+ 8: 01 17 00 00 ld\.b 0\[r1\],r2
+ a: R_V850_LO16 foo
+ c: 81 17 01 00 ld\.bu 0\[r1\],r2
+ c: R_V850_LO16_SPLIT_OFFSET foo
+ 10: a1 17 45 23 ld\.bu 9029\[r1\],r2
+ 14: 81 17 57 34 ld\.bu 13398\[r1\],r2
+#pass
diff --git a/gas/testsuite/gas/v850/split-lo16.s b/gas/testsuite/gas/v850/split-lo16.s
new file mode 100644
index 0000000..fc3afd1
--- /dev/null
+++ b/gas/testsuite/gas/v850/split-lo16.s
@@ -0,0 +1,7 @@
+ movhi hi(foo),r0,r1
+ addi lo(foo),r1,r2
+ ld.b lo(foo),r1,r2
+ ld.bu lo(foo),r1,r2
+
+ ld.bu lo(0x12345),r1,r2
+ ld.bu lo(0x123456),r1,r2