[AARCH64] [PATCH 2/3] AArch64 Port

Joseph S. Myers joseph@codesourcery.com
Fri May 25 14:24:00 GMT 2012


On Fri, 25 May 2012, Marcus Shawcroft wrote:

> Index: gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-4.x
> ===================================================================
> --- gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-4.x	(revision 0)
> +++ gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-4.x	(revision 0)
> @@ -0,0 +1,5 @@
> +if { [istarget aarch64_be-*-*] } then {
> +   return 1
> +}
> +
> +return 0

This isn't a suitable way of enabling a test only for one endianness,
since a test may be run with -mbig-endian or -mlittle-endian with a
compiler defaulting to the other endianness.  You need to test an
effective-target keyword instead.

> Index: gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-3.x
> ===================================================================
> --- gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-3.x	(revision 0)
> +++ gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-3.x	(revision 0)
> @@ -0,0 +1,5 @@
> +if { [istarget aarch64_be-*-*] } then {
> +   return 1
> +}
> +
> +return 0

Likewise.

> +/* { dg-final { scan-assembler-times "\\tsubhn2 v" 6} }  */
> +/* { dg-final { scan-assembler-times "\\taddhn2\\tv" 6} }  */

Scanning for lots of different instructions in a testcase testing many
intrinsics doesn't do a good job of testing that each intrinsic does
the right thing, or showing where the problem is when the test starts
to fail.  I advise splitting such tests up into lots of little tests,
each testing just one intrinsic.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list