summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vmx
diff options
context:
space:
mode:
authorJanis Johnson <janis187@us.ibm.com>2004-05-28 22:31:44 +0000
committerJanis Johnson <janis@gcc.gnu.org>2004-05-28 22:31:44 +0000
commit763ee179ed8e563ffb863f8977d9c5a31cdbf0a9 (patch)
treee4f1a8ac4d361c9b4f857cb67566844a6b2a358b /gcc/testsuite/gcc.dg/vmx
parent8dc84ef1bfe97bbdc9b33ccd01643900ddd2d722 (diff)
downloadgcc-763ee179ed8e563ffb863f8977d9c5a31cdbf0a9.tar.gz
target-supports.exp (check_vmx_hw_available): New.
2004-05-28 Janis Johnson <janis187@us.ibm.com> * lib/target-supports.exp (check_vmx_hw_available): New. * gcc.dg/vmx/vmx.exp: Use it to determine default action. From-SVN: r82390
Diffstat (limited to 'gcc/testsuite/gcc.dg/vmx')
-rw-r--r--gcc/testsuite/gcc.dg/vmx/vmx.exp15
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/testsuite/gcc.dg/vmx/vmx.exp b/gcc/testsuite/gcc.dg/vmx/vmx.exp
index aa376b1d71d..f1b761c7a2a 100644
--- a/gcc/testsuite/gcc.dg/vmx/vmx.exp
+++ b/gcc/testsuite/gcc.dg/vmx/vmx.exp
@@ -19,9 +19,9 @@
# Load support procs.
load_lib gcc-dg.exp
-# Only run this test on PowerPC targets with Altivec support.
-# For now, that's powerpc*-*-*altivec*. FIXME: generalize.
-if {![istarget powerpc*-*-*altivec*]} {
+# Skip these tests for non-PowerPC targets and for Aix, where AltiVec
+# is not yet supported.
+if {![istarget powerpc*-*-*] || [istarget powerpc*-*-aix*]} {
return
}
@@ -33,10 +33,15 @@ if ![info exists DEFAULT_VMXCFLAGS] then {
set DEFAULT_VMXCFLAGS "-maltivec -mabi=altivec -std=gnu99"
}
-# Default action in this directory is 'run'.
+# If the target system supports AltiVec instructions, the default action
+# for a test is 'run', otherwise it's 'compile'.
global dg-do-what-default
set save-dg-do-what-default ${dg-do-what-default}
-set dg-do-what-default run
+if { [check_vmx_hw_available ] } {
+ set dg-do-what-default run
+} else {
+ set dg-do-what-default compile
+}
# Initialize `dg'.
dg-init