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]

ia64.c patch for PR 8407


The code was accidentally returning a DImode reg for a BLKmode argument, which
caused mode-mismatch problems later on in store_expr.  Creating a new reg with
the right mode fixes this.

This was tested on a debian testing (sarge) ia64-linux system with make
bootstrap and make check.  This fixed 2 failures and 6 unresolveds in the
gcc compat tests, giving 8 more passes total.

2003-12-01  James E Wilson  <wilson@specifixinc.com>

	PR target/8407
	* config/ia64/ia64.c (ia64_function_arg): For single-reg HFA, call
	gen_rtx_REG to create new reg with argument mode.

Index: config/ia64/ia64.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.c,v
retrieving revision 1.259
diff -p -r1.259 ia64.c
*** config/ia64/ia64.c	29 Oct 2003 14:23:45 -0000	1.259
--- config/ia64/ia64.c	1 Dec 2003 09:16:54 -0000
*************** ia64_function_arg (CUMULATIVE_ARGS *cum,
*** 3527,3535 ****
  		      ? 1 : GET_MODE_SIZE (gr_mode) / UNITS_PER_WORD;
  	}
  
!       /* If we ended up using just one location, just return that one loc.  */
        if (i == 1)
! 	return XEXP (loc[0], 0);
        else
  	return gen_rtx_PARALLEL (mode, gen_rtvec_v (i, loc));
      }
--- 3527,3536 ----
  		      ? 1 : GET_MODE_SIZE (gr_mode) / UNITS_PER_WORD;
  	}
  
!       /* If we ended up using just one location, just return that one loc, but
! 	 change the mode back to the argument mode.  */
        if (i == 1)
! 	return gen_rtx_REG (mode, REGNO (XEXP (loc[0], 0)));
        else
  	return gen_rtx_PARALLEL (mode, gen_rtvec_v (i, loc));
      }
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com


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