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: gimple va_arg for mips


Richard Sandiford <rsandifo@redhat.com> writes:
> Richard Henderson <rth@redhat.com> writes:
>> On Fri, Jul 09, 2004 at 12:12:17PM -0700, Richard Henderson wrote:
>>> You're right.  I think this check was supposed to be for ARGS_GROW_DOWNWARD.
>>> I wonder how this has gone unnoticed so long...  I'll fix it.
>>
>> Like so.  Fully tested on i686; I'll build a mips-sim sometime
>> this weekend, but feel free to beat me to it.
>
> Thanks, I'll give it a go on some mips targets and let you know.
> Should have the results by about this time tomorrow.

OK, bootstrapped & regression tested on mips64-linux-gnu and
mips64el-linux-gnu using the d-mips-1 patch, the patch to
mips_arg_info() (reproduced below with changelog) and the two
builtins patches.  The o32 and n32 multilibs were fine.
The n64 multilibs had many more failures, in execute/va-arg-*.c
and compat/*.c, but a quick check suggests that your patch
in the hppa thread fixes this.

Also tested on mipsisa64-elf ({-EB,-EL}{-mips64,-mips32}) to
get some EABI coverage.  No problems there.

So the mips stuff looks good to go.  Eric hasn't said whether
he's happy with the ABI change or not, but it's something we
can decide later anyway if necessary.

Richard


	* config/mips/mips.c (mips_arg_info): Remove special handling of
	MUST_PASS_IN_STACK arguments; assume they are passed by reference
	instead.

Index: config/mips/mips.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
retrieving revision 1.426
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.426 mips.c
*** config/mips/mips.c	7 Jul 2004 19:24:28 -0000	1.426
--- config/mips/mips.c	9 Jul 2004 07:00:38 -0000
*************** mips_arg_info (const CUMULATIVE_ARGS *cu
*** 3611,3632 ****
  	even_reg_p = true;
      }
  
!   if (mips_abi != ABI_EABI && MUST_PASS_IN_STACK (mode, type))
!     /* This argument must be passed on the stack.  Eat up all the
!        remaining registers.  */
!     info->reg_offset = MAX_ARGS_IN_REGISTERS;
!   else
!     {
!       /* Set REG_OFFSET to the register count we're interested in.
! 	 The EABI allocates the floating-point registers separately,
! 	 but the other ABIs allocate them like integer registers.  */
!       info->reg_offset = (mips_abi == ABI_EABI && info->fpr_p
! 			  ? cum->num_fprs
! 			  : cum->num_gprs);
  
!       if (even_reg_p)
! 	info->reg_offset += info->reg_offset & 1;
!     }
  
    /* The alignment applied to registers is also applied to stack arguments.  */
    info->stack_offset = cum->stack_words;
--- 3619,3633 ----
  	even_reg_p = true;
      }
  
!   /* Set REG_OFFSET to the register count we're interested in.
!      The EABI allocates the floating-point registers separately,
!      but the other ABIs allocate them like integer registers.  */
!   info->reg_offset = (mips_abi == ABI_EABI && info->fpr_p
! 		      ? cum->num_fprs
! 		      : cum->num_gprs);
  
!   if (even_reg_p)
!     info->reg_offset += info->reg_offset & 1;
  
    /* The alignment applied to registers is also applied to stack arguments.  */
    info->stack_offset = cum->stack_words;


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