summaryrefslogtreecommitdiff
path: root/gas/testsuite/gas/sparc/sparc.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gas/testsuite/gas/sparc/sparc.exp')
-rw-r--r--gas/testsuite/gas/sparc/sparc.exp33
1 files changed, 21 insertions, 12 deletions
diff --git a/gas/testsuite/gas/sparc/sparc.exp b/gas/testsuite/gas/sparc/sparc.exp
index 1a793584599..17dcaaa3bbd 100644
--- a/gas/testsuite/gas/sparc/sparc.exp
+++ b/gas/testsuite/gas/sparc/sparc.exp
@@ -5,20 +5,29 @@
# 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];
+}
-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"
+ 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"
+ }
}
if [istarget sparclet*-*-*] {