aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-09-28 00:41:27 +0000
committerDaniel Jacobowitz <drow@false.org>2002-09-28 00:41:27 +0000
commit8ba4dac030f0e32ab1589cf58e1dff856084bee9 (patch)
treeb269deafc59dc21ce9b9351e01e0ca422b858cb2 /gas/testsuite
parent613d38b830681277708706b18fec7b327a5d0216 (diff)
downloadgdb-8ba4dac030f0e32ab1589cf58e1dff856084bee9.zip
gdb-8ba4dac030f0e32ab1589cf58e1dff856084bee9.tar.gz
gdb-8ba4dac030f0e32ab1589cf58e1dff856084bee9.tar.bz2
2002-09-27 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* config/tc-sh.c (sh_force_relocation): Return 0 for some PC relative relocations when not relaxing. * testsuite/gas/sh/pcrel2.s: New. * testsuite/gas/sh/pcrel2.d: New. * testsuite/gas/sh/basic.exp: Add pcrel2 test.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/sh/basic.exp2
-rw-r--r--gas/testsuite/gas/sh/pcrel2.d5
-rw-r--r--gas/testsuite/gas/sh/pcrel2.s17
4 files changed, 30 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 11566be..1336d7d 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2002-09-27 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * gas/sh/pcrel2.s: New.
+ * gas/sh/pcrel2.d: New.
+ * gas/sh/basic.exp: Add pcrel2 test.
+
2002-09-27 Jason Thorpe <thorpej@wasabisystems.com>
* gas/vax/elf-rel.[ds]: New test.
diff --git a/gas/testsuite/gas/sh/basic.exp b/gas/testsuite/gas/sh/basic.exp
index b3815c1..dade86a 100644
--- a/gas/testsuite/gas/sh/basic.exp
+++ b/gas/testsuite/gas/sh/basic.exp
@@ -129,6 +129,8 @@ if [istarget sh*-*-*] then {
run_dump_test "dsp"
run_dump_test "pcrel"
+
+ run_dump_test "pcrel2"
}
if {[istarget sh*-*elf] || [istarget sh*-linux*]} then {
diff --git a/gas/testsuite/gas/sh/pcrel2.d b/gas/testsuite/gas/sh/pcrel2.d
new file mode 100644
index 0000000..9b363af
--- /dev/null
+++ b/gas/testsuite/gas/sh/pcrel2.d
@@ -0,0 +1,5 @@
+#as: -big
+#objdump: -r
+#name: PC-relative loads
+
+.*: file format .*sh.*
diff --git a/gas/testsuite/gas/sh/pcrel2.s b/gas/testsuite/gas/sh/pcrel2.s
new file mode 100644
index 0000000..5a34111
--- /dev/null
+++ b/gas/testsuite/gas/sh/pcrel2.s
@@ -0,0 +1,17 @@
+ .text
+
+ .p2align 2
+code:
+ bf foo
+ mov.l bar, r0
+ mov.w bar, r0
+ .globl foo
+foo:
+ bra foo
+ nop
+ .align 2
+ .globl bar
+bar:
+ .long . - foo
+ .word . - foo
+ .byte . - foo