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]

Re: [PATCH] Fix __builtin_return_address() on PPC


On Friday 02 February 2001 20:47, David Edelsohn wrote:
> rs6000_current_abi is not used by aix.h, so Franz's patch is
> incomplete.  This one should cover everything.
>
> David
>
>
> 	* config/rs6000/rs60000.c (rs6000_return_addr): Add ABI_AIX
> 	to tests to determine where to find LR.
>
> Index: rs6000.c
> ===================================================================
> RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.c,v
> retrieving revision 1.162
> diff -c -p -r1.162 rs6000.c
> *** rs6000.c	2001/01/24 00:07:31	1.162
> --- rs6000.c	2001/02/02 19:37:50
> *************** rs6000_return_addr (count, frame)
> *** 5057,5063 ****
>     /* Currently we don't optimize very well between prolog and body code
> and for PIC code the code can be actually quite bad, so don't try to be too
> clever here.  */
> !   if (count != 0 || flag_pic != 0)
>       {
>         cfun->machine->ra_needs_full_frame = 1;
>         return
> --- 5055,5065 ----
>     /* Currently we don't optimize very well between prolog and body code
> and for PIC code the code can be actually quite bad, so don't try to be too
> clever here.  */
> !   if (DEFAULT_ABI == ABI_AIX
> !       || count != 0
> !       || flag_pic != 0
> !       || rs6000_current_abi == ABI_AIX
> !       || rs6000_current_abi == ABI_AIX_NODESC)
>       {
>         cfun->machine->ra_needs_full_frame = 1;
>         return

I think you mean the following, as DEFAULT_ABI is always valid:

Index: gcc/config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.162
diff -u -p -r1.162 rs6000.c
--- gcc/config/rs6000/rs6000.c	2001/01/24 00:07:31	1.162
+++ gcc/config/rs6000/rs6000.c	2001/02/02 19:58:29
@@ -5057,7 +5057,10 @@ rs6000_return_addr (count, frame)
   /* Currently we don't optimize very well between prolog and body code and
      for PIC code the code can be actually quite bad, so don't try to be
      too clever here.  */
-  if (count != 0 || flag_pic != 0)
+  if (count != 0
+      || flag_pic != 0
+      || DEFAULT_ABI == ABI_AIX
+      || DEFAULT_ABI == ABI_AIX_NODESC)
     {
       cfun->machine->ra_needs_full_frame = 1;
       return

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