* gas/vax/elf-rel.[ds]: New test.
authorJason Thorpe <thorpej@netbsd.org>
Fri, 27 Sep 2002 23:36:01 +0000 (23:36 +0000)
committerJason Thorpe <thorpej@netbsd.org>
Fri, 27 Sep 2002 23:36:01 +0000 (23:36 +0000)
* gas/vax/quad.exp: Move contents to...
* gas/vax/vax.exp: ...here.  New file.

gas/testsuite/ChangeLog
gas/testsuite/gas/vax/elf-rel.d [new file with mode: 0644]
gas/testsuite/gas/vax/elf-rel.s [new file with mode: 0644]
gas/testsuite/gas/vax/quad.exp [deleted file]
gas/testsuite/gas/vax/vax.exp [new file with mode: 0644]

index dc976ab93bd4d68a1f9d37be74ecc1916e407f6d..11566bef747846b3e78e4ed667e4c662cefc1a43 100644 (file)
@@ -1,3 +1,9 @@
+2002-09-27  Jason Thorpe  <thorpej@wasabisystems.com>
+
+       * gas/vax/elf-rel.[ds]: New test.
+       * gas/vax/quad.exp: Move contents to...
+       * gas/vax/vax.exp: ...here.  New file.
+
 2002-09-27  H.J. Lu <hjl@gnu.org>
 
        * gas/mips/mips-jalx.s: Add ".p2align 4".
diff --git a/gas/testsuite/gas/vax/elf-rel.d b/gas/testsuite/gas/vax/elf-rel.d
new file mode 100644 (file)
index 0000000..88e8f5c
--- /dev/null
@@ -0,0 +1,41 @@
+#objdump: -sr
+#name: VAX ELF relocations
+
+# Test VAX ELF relocations
+
+.*:     file format elf32-vax
+
+RELOCATION RECORDS FOR \[\.text\]:
+OFFSET [ ]+ TYPE              VALUE 
+00000015 R_VAX_PLT32       text_vax_plt32
+00000028 R_VAX_GOT32       text_vax_got32
+0000003b R_VAX_GOT32       text_vax_got32\+0x00000020
+00000005 R_VAX_PC8         text_vax_pc8
+00000009 R_VAX_PC16        text_vax_pc16
+0000000e R_VAX_PC32        text_vax_pc32
+0000001b R_VAX_PC8         text_vax_pc8
+0000001e R_VAX_PC16        text_vax_pc16
+00000022 R_VAX_PC32        text_vax_pc32
+0000002e R_VAX_PC8         text_vax_pc8\+0x00000008
+00000031 R_VAX_PC16        text_vax_pc16\+0x00000010
+00000035 R_VAX_PC32        text_vax_pc32\+0x00000020
+
+
+RELOCATION RECORDS FOR \[\.data\]:
+OFFSET [ ]+ TYPE              VALUE 
+00000000 R_VAX_8           data_vax_8
+00000001 R_VAX_16          data_vax_16
+00000003 R_VAX_32          data_vax_32
+00000007 R_VAX_8           data_vax_8\+0x00000008
+00000008 R_VAX_16          data_vax_16\+0x00000010
+0000000a R_VAX_32          data_vax_32\+0x00000020
+
+
+Contents of section \.text:
+ 0000 0000fb00 affafb00 cff5fffb 00efeeff  .*
+ 0010 fffffb00 ef000000 00d5afe4 d5cfe0ff  .*
+ 0020 d5efdaff ffffd5ef 00000000 d5afd9d5  .*
+ 0030 cfddffd5 efe7ffff ffd5ef00 00000004  .*
+Contents of section \.data:
+ 0000 00000000 00000000 00000000 0000      .*
+#pass
diff --git a/gas/testsuite/gas/vax/elf-rel.s b/gas/testsuite/gas/vax/elf-rel.s
new file mode 100644 (file)
index 0000000..69253fe
--- /dev/null
@@ -0,0 +1,30 @@
+       .data
+
+       .byte   data_vax_8
+       .word   data_vax_16
+       .long   data_vax_32
+
+       .byte   data_vax_8+8
+       .word   data_vax_16+16
+       .long   data_vax_32+32
+
+       .text
+       .globl  x
+x:
+       .word   0
+
+       calls   $0, b`text_vax_pc8
+       calls   $0, w`text_vax_pc16
+       calls   $0, l`text_vax_pc32
+       calls   $0, text_vax_plt32
+
+       tstl    b`text_vax_pc8
+       tstl    w`text_vax_pc16
+       tstl    l`text_vax_pc32
+       tstl    text_vax_got32
+
+       tstl    b`text_vax_pc8+8
+       tstl    w`text_vax_pc16+16
+       tstl    l`text_vax_pc32+32
+       tstl    text_vax_got32+32
+       ret
diff --git a/gas/testsuite/gas/vax/quad.exp b/gas/testsuite/gas/vax/quad.exp
deleted file mode 100644 (file)
index 4cd98b8..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-proc do_quad {} {
-    set testname "quad.s: quadword immediate values"
-    set x1 0
-    set x2 0
-    set x3 0
-    set file "quad.s"
-    if [istarget vax-*-*elf*] {
-      set file "quad_elf.s"
-    }
-    gas_start $file "-al"
-    while 1 {
-       expect {
-           -re "^ +2\[ \t\]+0000+ 7D8F7856\[ \t\]+movq\[^\n\]*\n" { set x1 1 }
-           -re "^ +2\[ \t\]+3412DDCC\[^\n\]*\n"                   { set x2 1 }
-           -re "^ +2\[ \t\]+BBAA50\[ \t\]*\r\n"                   { set x3 1 }
-           -re "\[^\n\]*\n"                            { }
-           timeout                             { perror "timeout\n"; break }
-           eof                                 { break }
-       }
-    }
-    gas_finish
-    if [all_ones $x1 $x2 $x3] then { pass $testname } else { fail $testname }
-}
-
-if [istarget vax-*-*] then {
-    do_quad
-}
diff --git a/gas/testsuite/gas/vax/vax.exp b/gas/testsuite/gas/vax/vax.exp
new file mode 100644 (file)
index 0000000..061036c
--- /dev/null
@@ -0,0 +1,35 @@
+#
+# Some generic VAX tests
+#
+
+proc do_quad {} {
+    set testname "quad.s: quadword immediate values"
+    set x1 0
+    set x2 0
+    set x3 0
+    set file "quad.s"
+    if [istarget vax-*-*elf*] {
+       set file "quad_elf.s"
+    }
+    gas_start $file "-al"
+    while 1 {
+       expect {
+           -re "^ +2\[ \t\]+0000+ 7D8F7856\[ \t\]+movq\[^\n\]*\n" { set x1 1 }
+           -re "^ +2\[ \t\]+3412DDCC\[^\n\]*\n"                   { set x2 1 }
+           -re "^ +2\[ \t\]+BBAA50\[ \t\]*\r\n"                   { set x3 1 }
+           -re "\[^\n\]*\n"                            { }
+           timeout                             { perror "timeout\n"; break }
+           eof                                 { break }
+       }
+    }
+    gas_finish
+    if [all_ones $x1 $x2 $x3] then { pass $testname } else { fail $testname }
+}
+
+if [istarget vax-*-* ] then {
+    do_quad
+
+    if [istarget vax-*-*elf*] {
+       run_dump_test "elf-rel"
+    }
+}