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: Fix sh spill failures for libcalls




  In message <Pine.LNX.4.21.0009151411320.32574-100000@mahatma.cygnus.co.uk>you
 write:
  > All our libcall blocks are supposed to end with an insn that copies the
  > hard return register into a pseudo.
  > This pseudo can turn into a MEM later on due to being a user variable
  > whose address is taken.  Worse, the address of the MEM might need to be
  > computed just before the insn, moving the call and the insn that kills
  > the call value register apart.  By the time we reach local-alloc, we have
  > something like
  > 
  > (call_insn/u 29 28 132 (parallel[ 
  >             (set (reg:SI 0 r0)
  >                 (call (mem:SI (reg:SI 61) 0)
  >                     (const_int 0 [0x0])))
  >             (use (reg:SI 48 fpscr))
  >             (clobber (reg:SI 17 pr))
  >         ] ) 101 {call_valuei}
  > 
  > (insn 132 29 133 (set (reg:SI 89)
  >         (const_int 128 [0x80])) 81 {movsi_i}
  > 
  > (insn 31 133 34 (set (mem/f:SI (plus:SI (reg:SI 14 r14)
  >                 (reg:SI 89)) 5)
  >         (reg:SI 0 r0)) 81 {movsi_i}
  > 
  > and we can't reload insn 31 because we'd need register 0 for the address.
  > The patch below attempts to fix this problem at the earliest time possible
  > by simply not allowing user variables as target in a libcall block.
  > 
  > 
  > Bernd
  > 
  > 	* optabs.c (emit_libcall_block): If target is a user variable,
  > 	copy to a temporary first.
Approved.  Please install.

Thanks,
jeff


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