(convert_move): Add TImode conversions.
authorRichard Kenner <kenner@gcc.gnu.org>
Mon, 10 Oct 1994 23:19:32 +0000 (19:19 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Mon, 10 Oct 1994 23:19:32 +0000 (19:19 -0400)
From-SVN: r8248

gcc/expr.c

index ea971a5..364789d 100644 (file)
@@ -1199,6 +1199,58 @@ convert_move (to, from, unsignedp)
       return;
     }
 
+  if (from_mode == TImode && to_mode == DImode)
+    {
+#ifdef HAVE_trunctidi2
+      if (HAVE_trunctidi2)
+       {
+         emit_unop_insn (CODE_FOR_trunctidi2, to, from, UNKNOWN);
+         return;
+       }
+#endif
+      convert_move (to, force_reg (from_mode, from), unsignedp);
+      return;
+    }
+
+  if (from_mode == TImode && to_mode == SImode)
+    {
+#ifdef HAVE_trunctisi2
+      if (HAVE_trunctisi2)
+       {
+         emit_unop_insn (CODE_FOR_trunctisi2, to, from, UNKNOWN);
+         return;
+       }
+#endif
+      convert_move (to, force_reg (from_mode, from), unsignedp);
+      return;
+    }
+
+  if (from_mode == TImode && to_mode == HImode)
+    {
+#ifdef HAVE_trunctihi2
+      if (HAVE_trunctihi2)
+       {
+         emit_unop_insn (CODE_FOR_trunctihi2, to, from, UNKNOWN);
+         return;
+       }
+#endif
+      convert_move (to, force_reg (from_mode, from), unsignedp);
+      return;
+    }
+
+  if (from_mode == TImode && to_mode == QImode)
+    {
+#ifdef HAVE_trunctiqi2
+      if (HAVE_trunctiqi2)
+       {
+         emit_unop_insn (CODE_FOR_trunctiqi2, to, from, UNKNOWN);
+         return;
+       }
+#endif
+      convert_move (to, force_reg (from_mode, from), unsignedp);
+      return;
+    }
+
   /* Handle truncation of volatile memrefs, and so on;
      the things that couldn't be truncated directly,
      and for which there was no special instruction.  */