include/opcode/ChangeLog:
[deliverable/binutils-gdb.git] / gas / testsuite / gas / sparc / sparc.exp
index 1a793584599e2e5a8ebd1cdd111acb2fb005b70c..4b16f394103b58e1ad357aff9ac56e2975516bc4 100644 (file)
@@ -5,20 +5,46 @@
 # disassembly.  The way to fix this is to include a hex dump of the insns
 # and test that as well.  Later.
 
-if [istarget sparc*-*-*] {
-    run_dump_test "synth"
+# Find out if these binutils are either sparc64*-*-* or
+# sparc*-*-* with --enable-targets=sparc64-*-*
+proc gas_64_check { } {
+    global NM
+    global NMFLAGS
+    global srcdir
+
+    catch "exec $srcdir/lib/run $NM $NMFLAGS --help" nm_help
+    return [regexp "elf64\[_-\]sparc" $nm_help];
 }
 
+proc sparc_elf_setup { } {
+    setup_xfail "sparc*-*-*aout*" "sparc*-*-sunos4*" "sparc*-*-vxworks*"
+    setup_xfail "sparc*-fujitsu-none" "sparc*-*-*n*bsd*"
+    setup_xfail "sparc*-*-coff" "sparc*-*-lynxos*"
+    clear_xfail "sparc64*-*-*n*bsd*"
+    clear_xfail "sparc*-*-netbsdelf*"
+}
 
-if [istarget sparc64*-*-*] {
-    run_dump_test "asi"
-    run_dump_test "membar"
-    run_dump_test "prefetch"
-    run_dump_test "set64"
-    run_dump_test "synth64"
-    run_dump_test "rdpr"
-    run_dump_test "wrpr"
-    run_dump_test "reloc64"
+if [istarget sparc*-*-*] {
+    run_dump_test "synth"
+    # The next three tests are ELF only.
+    sparc_elf_setup
+    run_dump_test "unalign"
+    sparc_elf_setup
+    run_dump_test "pcrel"
+    sparc_elf_setup
+    run_dump_test "plt"
+    if [gas_64_check] {
+       run_dump_test "asi"
+       run_dump_test "membar"
+       run_dump_test "prefetch"
+       run_dump_test "set64"
+       run_dump_test "synth64"
+       run_dump_test "rdpr"
+       run_dump_test "wrpr"
+       run_dump_test "reloc64"
+       run_dump_test "pcrel64"
+       run_dump_test "plt64"
+    }
 }
 
 if [istarget sparclet*-*-*] {
This page took 0.024008 seconds and 4 git commands to generate.