Commit 8026ebba by Ian Lance Taylor

Handle more cases when eliminating the FP to the hard FP

From-SVN: r13491
parent c0560887
/* Reload pseudo regs into hard regs for insns that require hard regs. /* Reload pseudo regs into hard regs for insns that require hard regs.
Copyright (C) 1987, 88, 89, 92-5, 1996 Free Software Foundation, Inc. Copyright (C) 1987, 88, 89, 92-6, 1997 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -3237,12 +3237,29 @@ eliminate_regs_in_insn (insn, replace) ...@@ -3237,12 +3237,29 @@ eliminate_regs_in_insn (insn, replace)
{ {
rtx src = SET_SRC (old_set); rtx src = SET_SRC (old_set);
int offset, ok = 0; int offset, ok = 0;
rtx prev_insn, prev_set;
if (src == ep->to_rtx) if (src == ep->to_rtx)
offset = 0, ok = 1; offset = 0, ok = 1;
else if (GET_CODE (src) == PLUS else if (GET_CODE (src) == PLUS
&& GET_CODE (XEXP (src, 0)) == CONST_INT) && GET_CODE (XEXP (src, 0)) == CONST_INT)
offset = INTVAL (XEXP (src, 0)), ok = 1; offset = INTVAL (XEXP (src, 0)), ok = 1;
else if ((prev_insn = prev_nonnote_insn (insn)) != 0
&& (prev_set = single_set (prev_insn)) != 0
&& rtx_equal_p (SET_DEST (prev_set), src))
{
src = SET_SRC (prev_set);
if (src == ep->to_rtx)
offset = 0, ok = 1;
else if (GET_CODE (src) == PLUS
&& GET_CODE (XEXP (src, 0)) == CONST_INT
&& XEXP (src, 1) == ep->to_rtx)
offset = INTVAL (XEXP (src, 0)), ok = 1;
else if (GET_CODE (src) == PLUS
&& GET_CODE (XEXP (src, 1)) == CONST_INT
&& XEXP (src, 0) == ep->to_rtx)
offset = INTVAL (XEXP (src, 1)), ok = 1;
}
if (ok) if (ok)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment