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]

Re: [PATCH, testsuite]: Fix various testsuite failures for 64bit x86-apple-darwin targets.


On Sun, Nov 16, 2008 at 03:14:41PM +0100, Uros Bizjak wrote:
> Hello!
>
> x86 darwin targets don't omit frame pointer by default. Attached patch  
> adds -fno-omit-frame-pointer where it matters due to mov* scans.
>
> 2008-11-16  Uros Bizjak  <ubizjak@gmail.com>
>
>    * gcc.target/i386/pr36246.c: Add -fomit-frame-pointer to dg-options.
>    * gcc.target/i386/pr32661-1.c: Ditto.
>    * gcc.target/i386/pr34256.c: Ditto.
>    * gcc.target/i386/pr22076.c: Ditto. Check for "movl" instruction on
>    nonpic targets only.
>
> Tested on x86_64-pc-linux-gnu{,-m32}{,-fpic}, manually checked on  
> i686-apple-darwin{,-m64} cross.
>
> Uros.

> Index: gcc.target/i386/pr36246.c
> ===================================================================
> --- gcc.target/i386/pr36246.c	(revision 141913)
> +++ gcc.target/i386/pr36246.c	(working copy)
> @@ -1,6 +1,6 @@
>  /* { dg-do compile } */
>  /* { dg-require-effective-target lp64 } */
> -/* { dg-options "-O2 -mtune=generic" } */
> +/* { dg-options "-O2 -fomit-frame-pointer -mtune=generic" } */
>  
>  typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__));
>  typedef int __v4si __attribute__ ((__vector_size__ (16)));
> Index: gcc.target/i386/pr32661-1.c
> ===================================================================
> --- gcc.target/i386/pr32661-1.c	(revision 141913)
> +++ gcc.target/i386/pr32661-1.c	(working copy)
> @@ -1,6 +1,6 @@
>  /* { dg-do compile } */
>  /* { dg-require-effective-target lp64 } */
> -/* { dg-options "-O2" } */
> +/* { dg-options "-O2 -fomit-frame-pointer" } */
>  
>  typedef long long __m128i __attribute__ ((__vector_size__ (16)));
>  
> Index: gcc.target/i386/pr34256.c
> ===================================================================
> --- gcc.target/i386/pr34256.c	(revision 141913)
> +++ gcc.target/i386/pr34256.c	(working copy)
> @@ -1,6 +1,6 @@
>  /* { dg-do compile } */
>  /* { dg-require-effective-target lp64 } */
> -/* { dg-options "-O2 -march=core2" } */
> +/* { dg-options "-O2 -fomit-frame-pointer -march=core2" } */
>  
>  #include <mmintrin.h>
>  
> Index: gcc.target/i386/pr22076.c
> ===================================================================
> --- gcc.target/i386/pr22076.c	(revision 141913)
> +++ gcc.target/i386/pr22076.c	(working copy)
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-O2 -flax-vector-conversions -mmmx" } */
> +/* { dg-options "-O2 -fomit-frame-pointer -flax-vector-conversions -mmmx" } */
>  
>  #include <mmintrin.h>
>  
> @@ -15,5 +15,4 @@
>  }
>  
>  /* { dg-final { scan-assembler-times "movq" 3 } } */
> -/* { dg-final { scan-assembler-times "movl" 1 { target { ilp32 && nonpic } } } } */
> -/* { dg-final { scan-assembler-times "movl" 2 { target { ilp32 && { ! nonpic } } } } } */
> +/* { dg-final { scan-assembler-not "movl" { target nonpic } } } */

Uros,
    This change fixed all of the failing test cases except for gcc.target/i386/pr34256.c
which still fails as...

Executing on host: /sw/src/fink.build/gcc44-4.3.999-20081116/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc44-4.3.999-20081116/darwin_objdir/gcc/ /sw/src/fink.build/gcc44-4.3.999-20081116/gcc-4.4-20081116/gcc/testsuite/gcc.target/i386/pr34256.c   -O2 -fomit-frame-pointer -march=core2 -S  -m64 -o pr34256.s    (timeout = 300)
PASS: gcc.target/i386/pr34256.c (test for excess errors)
FAIL: gcc.target/i386/pr34256.c scan-assembler-times mov 4
UNSUPPORTED: gcc.target/i386/pr34312.c
UNSUPPORTED: gcc.target/i386/pr34522.c
UNSUPPORTED: gcc.target/i386/pr35083.c

I've updated the pr34256.s attached to PR34256 to the current one generated with
-fomit-frame-pointer in case it helps with debugging this issue further.
                 Jack


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