RE: [AARCH64] [PATCH 2/3] AArch64 Port

2012-08-21 Thread Sofiane Naci
> -Original Message-
> From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches-
> ow...@gcc.gnu.org] On Behalf Of Joseph S. Myers
> Sent: 25 May 2012 15:24
> To: Marcus Shawcroft
> Cc: gcc-patches@gcc.gnu.org
> Subject: Re: [AARCH64] [PATCH 2/3] AArch64 Port
> 
> 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.

Thanks. This is now fixed in:

r190482 | sofiane | 2012-08-17 16:02:20 +0100 (Fri, 17 Aug 2012) | 9 lines
[AArch64] Use effective-target to check for big endian

Sofiane





Re: [AARCH64] [PATCH 2/3] AArch64 Port

2012-05-25 Thread Joseph S. Myers
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
jos...@codesourcery.com