------- Comment #2 from kkojima at gcc dot gnu dot org  2009-07-11 13:14 -------
I've tried to see what is going on.   fill_slots_from_thread
fills wrongly the delay slot of a conditional jmp insn with
"add #-4,r15" where r15 is the stack pointer register for SH.
fill_slots_from_thread computes the resource set for
the follow-through block with

mark_target_live_regs (get_insns (), opposite_thread, &opposite_needed);

and mark_target_live_regs uses df_get_live_in to get live regs
for the basic block including the opposite_thread insn which is

the first insn of the follow-through block:

(insn 32 46 35 fs/ext3/balloc.c:66 (parallel [
            (asm_operands/v ("") ("") 0 []
                 [] 2935777)
            (clobber (mem:BLK (scratch) [0 A8]))
        ]) -1 (nil))

The resulting opssite_needed is

$1 = {memory = 0x1, unch_memory = 0x0, volatil = 0x0, cc = 0x0,
      regs = {0xf6,  0x0, 0x0, 0x0, 0x40000}}

i.e. it seems that df_get_live_in doesn't count r15 as an live
register and fill_slots_from_thread picks "add #-4,r15" up as
an eligible insn to fill that delayed slot.


-- 

kkojima at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Priority|P3                          |P4
   Last reconfirmed|0000-00-00 00:00:00         |2009-07-11 13:14:17
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40710

Reply via email to