From 763ee179ed8e563ffb863f8977d9c5a31cdbf0a9 Mon Sep 17 00:00:00 2001 From: Janis Johnson Date: Fri, 28 May 2004 22:31:44 +0000 Subject: target-supports.exp (check_vmx_hw_available): New. 2004-05-28 Janis Johnson * lib/target-supports.exp (check_vmx_hw_available): New. * gcc.dg/vmx/vmx.exp: Use it to determine default action. From-SVN: r82390 --- gcc/testsuite/gcc.dg/vmx/vmx.exp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'gcc/testsuite/gcc.dg/vmx') 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 -- cgit v1.2.1