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: Fix PR 46297


On 11/17/10 03:51, Bernd Schmidt wrote:
On 11/06/2010 04:53 PM, Jeff Law wrote:
  The fundamental problem is some ports have embedded auto-inc addressing
modes without REG_INC nodes.  The improved reload optimizations were not
accounting for the possibility of embedded auto-inc addressing,
particularly for argument pushing.
+
+   if (MEM_P (dst))
+     {
+       dst = XEXP (dst, 0);
+       if (GET_CODE (dst) == PRE_INC || GET_CODE (dst) == POST_INC
+ 	  || GET_CODE (dst) == PRE_DEC || GET_CODE (dst) == POST_DEC)
+ 	{
+ 	  for (i = hard_regno_nregs[regno][mode] - 1 + regno; i>= regno; i--)
I don't think regno is set correctly here. Otherwise it looks sensible.
It certainly looks odd. It's a cut-n-paste from the ZERO_EXTRACT/STRICT_LOW_PART slightly later in reload_combine_note_store. ISTM inserting


regno = REGNO (XEXP (dst, 0)); mode = GET_MODE (XEXP (dst, 0));


just before the loop should address this problem. Note we want the mode of the REG, not the mode of the memory reference when determining how many regs to mark within the loop.


I'll add the changes & retest.

Jeff



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