&& REGNO (SUBREG_REG (operands[1])) < FIRST_PSEUDO_REGISTER)
operands[1] = alter_subreg (operands[1]);
- if (TARGET_HARD_FLOAT)
+ if (TARGET_SOFT_FLOAT && GET_CODE (operands[0]) == MEM)
+ operands[1] = force_reg (SFmode, operands[1]);
+
+ else if (TARGET_HARD_FLOAT)
{
if (GET_CODE (operands[1]) == REG && REGNO (operands[1]) < 32)
{
/* If operands[1] is a register, it may have double-precision data
in it, so truncate it to single precision. We need not do
this for POWERPC. */
- if (! TARGET_POWERPC && TARGET_HARD_FLOAT && GET_CODE (operands[1]) == REG)
+ if (! TARGET_POWERPC && GET_CODE (operands[1]) == REG)
{
rtx newreg = reload_in_progress ? operands[1] : gen_reg_rtx (SFmode);
emit_insn (gen_truncdfsf2 (newreg,