From 3b7f6cca3532086bcd6675e87bacfcf680a8a8ee Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Tue, 18 Apr 1995 18:08:17 +0000 Subject: [PATCH] Do not generate mem->mem SF moves if -msoft-float From-SVN: r9408 --- gcc/config/rs6000/rs6000.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 1b253616ca0..cef070dc331 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -3923,7 +3923,10 @@ && 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) { @@ -3956,7 +3959,7 @@ /* 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, -- 2.30.2