This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH,testsuite] add check_ultrasparc_hw_available


The attached patch adds a procedure, check_ultrasparc_hw_available, to
the testsuite, and uses it to control execution of several tests,
including all of the tests in vect.exp.

The rationale behind the patch is that the VxWorks SPARC simulator only
accepts EM_SPARC (e_machine in the ELF header) executables; adding
-mcpu=ultrasparc causes the assembler to procedure executable that are
not EM_SPARC.  The simulator then rejects those executables and produces
spurious FAILs.  Presumably, the simulator does not support the
vectorization instructions either.

check_ultrasparc_hw_available, then, compiles a simple test case with
-mcpu=ultrasparc and attempts to run it.  If it succeeds, then we know
we can run executables compiled with -mcpu=ultrasparc.

The vect.exp tests are downgraded to compile tests (similar to Alpha and
the availability of vector max instructions) if we cannot execute tests
compiled with -mcpu=ultrasparc.

Tested on sparc-wrs-vxworks on the SPARC simulator, where it fixes ~300
FAILs (they are converted to UNSUPPORTEDs).  OK to commit?

-Nathan

2007-07-10  Nathan Froyd  <froydnj@codesourcery.com>

	gcc/testsuite/
	* lib/target-support.exp (check_ultrasparc_hw_available):
	New function.
	(is-effective-target): Check $arg for ultrasparc_hw.
	(is-effective-target-keyword): Likewise.
	* gcc.dg/vect/vect.exp: Call check_ultrasparc_hw_available
	when determining what to do on sparc platforms.
	* gcc.dg/20001013-1.c: Check for an ultrasparc_hw target.
	* gcc.dg/20001101-1.c: Likewise.
	* gcc.dg/20001101-2.c: Likewise.
	* gcc.dg/ultrasp9.c: Likewise.
	* gcc.dg/ultrasp10.c: Likewise.
	* gcc.target/sparc/pdist-3.c: Likewise.

Attachment: target-supports.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]