Do not generate mem->mem SF moves if -msoft-float
authorMichael Meissner <meissner@gcc.gnu.org>
Tue, 18 Apr 1995 18:08:17 +0000 (18:08 +0000)
committerMichael Meissner <meissner@gcc.gnu.org>
Tue, 18 Apr 1995 18:08:17 +0000 (18:08 +0000)
From-SVN: r9408

gcc/config/rs6000/rs6000.md

index 1b253616ca0bc4a3c965bc94ebbbc01d755b3869..cef070dc331baca09866ae6063ab086d420935ee 100644 (file)
       && 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,