View | Details | Raw Unified | Return to bug 41175
Collapse All | Expand All

(-)gcc/config/rs6000/rs6000.c.jj (-9 / +15 lines)
Lines 18104-18111 rs6000_emit_stack_reset (rs6000_stack_t Link Here
18104
  if (frame_reg_rtx != sp_reg_rtx)
18104
  if (frame_reg_rtx != sp_reg_rtx)
18105
    {
18105
    {
18106
      if (sp_offset != 0)
18106
      if (sp_offset != 0)
18107
	return emit_insn (gen_addsi3 (sp_reg_rtx, frame_reg_rtx,
18107
	{
18108
				      GEN_INT (sp_offset)));
18108
	  rtx dest_reg = savres ? gen_rtx_REG (Pmode, 11) : sp_reg_rtx;
18109
18110
	  return emit_insn (gen_addsi3 (dest_reg, frame_reg_rtx,
18111
					GEN_INT (sp_offset)));
18112
	}
18109
      else if (!savres)
18113
      else if (!savres)
18110
	return emit_move_insn (sp_reg_rtx, frame_reg_rtx);
18114
	return emit_move_insn (sp_reg_rtx, frame_reg_rtx);
18111
    }
18115
    }
Lines 19541-19549 rs6000_emit_epilogue (int sibcall) Link Here
19541
	rs6000_emit_stack_reset (info, sp_reg_rtx, frame_reg_rtx,
19545
	rs6000_emit_stack_reset (info, sp_reg_rtx, frame_reg_rtx,
19542
				 sp_offset, can_use_exit);
19546
				 sp_offset, can_use_exit);
19543
      else
19547
      else
19544
	emit_insn (gen_addsi3 (gen_rtx_REG (Pmode, 11),
19548
	{
19545
			       sp_reg_rtx,
19549
	  emit_insn (gen_add3_insn (gen_rtx_REG (Pmode, 11),
19546
			       GEN_INT (sp_offset - info->fp_size)));
19550
				    frame_reg_rtx,
19551
				    GEN_INT (sp_offset - info->fp_size)));
19552
	  if (REGNO (frame_reg_rtx) == 11)
19553
	    sp_offset += info->fp_size;
19554
	}
19547
19555
19548
      par = rs6000_make_savres_rtx (info, frame_reg_rtx,
19556
      par = rs6000_make_savres_rtx (info, frame_reg_rtx,
19549
				    info->gp_save_offset, reg_mode,
19557
				    info->gp_save_offset, reg_mode,
Lines 19648-19659 rs6000_emit_epilogue (int sibcall) Link Here
19648
				      info->lr_save_offset + sp_offset);
19656
				      info->lr_save_offset + sp_offset);
19649
19657
19650
      emit_move_insn (gen_rtx_REG (Pmode, 0), mem);
19658
      emit_move_insn (gen_rtx_REG (Pmode, 0), mem);
19659
      emit_move_insn (gen_rtx_REG (Pmode, LR_REGNO),
19660
		      gen_rtx_REG (Pmode, 0));
19651
    }
19661
    }
19652
19662
19653
  if (restore_lr && !restoring_GPRs_inline)
19654
    emit_move_insn (gen_rtx_REG (Pmode, LR_REGNO),
19655
		    gen_rtx_REG (Pmode, 0));
19656
19657
  /* Restore fpr's if we need to do it without calling a function.  */
19663
  /* Restore fpr's if we need to do it without calling a function.  */
19658
  if (restoring_FPRs_inline)
19664
  if (restoring_FPRs_inline)
19659
    for (i = 0; i < 64 - info->first_fp_reg_save; i++)
19665
    for (i = 0; i < 64 - info->first_fp_reg_save; i++)

Return to bug 41175