Commit f6ba0600 by Richard Kenner

(movsf): Only generate stack temporary if used.

From-SVN: r7552
parent 8c461ea1
...@@ -3763,8 +3763,6 @@ ...@@ -3763,8 +3763,6 @@
if (GET_CODE (operands[1]) == REG && REGNO (operands[1]) < 32) if (GET_CODE (operands[1]) == REG && REGNO (operands[1]) < 32)
{ {
rtx stack_slot = assign_stack_temp (SFmode, 4, 0);
/* If this is a store to memory or another integer register do the /* If this is a store to memory or another integer register do the
move directly. Otherwise store to a temporary stack slot and move directly. Otherwise store to a temporary stack slot and
load from there into a floating point register. */ load from there into a floating point register. */
...@@ -3779,19 +3777,21 @@ ...@@ -3779,19 +3777,21 @@
operand_subword (operands[1], 0, 0, SFmode)); operand_subword (operands[1], 0, 0, SFmode));
DONE; DONE;
} }
else
{
rtx stack_slot = assign_stack_temp (SFmode, 4, 0);
emit_move_insn (stack_slot, operands[1]); emit_move_insn (stack_slot, operands[1]);
emit_move_insn (operands[0], stack_slot); emit_move_insn (operands[0], stack_slot);
DONE; DONE;
} }
}
if (GET_CODE (operands[0]) == MEM) if (GET_CODE (operands[0]) == MEM)
operands[1] = force_reg (SFmode, operands[1]); operands[1] = force_reg (SFmode, operands[1]);
if (GET_CODE (operands[0]) == REG && REGNO (operands[0]) < 32) if (GET_CODE (operands[0]) == REG && REGNO (operands[0]) < 32)
{ {
rtx stack_slot = assign_stack_temp (SFmode, 4, 0);
if (GET_CODE (operands[1]) == MEM if (GET_CODE (operands[1]) == MEM
#if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT && ! defined(REAL_IS_NOT_DOUBLE) #if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT && ! defined(REAL_IS_NOT_DOUBLE)
|| GET_CODE (operands[1]) == CONST_DOUBLE || GET_CODE (operands[1]) == CONST_DOUBLE
...@@ -3805,11 +3805,15 @@ ...@@ -3805,11 +3805,15 @@
operand_subword (operands[1], 0, 0, SFmode)); operand_subword (operands[1], 0, 0, SFmode));
DONE; DONE;
} }
else
{
rtx stack_slot = assign_stack_temp (SFmode, 4, 0);
emit_move_insn (stack_slot, operands[1]); emit_move_insn (stack_slot, operands[1]);
emit_move_insn (operands[0], stack_slot); emit_move_insn (operands[0], stack_slot);
DONE; DONE;
} }
}
if (CONSTANT_P (operands[1])) if (CONSTANT_P (operands[1]))
{ {
......
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