aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Hunt <hunt@redhat.com>1997-03-27 08:44:55 +0000
committerMartin Hunt <hunt@redhat.com>1997-03-27 08:44:55 +0000
commit8c0714dc0d7d62dff6df6f60b3411b4386ac5a99 (patch)
treec5f3c19fbad6ee65a53a9579ac3efa39aa8812a1
parente35ed894f7287dacd76215965b8edbcad3b3b345 (diff)
downloadbinutils-8c0714dc0d7d62dff6df6f60b3411b4386ac5a99.zip
binutils-8c0714dc0d7d62dff6df6f60b3411b4386ac5a99.tar.gz
binutils-8c0714dc0d7d62dff6df6f60b3411b4386ac5a99.tar.bz2
Thu Mar 27 00:42:28 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
* d30.exp: Add test case reloc. * reloc.[sd]: New files to test relocations.
-rw-r--r--gas/testsuite/gas/d30v/reloc.d39
-rw-r--r--gas/testsuite/gas/d30v/reloc.s25
2 files changed, 64 insertions, 0 deletions
diff --git a/gas/testsuite/gas/d30v/reloc.d b/gas/testsuite/gas/d30v/reloc.d
new file mode 100644
index 0000000..78a966b
--- /dev/null
+++ b/gas/testsuite/gas/d30v/reloc.d
@@ -0,0 +1,39 @@
+#objdump: -dr
+#name: D30V relocations
+
+.*: +file format elf32-d30v
+
+Disassembly of section .text:
+
+00000000 <start>:
+ 0: 88082000 80000028 add r2, 0, 0x28
+ 0: R_D30V_32 .text
+ 8: 88084000 80000000 add r4, 0, 0x0
+ 8: R_D30V_32 .data
+ 10: 88084000 80000006 add r4, 0, 0x6
+ 10: R_D30V_32 .data
+ 18: 88084000 80000000 add r4, 0, 0x0
+ 18: R_D30V_32 unk
+ 20: 80080000 80000018 bra 38 <cont>
+
+00000028 <hello>:
+ 28: 48656c6c 6f20576f .long 0x48656c6c || .long 0x6f20576f
+ 30: 726c640a 00000000 .long 0x726c640a || bra 0
+
+00000038 <cont>:
+ 38: 80180000 80000048 jmp 48 <cont2>
+ 38: R_D30V_32 .text
+ 40: 088020c0 00f00000 abs r2, r3 || nop
+
+00000048 <cont2>:
+ 48: 000bfff7 00f00000 bra 0 <start> || nop
+ 50: 00180000 00f00000 jmp 0 <start> || nop
+ 50: R_D30V_21 .text
+ 58: 000bfff5 80180000 bra 0 <start> -> jmp 0 <start>
+ 5c: R_D30V_21 .text
+ 60: 00180000 800bfff4 jmp 0 <start> -> bra 0 <start>
+ 60: R_D30V_21 .text
+ 68: 80080000 80000000 bra 68 <cont2\+20>
+ 68: R_D30V_32_PCREL unknown
+ 70: 80180000 80000000 jmp 0 <start>
+ 70: R_D30V_32 unknown
diff --git a/gas/testsuite/gas/d30v/reloc.s b/gas/testsuite/gas/d30v/reloc.s
new file mode 100644
index 0000000..6784aed
--- /dev/null
+++ b/gas/testsuite/gas/d30v/reloc.s
@@ -0,0 +1,25 @@
+ .text
+start:
+ add r2, r0, hello
+ add r4, r0, bar
+ add r4, r0, bar2
+ add r4, r0, unk
+ bra cont
+hello: .ascii "Hello World\n"
+ .align 3
+cont: jmp cont2
+ abs r2,r3
+cont2:
+ bra start || nop
+ jmp start || nop
+ bra start
+ jmp start
+ jmp start
+ bra start
+ bra unknown
+ jmp unknown
+
+ .data
+bar: .asciz "XYZZY"
+bar2: .long 0xdeadbeef
+ \ No newline at end of file