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]

Fix mips o64 fallout


Eric pointed out that the mips64-elf results had got a lot worse
recently.  Sorry about that ;(.  I'd stupidly failed to test an o64
target when making the structure-passing changes.

To recap: in 3.3 & earlier, big-endian o32 & o64 padded all subword
arguments downward.  This was wrong for subword aggregates (the only
kind of subword argument that o32 has).

For o64, the intention was to leave integers, pointers and floats the
same, i.e. padded downward.  The integer & pointer case is the same as
for n32 & n64, but the float case is different, and wasn't handled.

Tested on mips64-elf & various non-o64 targets.  OK to install?

Richard


	* config/mips/mips.c (mips_pad_arg_upward): Pad floating-point
	arguments downward for big-endian o64.

Index: config/mips/mips.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
retrieving revision 1.318
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.318 mips.c
*** config/mips/mips.c	2 Oct 2003 00:44:24 -0000	1.318
--- config/mips/mips.c	2 Oct 2003 09:44:08 -0000
*************** mips_pad_arg_upward (enum machine_mode m
*** 3829,3834 ****
--- 3891,3901 ----
        ? INTEGRAL_TYPE_P (type) || POINTER_TYPE_P (type)
        : GET_MODE_CLASS (mode) == MODE_INT)
      return false;
+ 
+   /* Big-endian o64 pads floating-point arguments downward.  */
+   if (mips_abi == ABI_O64)
+     if (type != 0 ? FLOAT_TYPE_P (type) : GET_MODE_CLASS (mode) == MODE_FLOAT)
+       return false;
  
    /* Other types are padded upward for o32, o64, n32 and n64.  */
    if (mips_abi != ABI_EABI)


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