aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>1998-08-31 19:49:48 +0000
committerRichard Henderson <rth@redhat.com>1998-08-31 19:49:48 +0000
commit9ea48b423d6a7eabaab026a1175da5346f8c2d29 (patch)
tree7405f7cfc65687a0765ff0f181cb96bd3bcefd98 /gas/testsuite
parent7892a56c165960e53b6b9d9b8ad88148532aee8c (diff)
downloadgdb-9ea48b423d6a7eabaab026a1175da5346f8c2d29.zip
gdb-9ea48b423d6a7eabaab026a1175da5346f8c2d29.tar.gz
gdb-9ea48b423d6a7eabaab026a1175da5346f8c2d29.tar.bz2
* gas/vtable/vtable.exp: New.
* gas/vtable/{entry0.s,entry0.d}: New. * gas/vtable/{entry1.s,entry1.d}: New. * gas/vtable/{inherit0.s,inherit0.d}: New. * gas/vtable/{inherit1.s,inherit1.l}: New.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog8
-rw-r--r--gas/testsuite/gas/vtable/entry0.d10
-rw-r--r--gas/testsuite/gas/vtable/entry0.s2
-rw-r--r--gas/testsuite/gas/vtable/entry1.d10
-rw-r--r--gas/testsuite/gas/vtable/entry1.s2
-rw-r--r--gas/testsuite/gas/vtable/inherit0.d10
-rw-r--r--gas/testsuite/gas/vtable/inherit0.s13
-rw-r--r--gas/testsuite/gas/vtable/inherit1.l6
-rw-r--r--gas/testsuite/gas/vtable/inherit1.s1
-rw-r--r--gas/testsuite/gas/vtable/vtable.exp33
10 files changed, 95 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 9b21525..e211b70 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+Mon Aug 31 12:45:49 1998 Richard Henderson <rth@cygnus.com>
+
+ * gas/vtable/vtable.exp: New.
+ * gas/vtable/{entry0.s,entry0.d}: New.
+ * gas/vtable/{entry1.s,entry1.d}: New.
+ * gas/vtable/{inherit0.s,inherit0.d}: New.
+ * gas/vtable/{inherit1.s,inherit1.l}: New.
+
Thu Aug 20 23:18:06 1998 Ian Lance Taylor <ian@cygnus.com>
* gas/i386/white.l: Revert patch of August 12.
diff --git a/gas/testsuite/gas/vtable/entry0.d b/gas/testsuite/gas/vtable/entry0.d
new file mode 100644
index 0000000..6d77125
--- /dev/null
+++ b/gas/testsuite/gas/vtable/entry0.d
@@ -0,0 +1,10 @@
+#objdump: -r
+#name: vtable entry0
+
+.*: +file format .*
+
+RELOCATION RECORDS FOR \[.text\]:
+OFFSET TYPE VALUE
+0+0000010 R_.*_GNU_VTENTRY vtbl_a
+
+
diff --git a/gas/testsuite/gas/vtable/entry0.s b/gas/testsuite/gas/vtable/entry0.s
new file mode 100644
index 0000000..36f89e3
--- /dev/null
+++ b/gas/testsuite/gas/vtable/entry0.s
@@ -0,0 +1,2 @@
+.text
+.vtable_entry vtbl_a, 16
diff --git a/gas/testsuite/gas/vtable/entry1.d b/gas/testsuite/gas/vtable/entry1.d
new file mode 100644
index 0000000..e7b132b
--- /dev/null
+++ b/gas/testsuite/gas/vtable/entry1.d
@@ -0,0 +1,10 @@
+#objdump: -r
+#name: vtable entry1
+
+.*: +file format .*
+
+RELOCATION RECORDS FOR \[.text\]:
+OFFSET TYPE VALUE
+0+0000000 R_.*_GNU_VTENTRY vtbl_a\+0x0+10
+
+
diff --git a/gas/testsuite/gas/vtable/entry1.s b/gas/testsuite/gas/vtable/entry1.s
new file mode 100644
index 0000000..36f89e3
--- /dev/null
+++ b/gas/testsuite/gas/vtable/entry1.s
@@ -0,0 +1,2 @@
+.text
+.vtable_entry vtbl_a, 16
diff --git a/gas/testsuite/gas/vtable/inherit0.d b/gas/testsuite/gas/vtable/inherit0.d
new file mode 100644
index 0000000..4687949
--- /dev/null
+++ b/gas/testsuite/gas/vtable/inherit0.d
@@ -0,0 +1,10 @@
+#objdump: -r
+#name: vtable inherit0
+
+.*: +file format .*
+
+RELOCATION RECORDS FOR \[.data\]:
+OFFSET TYPE VALUE
+0+0000000 R_.*_GNU_VTINHERIT \*ABS\*
+0+0000010 R_.*_GNU_VTINHERIT vtbl_a
+
diff --git a/gas/testsuite/gas/vtable/inherit0.s b/gas/testsuite/gas/vtable/inherit0.s
new file mode 100644
index 0000000..37f1b95
--- /dev/null
+++ b/gas/testsuite/gas/vtable/inherit0.s
@@ -0,0 +1,13 @@
+.data
+
+.type vtbl_a,@object
+vtbl_a:
+ .space 16
+.size vtbl_a,16
+.vtable_inherit vtbl_a, 0
+
+.type vtbl_b,@object
+vtbl_b:
+ .space 16
+.size vtbl_b,16
+.vtable_inherit vtbl_b, vtbl_a
diff --git a/gas/testsuite/gas/vtable/inherit1.l b/gas/testsuite/gas/vtable/inherit1.l
new file mode 100644
index 0000000..cbf9d2c
--- /dev/null
+++ b/gas/testsuite/gas/vtable/inherit1.l
@@ -0,0 +1,6 @@
+.*: Assembler messages:
+.*:1: Error: expected `vtbl_a' to have already been set for .vtable_inherit
+GAS LISTING.*
+
+
+ +1.*vtable_inherit vtbl_a, 0
diff --git a/gas/testsuite/gas/vtable/inherit1.s b/gas/testsuite/gas/vtable/inherit1.s
new file mode 100644
index 0000000..7dd1d28
--- /dev/null
+++ b/gas/testsuite/gas/vtable/inherit1.s
@@ -0,0 +1 @@
+.vtable_inherit vtbl_a, 0
diff --git a/gas/testsuite/gas/vtable/vtable.exp b/gas/testsuite/gas/vtable/vtable.exp
new file mode 100644
index 0000000..8ef589b
--- /dev/null
+++ b/gas/testsuite/gas/vtable/vtable.exp
@@ -0,0 +1,33 @@
+#
+# vtable tests
+#
+proc run_list_test { name opts } {
+ global srcdir subdir
+ set testname "vtable $name"
+ set file $srcdir/$subdir/$name
+ gas_run ${name}.s $opts ">&dump.out"
+ if { [regexp_diff "dump.out" "${file}.l"] } then {
+ fail $testname
+ verbose "output is [file_contents "dump.out"]" 2
+ return
+ }
+ pass $testname
+}
+
+# Vtable bits are only supported by ELF targets.
+if {[istarget "*-*-elf*"] || [istarget "*-*-linux*"]} then {
+
+ run_dump_test "inherit0"
+ run_list_test "inherit1" "-al"
+
+ # The vtable entry results are different on Rel and Rela targets.
+ if {[istarget "i*86-*-*"] || [istarget "mips*-*-*"]} then {
+
+ run_dump_test "entry0"
+
+ } else {
+
+ run_dump_test "entry1"
+
+ }
+}