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]

Re: reload bugfix



  In message <199902030408.EAA06363@phal.cygnus.co.uk>you write:
  > sig10.C fails for SH with:
  > .../g++.old-deja/g++.gb/sig10.C:38: internal error--unrecognizable insn:
  > (insn 763 189 767 (set (reg:SI 0 r0)
  >         (subreg:SI (mem:DI (plus:SI (reg:SI 14 r14)
  >                     (const_int 100)) 0) 0)) -1 (nil)
  >     (nil))
  > 
  > This happens because find_reloads_address_1 reloads a SUBREG of a pseudo
  > that when into a stack slot without checking if the stack slot address
  > needs any reloads.  Here is a fix:
  > 
  > Wed Feb  3 04:02:38 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
  > 
  > 	* reload.c (find_reloads_subreg_address): New function, broken out of
  > 	find_reloads_toplev.
  > 	(find_reloads_toplev, find_reloads_address_1): Use it.
There is a comment just above the code you commonized:

         For machines that extend byte loads, we must not reload using
         a wider mode if we have a paradoxical SUBREG.  find_reloads will
         force a reload in that case.  So we should not do anything here.  */

[ ... ]
      else if (regno >= FIRST_PSEUDO_REGISTER
#ifdef LOAD_EXTEND_OP
               && (GET_MODE_SIZE (GET_MODE (x))
                   <= GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))))
#endif
[ ... ]

Do you need to take that same condition into consideration at the second
call site to find_reloads_subreg_address?  If not, why?

jeff


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