aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-02-09 22:55:06 +0000
committerRichard Henderson <rth@redhat.com>2002-02-09 22:55:06 +0000
commit543833df4f9aaad303e852c64620716b28f1492d (patch)
treefcb2def48e7f5bd876b6792b02a153c64fbd55be /gas/testsuite
parent77dd1030de31b11a3b774f6f508e4cc952595613 (diff)
downloadgdb-543833df4f9aaad303e852c64620716b28f1492d.zip
gdb-543833df4f9aaad303e852c64620716b28f1492d.tar.gz
gdb-543833df4f9aaad303e852c64620716b28f1492d.tar.bz2
* config/tc-alpha.c (O_samegp): New.
(USER_RELOC_P): Include it. (alpha_reloc_op_tag, debug_exp, find_macro_match): Add it. (md_apply_fix3): Handle BFD_RELOC_ALPHA_BRSGP. (alpha_force_relocation, alpha_fix_adjustable): Likewise. (alpha_validate_fix): New. * config/tc-alpha.h (TC_VALIDATE_FIX): New. * gas/alpha/elf-reloc-5.s, gas/alpha/elf-reloc-5.d: New. * gas/alpha/elf-reloc-6.s, gas/alpha/elf-reloc-6.l: New. * gas/alpha/alpha.exp: Run them.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/alpha/alpha.exp2
-rw-r--r--gas/testsuite/gas/alpha/elf-reloc-5.d28
-rw-r--r--gas/testsuite/gas/alpha/elf-reloc-5.s31
-rw-r--r--gas/testsuite/gas/alpha/elf-reloc-6.l3
-rw-r--r--gas/testsuite/gas/alpha/elf-reloc-6.s31
6 files changed, 101 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 1c5d1de..df5f108 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2002-02-09 Richard Henderson <rth@redhat.com>
+
+ * gas/alpha/elf-reloc-5.s, gas/alpha/elf-reloc-5.d: New.
+ * gas/alpha/elf-reloc-6.s, gas/alpha/elf-reloc-6.l: New.
+ * gas/alpha/alpha.exp: Run them.
+
2002-02-08 Chris Demetriou <cgd@broadcom.com>
* gas/mips/mips.exp: Document (but do not XFAIL) currently-failing
diff --git a/gas/testsuite/gas/alpha/alpha.exp b/gas/testsuite/gas/alpha/alpha.exp
index db16022..89a6334 100644
--- a/gas/testsuite/gas/alpha/alpha.exp
+++ b/gas/testsuite/gas/alpha/alpha.exp
@@ -27,6 +27,8 @@ if { [istarget alpha*-*-*] } then {
run_list_test "elf-reloc-2" ""
run_list_test "elf-reloc-3" ""
run_dump_test "elf-reloc-4"
+ run_dump_test "elf-reloc-5"
+ run_list_test "elf-reloc-6" ""
}
run_dump_test "fp"
diff --git a/gas/testsuite/gas/alpha/elf-reloc-5.d b/gas/testsuite/gas/alpha/elf-reloc-5.d
new file mode 100644
index 0000000..0fd9261
--- /dev/null
+++ b/gas/testsuite/gas/alpha/elf-reloc-5.d
@@ -0,0 +1,28 @@
+#objdump: -dr
+#name: alpha elf-reloc-5
+
+.*: file format elf64-alpha
+
+Disassembly of section \.text:
+
+0*0000000 <_start>:
+ 0: 05 00 e0 c3 br 18 <nopv>
+ 4: 04 00 e0 c3 br 18 <nopv>
+ 8: 04 00 e0 c3 br 1c <stdgp>
+ c: 05 00 e0 c3 br 24 <stdgp\+0x8>
+ 10: 00 00 e0 c3 br 14 <_start\+0x14>
+ 10: BRSGP undef
+ 14: 00 00 e0 c3 br 18 <nopv>
+ 14: BRSGP extern
+
+0*0000018 <nopv>:
+ 18: 1f 04 ff 47 nop
+
+0*000001c <stdgp>:
+ 1c: 00 00 bb 27 ldah gp,0\(t12\)
+ 1c: GPDISP \.text\+0x4
+ 20: 00 00 bd 23 lda gp,0\(gp\)
+ 24: 1f 04 ff 47 nop
+
+0*0000028 <extern>:
+ 28: 1f 04 ff 47 nop
diff --git a/gas/testsuite/gas/alpha/elf-reloc-5.s b/gas/testsuite/gas/alpha/elf-reloc-5.s
new file mode 100644
index 0000000..f8934a5
--- /dev/null
+++ b/gas/testsuite/gas/alpha/elf-reloc-5.s
@@ -0,0 +1,31 @@
+ .text
+ .align 2
+_start:
+ br $31, nopv
+ br $31, nopv !samegp
+ br $31, stdgp
+ br $31, stdgp !samegp
+
+ br $31, undef !samegp
+ br $31, extern !samegp
+
+.ent nopv
+nopv:
+ .prologue 0
+ nop
+.end nopv
+
+.ent stdgp
+stdgp:
+ ldgp $29,0($27)
+ .prologue 1
+ nop
+.end stdgp
+
+.globl extern
+.ent extern
+extern:
+ .prologue 0
+ nop
+.end extern
+
diff --git a/gas/testsuite/gas/alpha/elf-reloc-6.l b/gas/testsuite/gas/alpha/elf-reloc-6.l
new file mode 100644
index 0000000..85ee392
--- /dev/null
+++ b/gas/testsuite/gas/alpha/elf-reloc-6.l
@@ -0,0 +1,3 @@
+.*: Assembler messages:
+.*:8: Error: !samegp reloc against symbol without \.prologue: nopro
+.*:10: Error: !samegp reloc against symbol without \.prologue: <local>
diff --git a/gas/testsuite/gas/alpha/elf-reloc-6.s b/gas/testsuite/gas/alpha/elf-reloc-6.s
new file mode 100644
index 0000000..af8fb1a
--- /dev/null
+++ b/gas/testsuite/gas/alpha/elf-reloc-6.s
@@ -0,0 +1,31 @@
+ br $31, undef
+ br $31, undef !samegp
+ br $31, nopv
+ br $31, nopv !samegp
+ br $31, stdgp
+ br $31, stdgp !samegp
+ br $31, nopro
+ br $31, nopro !samegp
+ br $31, 1f
+ br $31, 1f !samegp
+
+1: nop
+
+.ent nopv
+nopv:
+ .prologue 0
+ nop
+.end nopv
+
+.ent stdgp
+stdgp:
+ ldgp $29,0($27)
+ .prologue 1
+ nop
+.end stdgp
+
+.ent nopro
+nopro:
+ nop
+.end nopro
+