aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-07-20 11:35:03 +0000
committerNick Clifton <nickc@redhat.com>2005-07-20 11:35:03 +0000
commit157e7bd196cc83495a38f37b1528d2505d554b2e (patch)
tree4c78dde5569e0909da71fd5c2970c505d6a7bf4c /gas/testsuite
parent6c76e4a1c9743ba5ea19e5b11f71e1a39e73d291 (diff)
downloadgdb-157e7bd196cc83495a38f37b1528d2505d554b2e.zip
gdb-157e7bd196cc83495a38f37b1528d2505d554b2e.tar.gz
gdb-157e7bd196cc83495a38f37b1528d2505d554b2e.tar.bz2
Add support for a 32bit PC relative reloc
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog10
-rw-r--r--gas/testsuite/gas/m32r/error.exp1
-rw-r--r--gas/testsuite/gas/m32r/rel32-err.s10
-rw-r--r--gas/testsuite/gas/m32r/rel32-pic.d13
-rw-r--r--gas/testsuite/gas/m32r/rel32-pic.s12
-rw-r--r--gas/testsuite/gas/m32r/rel32.d13
-rw-r--r--gas/testsuite/gas/m32r/rel32.exp6
-rw-r--r--gas/testsuite/gas/m32r/rel32.s12
8 files changed, 77 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 6added2..c8176e4 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,13 @@
+2005-07-20 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+ * gas/m32r/rel32.exp: New file.
+ * gas/m32r/rel32.s: New file.
+ * gas/m32r/rel32.d: New file.
+ * gas/m32r/rel32-pic.s: New file.
+ * gas/m32r/rel32-pic.d: New file.
+ * gas/m32r/rel32-err.s: New file.
+ * gas/m32r/error.exp: Added rel32-err.
+
2005-07-18 H.J. Lu <hongjiu.lu@intel.com>
* gas/i386/i386.exp: Add suffix.
diff --git a/gas/testsuite/gas/m32r/error.exp b/gas/testsuite/gas/m32r/error.exp
index 17807c1..11c15d5 100644
--- a/gas/testsuite/gas/m32r/error.exp
+++ b/gas/testsuite/gas/m32r/error.exp
@@ -10,6 +10,7 @@ if [istarget m32r-*-*] {
dg-runtest "$srcdir/$subdir/interfere.s" "" ""
dg-runtest "$srcdir/$subdir/outofrange.s" "" ""
dg-runtest "$srcdir/$subdir/parallel.s" "" ""
+ dg-runtest "$srcdir/$subdir/rel32-err.s" "" ""
dg-finish
diff --git a/gas/testsuite/gas/m32r/rel32-err.s b/gas/testsuite/gas/m32r/rel32-err.s
new file mode 100644
index 0000000..fe8784e
--- /dev/null
+++ b/gas/testsuite/gas/m32r/rel32-err.s
@@ -0,0 +1,10 @@
+
+; { dg-do assemble { target m32r-*-* } }
+
+ .text
+ nop
+ nop
+bar:
+ .section .text2
+ .2byte bar - . ; { dg-error "can't export reloc type 11" }
+ .byte bar - . ; { dg-error "can\'t export reloc type 7" }
diff --git a/gas/testsuite/gas/m32r/rel32-pic.d b/gas/testsuite/gas/m32r/rel32-pic.d
new file mode 100644
index 0000000..9a27fe9
--- /dev/null
+++ b/gas/testsuite/gas/m32r/rel32-pic.d
@@ -0,0 +1,13 @@
+#as: -KPIC
+#objdump: -r
+#name: rel32-pic
+
+.*: +file format .*
+
+RELOCATION RECORDS FOR \[.text2\]:
+OFFSET TYPE VALUE
+00000000 R_M32R_REL32 .text\+0x00000004
+00000008 R_M32R_REL32 .text\+0x00000008
+0000000c R_M32R_REL32 .text
+
+
diff --git a/gas/testsuite/gas/m32r/rel32-pic.s b/gas/testsuite/gas/m32r/rel32-pic.s
new file mode 100644
index 0000000..488c3ea
--- /dev/null
+++ b/gas/testsuite/gas/m32r/rel32-pic.s
@@ -0,0 +1,12 @@
+ .text
+ nop
+ nop
+bar:
+ .section .text2
+ .4byte bar - .
+label:
+ nop
+ nop
+ .4byte bar - label
+ .4byte bar - label2
+label2:
diff --git a/gas/testsuite/gas/m32r/rel32.d b/gas/testsuite/gas/m32r/rel32.d
new file mode 100644
index 0000000..abfe136
--- /dev/null
+++ b/gas/testsuite/gas/m32r/rel32.d
@@ -0,0 +1,13 @@
+#as:
+#objdump: -r
+#name: rel32
+
+.*: +file format .*
+
+RELOCATION RECORDS FOR \[.text2\]:
+OFFSET TYPE VALUE
+00000000 R_M32R_REL32 .text\+0x00000004
+00000008 R_M32R_REL32 .text\+0x00000008
+0000000c R_M32R_REL32 .text
+
+
diff --git a/gas/testsuite/gas/m32r/rel32.exp b/gas/testsuite/gas/m32r/rel32.exp
new file mode 100644
index 0000000..1866217
--- /dev/null
+++ b/gas/testsuite/gas/m32r/rel32.exp
@@ -0,0 +1,6 @@
+# M32R R_M32R_REL32 testcases
+
+if [istarget m32r*-*-*] {
+ run_dump_test "rel32"
+ run_dump_test "rel32-pic"
+}
diff --git a/gas/testsuite/gas/m32r/rel32.s b/gas/testsuite/gas/m32r/rel32.s
new file mode 100644
index 0000000..488c3ea
--- /dev/null
+++ b/gas/testsuite/gas/m32r/rel32.s
@@ -0,0 +1,12 @@
+ .text
+ nop
+ nop
+bar:
+ .section .text2
+ .4byte bar - .
+label:
+ nop
+ nop
+ .4byte bar - label
+ .4byte bar - label2
+label2: