fix_truncdfsi2 SUBREG and movdi HOST_BITS_PER_WIDE_INT test
authorDavid Edelsohn <edelsohn@gnu.org>
Wed, 14 Feb 1996 18:45:05 +0000 (18:45 +0000)
committerDavid Edelsohn <edelsohn@gnu.org>
Wed, 14 Feb 1996 18:45:05 +0000 (18:45 +0000)
From-SVN: r11274

gcc/config/rs6000/rs6000.md

index 4e870c92d1777ddfe580637bc162c6d1bc433494..f3476bd54899e648787144004b45f9865a6bab78 100644 (file)
 {
   if (TARGET_POWER2 || TARGET_POWERPC)
     {
-      int endian = (WORDS_BIG_ENDIAN == 0);
       rtx stack_slot = rs6000_stack_temp (DImode, 8, 1);
       rtx temp = gen_reg_rtx (DImode);
 
       emit_insn (gen_fpcvtsi (temp, operands[1]));
       emit_move_insn (stack_slot, temp);
       emit_move_insn (operands[0],
-                     operand_subword (stack_slot, 1 - endian, 0, DImode));
+                     gen_rtx (SUBREG, SImode, stack_slot, WORDS_BIG_ENDIAN));
       DONE;
     }
   else
          low = CONST_DOUBLE_LOW (operands[1]);
          high = CONST_DOUBLE_HIGH (operands[1]);
        }
-      else if (HOST_BITS_PER_WIDE_INT <= 32)
+      else
+#if HOST_BITS_PER_WIDE_INT == 32
        {
          low = INTVAL (operands[1]);
          high = (low < 0) ? ~0 : 0;
        }
-      else
+#else
        {
           low = INTVAL (operands[1]) & 0xffffffff;
           high = (HOST_WIDE_INT) INTVAL (operands[1]) >> 32;
        }
+#endif
 
       if (! TARGET_POWERPC64)
        {
       low = CONST_DOUBLE_LOW (operands[1]);
       high = CONST_DOUBLE_HIGH (operands[1]);
     }
-  else if (HOST_BITS_PER_WIDE_INT <= 32)
+  else
+#if HOST_BITS_PER_WIDE_INT == 32
     {
       low = INTVAL (operands[1]);
       high = (low < 0) ? ~0 : 0;
     }
-  else
+#else
     {
       low = INTVAL (operands[1]) & 0xffffffff;
       high = (HOST_WIDE_INT) INTVAL (operands[1]) >> 32;
     }
+#endif
 
   if ((high + 0x8000) < 0x10000
       && ((low & 0xffff) == 0 || (low & (~ (HOST_WIDE_INT) 0xffff)) == 0))