Hello,

spu_expand_epilogue used to emit a barrier after the return jump; this seems
to confuse the CFG layer after some recent changes, causing internal errors.
Since other backends don't emit a barrier here either, I've removed this
from the SPU backend as well.

Tested on spu-elf, committed to mainline.

Bye,
Ulrich


ChangeLog:

        * config/spu/spu.c (spu_expand_epilogue): Do not emit barrier.

Index: gcc/config/spu/spu.c
===================================================================
*** gcc/config/spu/spu.c        (revision 172953)
--- gcc/config/spu/spu.c        (working copy)
*************** spu_expand_epilogue (bool sibcall_p)
*** 2107,2113 ****
    int size = get_frame_size (), offset, regno;
    HOST_WIDE_INT saved_regs_size, total_size;
    rtx sp_reg = gen_rtx_REG (Pmode, STACK_POINTER_REGNUM);
!   rtx jump, scratch_reg_0;
  
    if (spu_naked_function_p (current_function_decl))
      return;
--- 2107,2113 ----
    int size = get_frame_size (), offset, regno;
    HOST_WIDE_INT saved_regs_size, total_size;
    rtx sp_reg = gen_rtx_REG (Pmode, STACK_POINTER_REGNUM);
!   rtx scratch_reg_0;
  
    if (spu_naked_function_p (current_function_decl))
      return;
*************** spu_expand_epilogue (bool sibcall_p)
*** 2149,2158 ****
    if (!sibcall_p)
      {
        emit_use (gen_rtx_REG (SImode, LINK_REGISTER_REGNUM));
!       jump = emit_jump_insn (gen__return ());
!       emit_barrier_after (jump);
      }
- 
  }
  
  rtx
--- 2149,2156 ----
    if (!sibcall_p)
      {
        emit_use (gen_rtx_REG (SImode, LINK_REGISTER_REGNUM));
!       emit_jump_insn (gen__return ());
      }
  }
  
  rtx
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  ulrich.weig...@de.ibm.com

Reply via email to