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]

rs6000 patch for return addresses in 64-bit mode.



This was a bug I noticed.

I will commit this shortly (unless someone objects).

Tested with bootstrap on rs6000-ibm-aix4.3.3.0 (both normal and
-maix64) and tested on powerpc-eabisim (normal, -fpic, -fPIC).

-- 
- Geoffrey Keating <geoffk@cygnus.com>

===File ~/cygnus/patches/rs6000-64bugs-returnaddr.patch=====
2000-05-13  Geoffrey Keating  <geoffk@cygnus.com>

	* config/rs6000/rs6000.h (RETURN_ADDRESS_OFFSET): Correct for
	64-bit ABI.

Index: config/rs6000/rs6000.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.77
diff -c -p -r1.77 rs6000.h
*** rs6000.h	2000/05/06 04:31:16	1.77
--- rs6000.h	2000/05/13 19:57:56
*************** typedef struct rs6000_args
*** 1614,1620 ****
     abi's store the return address.  */
  #define RETURN_ADDRESS_OFFSET						\
   ((DEFAULT_ABI == ABI_AIX						\
!    || DEFAULT_ABI == ABI_AIX_NODESC)	? 8 :				\
    (DEFAULT_ABI == ABI_V4						\
     || DEFAULT_ABI == ABI_SOLARIS)	? (TARGET_32BIT ? 4 : 8) :	\
    (fatal ("RETURN_ADDRESS_OFFSET not supported"), 0))
--- 1614,1620 ----
     abi's store the return address.  */
  #define RETURN_ADDRESS_OFFSET						\
   ((DEFAULT_ABI == ABI_AIX						\
!    || DEFAULT_ABI == ABI_AIX_NODESC)	? (TARGET_32BIT ? 8 : 16) :	\
    (DEFAULT_ABI == ABI_V4						\
     || DEFAULT_ABI == ABI_SOLARIS)	? (TARGET_32BIT ? 4 : 8) :	\
    (fatal ("RETURN_ADDRESS_OFFSET not supported"), 0))
============================================================

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