Patch: Corrects RETURN_IN_MEMORY macro in config/mips/abi64.h

Will Cohen wcohen@redhat.com
Tue Jan 23 15:00:00 GMT 2001


For some ABIs the RETURN_IN_MEMORY macro in config/mips/abi64.h
hardwires the max size that can be return in registers for the mips
processor to 128-bits.  This is incorrect when the processor is running
in 32-bit mode.  The maximum size allowed to be returned in registers
should only be 64-bits (two 32-bit registers) when generating 32-bit
code.  This patch eliminates the incorrect assumption.  The change log
entry is below and the associated patch for gcc is attached.

2001-01-23  Will Cohen  <wcohen@redhat.com>

	* config/mips/abi64.h (RETURN_IN_MEMORY): Always take into account
	whether registers are 32 bits or 64 bits in size.


-Will Cohen
Index: abi64.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/abi64.h,v
retrieving revision 1.14
diff -c -2 -p -r1.14 abi64.h
*** abi64.h	2000/03/26 16:46:27	1.14
--- abi64.h	2001/01/23 20:17:15
*************** Boston, MA 02111-1307, USA.  */
*** 92,96 ****
     ? TYPE_MODE (TYPE) == BLKmode					\
     : (int_size_in_bytes (TYPE)						\
!       > (mips_abi == ABI_EABI ? 2 * UNITS_PER_WORD : 16)))
  
  #ifdef ANSI_PROTOTYPES
--- 92,96 ----
     ? TYPE_MODE (TYPE) == BLKmode					\
     : (int_size_in_bytes (TYPE)						\
!       > (2 * UNITS_PER_WORD)))
  
  #ifdef ANSI_PROTOTYPES


More information about the Gcc-patches mailing list