pa.c (emit_move_sequence): Don't copy 0.0 (double precision) directly to memory...
authorJeff Law <law@gcc.gnu.org>
Thu, 20 Feb 1997 01:14:34 +0000 (18:14 -0700)
committerJeff Law <law@gcc.gnu.org>
Thu, 20 Feb 1997 01:14:34 +0000 (18:14 -0700)
        * pa/pa.c (emit_move_sequence): Don't copy 0.0 (double precision)
        directly to memory, go through a reg if reload hasn't started.
        * pa/pa.md (main movdf pattern): Don't allow 0.0 (double precision)
        to be copied directly to memory.

From-SVN: r13669

gcc/config/pa/pa.c
gcc/config/pa/pa.md

index 3ed113b9805fbc45fe0b2e353ea54f0553bef5f7..221166fb664d08a092e43596c193891666a7e241 100644 (file)
@@ -1192,6 +1192,15 @@ emit_move_sequence (operands, mode, scratch_reg)
     }
   else if (GET_CODE (operand0) == MEM)
     {
+      if (mode == DFmode && operand1 == CONST0_RTX (mode)
+         && !(reload_in_progress || reload_completed))
+       {
+         rtx temp = gen_reg_rtx (DFmode);
+
+         emit_insn (gen_rtx (SET, VOIDmode, temp, operand1));
+         emit_insn (gen_rtx (SET, VOIDmode, operand0, temp));
+         return 1;
+       }
       if (register_operand (operand1, mode) || operand1 == CONST0_RTX (mode))
        {
          /* Run this case quickly.  */
index 774e33ef720c94b1768d1f2332ae1faeb25c5ac2..6748d5377318470005d61f4c693aee9664931a36 100644 (file)
                          "fG,*rG,f,*r,*r,RQ,o,Q"))]
   "(register_operand (operands[0], DFmode)
     || reg_or_0_operand (operands[1], DFmode))
+   && ! (GET_CODE (operands[1]) == CONST_DOUBLE
+        && GET_CODE (operands[0]) == MEM)
    && ! TARGET_SOFT_FLOAT"
   "*
 {