Import a few reload bug fixes from 2.8.

This commit is contained in:
mycroft 1997-10-01 02:21:39 +00:00
parent 0d8fa88b1f
commit a6c7350ef2
2 changed files with 20 additions and 21 deletions

View File

@ -5690,6 +5690,9 @@ find_equiv_reg (goal, insn, class, other, reload_reg_p, goalreg, mode)
else if (goal_mem && GET_CODE (dest) == MEM
&& ! push_operand (dest, GET_MODE (dest)))
return 0;
else if (GET_CODE (dest) == MEM && regno >= FIRST_PSEUDO_REGISTER
&& reg_equiv_memory_loc[regno] != 0)
return 0;
else if (need_stable_sp
&& push_operand (dest, GET_MODE (dest)))
return 0;

View File

@ -5338,20 +5338,24 @@ choose_reload_regs (insn, avoid_return_reg)
to load it, and use it as our reload reg. */
if (equiv != 0 && regno != HARD_FRAME_POINTER_REGNUM)
{
int nr = HARD_REGNO_NREGS (regno, reload_mode[r]);
int k;
reload_reg_rtx[r] = equiv;
reload_inherited[r] = 1;
/* If it is a spill reg,
mark the spill reg as in use for this insn. */
i = spill_reg_order[regno];
if (i >= 0)
/* If any of the hard registers in EQUIV are spill
registers, mark them as in use for this insn. */
for (k = 0; k < nr; k++)
{
int nr = HARD_REGNO_NREGS (regno, reload_mode[r]);
int k;
mark_reload_reg_in_use (regno, reload_opnum[r],
reload_when_needed[r],
reload_mode[r]);
for (k = 0; k < nr; k++)
SET_HARD_REG_BIT (reload_reg_used_for_inherit, regno + k);
i = spill_reg_order[regno + k];
if (i >= 0)
{
mark_reload_reg_in_use (regno, reload_opnum[r],
reload_when_needed[r],
reload_mode[r]);
SET_HARD_REG_BIT (reload_reg_used_for_inherit,
regno + k);
}
}
}
}
@ -5650,7 +5654,6 @@ emit_reload_insns (insn)
rtx output_address_reload_insns[MAX_RECOG_OPERANDS];
rtx operand_reload_insns = 0;
rtx other_operand_reload_insns = 0;
rtx other_output_reload_insns = 0;
rtx following_insn = NEXT_INSN (insn);
rtx before_insn = insn;
int special;
@ -6437,14 +6440,9 @@ emit_reload_insns (insn)
}
if (reload_when_needed[j] == RELOAD_OTHER)
{
if (other_output_reload_insns)
emit_insns (other_output_reload_insns);
other_output_reload_insns = get_insns ();
}
else
output_reload_insns[reload_opnum[j]] = get_insns ();
emit_insns (output_reload_insns[reload_opnum[j]]);
output_reload_insns[reload_opnum[j]] = get_insns ();
end_sequence ();
}
}
@ -6490,8 +6488,6 @@ emit_reload_insns (insn)
emit_insns_before (output_reload_insns[j], following_insn);
}
emit_insns_before (other_output_reload_insns, following_insn);
/* Move death notes from INSN
to output-operand-address and output reload insns. */
#ifdef PRESERVE_DEATH_INFO_REGNO_P