This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [AARCH64] [PATCH 2/3] AArch64 Port
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Marcus Shawcroft <marcus dot shawcroft at arm dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 25 May 2012 14:24:09 +0000 (UTC)
- Subject: Re: [AARCH64] [PATCH 2/3] AArch64 Port
- References: <4FBF67BE.1090301@arm.com> <4FBF6866.1080904@arm.com> <4FBF6AAB.7090407@arm.com>
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