aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@codesourcery.com>2011-05-20 10:10:00 +0000
committerBernd Schmidt <bernds@codesourcery.com>2011-05-20 10:10:00 +0000
commit4a73203297f58dc69d033355f166defe8950ea1c (patch)
tree05243448236dfff3d27a237cb767e562acc5862e /ld
parentb3c8eb43f1e3f7d21851b3d82f9438ec372f9417 (diff)
downloadgdb-4a73203297f58dc69d033355f166defe8950ea1c.zip
gdb-4a73203297f58dc69d033355f166defe8950ea1c.tar.gz
gdb-4a73203297f58dc69d033355f166defe8950ea1c.tar.bz2
ld/testsuite/
* ld-tic6x/pcr-reloc.d: New test. * ld-tic6x/pcr-reloc.s: New test. gas/testsuite/ * gas/tic6x/pcr-relocs.d: New test. * gas/tic6x/pcr-relocs.s: New test. * gas/tic6x/pcr-relocs-undef.d: New test. * gas/tic6x/pcr-relocs-undef.s: New test. * gas/tic6x/reloc-bad-2.s: Update for pcr_offset. * gas/tic6x/reloc-bad-2.l: Update for pcr_offset. bfd/ * elf32-tic6x.c (elf32_tic6x_howto_table): Add entries for R_C6000_PCR_H16 and R_C6000_PCR_L16. (elf32_tic6x_relocate_section): Handle them. gas/ * config/tc-tic6x.c (tic6x_operators): Add "pcr_offset". (tic6x_parse_name): Handle it. (tic6x_fix_new_exp): Handle O_pcr_offset. (tic6x_fix_adjustable): Return 0 for the new relocs. (md_apply_fix): Handle them. (tc_gen_reloc): Likewise. * config/tc-tic6x.h (tic6x_fix_info): Add a fix_subsy member.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog5
-rw-r--r--ld/testsuite/ld-tic6x/pcr-reloc.d39
-rw-r--r--ld/testsuite/ld-tic6x/pcr-reloc.s28
3 files changed, 72 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 356151a..fb47469 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-20 Bernd Schmidt <bernds@codesourcery.com>
+
+ * ld-tic6x/pcr-reloc.d: New test.
+ * ld-tic6x/pcr-reloc.s: New test.
+
2011-05-18 Nick Clifton <nickc@redhat.com>
PR ld/12761
diff --git a/ld/testsuite/ld-tic6x/pcr-reloc.d b/ld/testsuite/ld-tic6x/pcr-reloc.d
new file mode 100644
index 0000000..8c35e04
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/pcr-reloc.d
@@ -0,0 +1,39 @@
+#name: C6X PCR relocations
+#as: -mlittle-endian
+#ld: -melf32_tic6x_le -Tgeneric.ld
+#source: pcr-reloc.s
+#objdump: -dr
+
+.*: *file format elf32-tic6x-le
+
+
+Disassembly of section \.text:
+
+10000000 <[^>]*>:
+10000000:[ \t]+00800264[ \t]+ldw \.D1T1 \*\+a0\(0\),a1
+10000004:[ \t]+00800264[ \t]+ldw \.D1T1 \*\+a0\(0\),a1
+10000008:[ \t]+00800264[ \t]+ldw \.D1T1 \*\+a0\(0\),a1
+
+1000000c <[^>]*>:
+1000000c:[ \t]+004003e2[ \t]+mvc \.S2 pce1,b0
+10000010:[ \t]+01000264[ \t]+ldw \.D1T1 \*\+a0\(0\),a2
+10000014:[ \t]+01001a2a[ \t]+mvk \.S2 52,b2
+10000018:[ \t]+0100006a[ \t]+mvkh \.S2 0,b2
+1000001c:[ \t]+01000a2a[ \t]+mvk \.S2 20,b2
+10000020:[ \t]+0100006a[ \t]+mvkh \.S2 0,b2
+10000024:[ \t]+01001e2a[ \t]+mvk \.S2 60,b2
+10000028:[ \t]+0100006a[ \t]+mvkh \.S2 0,b2
+1000002c:[ \t]+01000e2a[ \t]+mvk \.S2 28,b2
+10000030:[ \t]+0100006a[ \t]+mvkh \.S2 0,b2
+
+10000034 <[^>]*>:
+10000034:[ \t]+00800264[ \t]+ldw \.D1T1 \*\+a0\(0\),a1
+
+10000038 <[^>]*>:
+10000038:[ \t]+004003e2[ \t]+mvc \.S2 pce1,b0
+
+1000003c <[^>]*>:
+1000003c:[ \t]+00800264[ \t]+ldw \.D1T1 \*\+a0\(0\),a1
+10000040:[ \t]+017ff02a[ \t]+mvk \.S2 -32,b2
+10000044:[ \t]+017fffea[ \t]+mvkh \.S2 4294901760,b2
+[ \t]*\.\.\.
diff --git a/ld/testsuite/ld-tic6x/pcr-reloc.s b/ld/testsuite/ld-tic6x/pcr-reloc.s
new file mode 100644
index 0000000..00362ff
--- /dev/null
+++ b/ld/testsuite/ld-tic6x/pcr-reloc.s
@@ -0,0 +1,28 @@
+ .text
+ .align 5
+_start:
+L0:
+ ldw .d1t1 *a0,a1
+ ldw .d1t1 *a0,a1
+ ldw .d1t1 *a0,a1
+L1:
+ MVC .s2 PCE1, b0
+ ldw .d1t1 *a0,a2
+ mvk .s2 $PCR_OFFSET (S0,L1), b2
+ mvkh .s2 $PCR_OFFSET (S0,L1), b2
+ mvk .s2 $PCR_OFFSET (S0,L2), b2
+ mvkh .s2 $PCR_OFFSET (S0,L2), b2
+ mvk .s2 $PCR_OFFSET (S1,L1), b2
+ mvkh .s2 $PCR_OFFSET (S1,L1), b2
+ mvk .s2 $PCR_OFFSET (S1,L2), b2
+ mvkh .s2 $PCR_OFFSET (S1,L2), b2
+
+S0:
+ ldw .d1t1 *a0,a1
+L2:
+ MVC .s2 PCE1, b0
+
+S1:
+ ldw .d1t1 *a0,a1
+ mvkl .s2 $PCR_OFFSET (L0,L2), b2
+ mvkh .s2 $PCR_OFFSET (L0,L2), b2