View | Details | Return to bug 44199
Collapse All | Expand All

(-)gcc/config/rs6000/rs6000.c.jj (+18 lines)
Lines 19775-19780 rs6000_emit_epilogue (int sibcall) Link Here
19775
      frame_reg_rtx = sp_reg_rtx;
19775
      frame_reg_rtx = sp_reg_rtx;
19776
      if (DEFAULT_ABI == ABI_V4)
19776
      if (DEFAULT_ABI == ABI_V4)
19777
	frame_reg_rtx = gen_rtx_REG (Pmode, 11);
19777
	frame_reg_rtx = gen_rtx_REG (Pmode, 11);
19778
      /* Prevent reordering memory accesses against stack pointer restore.  */
19779
      else if (cfun->calls_alloca
19780
	       || offset_below_red_zone_p (-info->total_size))
19781
	{
19782
	  rtx mem1 = gen_rtx_MEM (BLKmode, hard_frame_pointer_rtx);
19783
	  rtx mem2 = gen_rtx_MEM (BLKmode, sp_reg_rtx);
19784
	  MEM_NOTRAP_P (mem1) = 1;
19785
	  MEM_NOTRAP_P (mem2) = 1;
19786
	  emit_insn (gen_frame_tie (mem1, mem2));
19787
	}
19778
19788
19779
      insn = emit_insn (gen_add3_insn (frame_reg_rtx, hard_frame_pointer_rtx,
19789
      insn = emit_insn (gen_add3_insn (frame_reg_rtx, hard_frame_pointer_rtx,
19780
				       GEN_INT (info->total_size)));
19790
				       GEN_INT (info->total_size)));
Lines 19784-19789 rs6000_emit_epilogue (int sibcall) Link Here
19784
	   && DEFAULT_ABI != ABI_V4
19794
	   && DEFAULT_ABI != ABI_V4
19785
	   && !crtl->calls_eh_return)
19795
	   && !crtl->calls_eh_return)
19786
    {
19796
    {
19797
      /* Prevent reordering memory accesses against stack pointer restore.  */
19798
      if (cfun->calls_alloca
19799
	  || offset_below_red_zone_p (-info->total_size))
19800
	{
19801
	  rtx mem = gen_rtx_MEM (BLKmode, sp_reg_rtx);
19802
	  MEM_NOTRAP_P (mem) = 1;
19803
	  emit_insn (gen_stack_tie (mem));
19804
	}
19787
      insn = emit_insn (gen_add3_insn (sp_reg_rtx, sp_reg_rtx,
19805
      insn = emit_insn (gen_add3_insn (sp_reg_rtx, sp_reg_rtx,
19788
				       GEN_INT (info->total_size)));
19806
				       GEN_INT (info->total_size)));
19789
      sp_offset = 0;
19807
      sp_offset = 0;
(-)gcc/config/rs6000/rs6000.md.jj (+9 lines)
Lines 15286-15291 (define_insn "stack_tie" Link Here
15286
  ""
15286
  ""
15287
  [(set_attr "length" "0")])
15287
  [(set_attr "length" "0")])
15288
15288
15289
; Like stack_tie, but depend on both fp and sp based memory.
15290
(define_insn "frame_tie"
15291
  [(set (match_operand:BLK 0 "memory_operand" "+m")
15292
        (unspec:BLK [(match_dup 0)
15293
		     (match_operand:BLK 1 "memory_operand" "m")] UNSPEC_TIE))]
15294
  ""
15295
  ""
15296
  [(set_attr "length" "0")])
15297
15289
15298
15290
(define_expand "epilogue"
15299
(define_expand "epilogue"
15291
  [(use (const_int 0))]
15300
  [(use (const_int 0))]

Return to bug 44199