mips-sgi-irix6.2 RTL check testsuite failures

Clinton Popetz cpopetz@cygnus.com
Thu Jul 13 07:36:00 GMT 2000


On Wed, Jul 12, 2000 at 06:35:38PM -0500, Clinton Popetz wrote:
> On Wed, Jul 12, 2000 at 10:32:20AM -0400, Kaveh R. Ghazi wrote:
> > The following are testsuite failures exposed by RTL checking on
> > mips-sgi-irix6.2:
> > gcc.c-torture/execute/struct-ret-1.c:40: RTL check: expected code `reg', have `parallel'
> > gcc.c-torture/unsorted/s.c:24: RTL check: expected code `reg', have `parallel'
> > gcc.c-torture/unsorted/structret.c:26: RTL check: expected code `reg', have `parallel'
> > g++.old-deja/g++.pt/alignof.C:14: RTL check: expected code `reg', have `parallel'
> > g++.old-deja/g++.pt/t21.C:4: RTL check: expected code `reg', have `parallel'
> > g++.old-deja/g++.pt/t21.C:4: Internal compiler error in `mips_expand_prologue', at config/mips/mips.c:7007
> > g++.old-deja/g++.pt/t28.C:4: RTL check: expected code `reg', have `parallel'
> > g++.old-deja/g++.pt/t28.C:4: Internal compiler error in `mips_expand_prologue', at config/mips/mips.c:7007
> 
> These were all from the same bug...the Irix abi has a bizarre
> requirement to break up an argument struct into chunks when it
> contains a double, and mips_expand_prologue couldn't handle this.

I decided against this patch, because we don't need the information
the loop is calculating when compiling for that ABI anyway.  This
patch make us only calculate the information when we need it (but it
also does a sanity check when we are calculating it.)

An mips-sgi-irix6.2 rtl-checking bootstrap is in progress, but it will
take several hours.

				-Clint

Thu Jul 13 09:22:48 CDT 2000  Clinton Popetz  <cpopetz@cygnus.com>

	* mips.c (mips_expand_prologue): Don't calculate the last 
        argument register unless we need it.  When we are calculating 
	this, make sure FUNCTION_ARG is giving us a REG. 


Index: config/mips/mips.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/mips.c,v
retrieving revision 1.91
diff -c -2 -p -r1.91 mips.c
*** mips.c	2000/07/11 21:30:23	1.91
--- mips.c	2000/07/13 14:29:34
*************** mips_expand_prologue ()
*** 6943,6946 ****
--- 6943,6948 ----
    CUMULATIVE_ARGS args_so_far;
    rtx reg_18_save = NULL_RTX;
+   int store_args_on_stack = (mips_abi == ABI_32 || mips_abi == ABI_O64)
+                             && (! mips_entry || mips_can_use_return_insn ());
  
    /* If struct value address is treated as the first argument, make it so.  */
*************** mips_expand_prologue ()
*** 6961,6965 ****
       otherwise GP_ARG_LAST+1.  Note also if the last argument is 
       the varargs special argument, and treat it as part of the
!      variable arguments. */
  
    INIT_CUMULATIVE_ARGS (args_so_far, fntype, NULL_RTX, 0);
--- 6963,6969 ----
       otherwise GP_ARG_LAST+1.  Note also if the last argument is 
       the varargs special argument, and treat it as part of the
!      variable arguments. 
!      
!      This is only needed if store_args_on_stack is true. */
  
    INIT_CUMULATIVE_ARGS (args_so_far, fntype, NULL_RTX, 0);
*************** mips_expand_prologue ()
*** 6983,6987 ****
        next_arg = TREE_CHAIN (cur_arg);
  
!       if (entry_parm)
  	{
  	  if (next_arg == 0
--- 6987,6991 ----
        next_arg = TREE_CHAIN (cur_arg);
  
!       if (entry_parm && store_args_on_stack)
  	{
  	  if (next_arg == 0
*************** mips_expand_prologue ()
*** 6998,7002 ****
  	    {
  	      int words;
! 	  
  	      /* passed in a register, so will get homed automatically */
  	      if (GET_MODE (entry_parm) == BLKmode)
--- 7002,7009 ----
  	    {
  	      int words;
! 
! 	      if (GET_CODE (entry_parm) != REG)
! 	        abort();
! 
  	      /* passed in a register, so will get homed automatically */
  	      if (GET_MODE (entry_parm) == BLKmode)
*************** mips_expand_prologue ()
*** 7043,7048 ****
    /* If this function is a varargs function, store any registers that
       would normally hold arguments ($4 - $7) on the stack.  */
!   if ((mips_abi == ABI_32 || mips_abi == ABI_O64)
!       && (! mips_entry || mips_can_use_return_insn ())
        && ((TYPE_ARG_TYPES (fntype) != 0
  	   && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
--- 7050,7054 ----
    /* If this function is a varargs function, store any registers that
       would normally hold arguments ($4 - $7) on the stack.  */
!   if (store_args_on_stack
        && ((TYPE_ARG_TYPES (fntype) != 0
  	   && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))


More information about the Gcc-bugs mailing list