Make libcall blocks for truncations
authorBernd Schmidt <bernds@redhat.co.uk>
Fri, 15 Sep 2000 16:16:33 +0000 (16:16 +0000)
committerBernd Schmidt <crux@gcc.gnu.org>
Fri, 15 Sep 2000 16:16:33 +0000 (16:16 +0000)
From-SVN: r36434

gcc/ChangeLog
gcc/expr.c

index 6c1152a9a38d0d2e6ba785efe1ac7a0e459405e9..147768eaca2654204fa88cfb898c47f833143c0d 100644 (file)
@@ -2,6 +2,8 @@
 
        * optabs.c (emit_libcall_block): If target is a user variable,
        copy to a temporary first.
+       * expr.c (convert_move): When generating a libcall, make a libcall
+       block.
 
 2000-09-15  Richard Henderson  <rth@cygnus.com>
 
index 66e972fc147e8f79b558944a0fa3ee59e4d560b9..034c132a6c6ce8b205e9fce39736133959bd6d32 100644 (file)
@@ -563,7 +563,7 @@ convert_move (to, from, unsignedp)
 
   if (to_real)
     {
-      rtx value;
+      rtx value, insns;
 
       if (GET_MODE_BITSIZE (from_mode) < GET_MODE_BITSIZE (to_mode))
        {
@@ -803,9 +803,13 @@ convert_move (to, from, unsignedp)
        /* This conversion is not implemented yet.  */
        abort ();
 
+      start_sequence ();
       value = emit_library_call_value (libcall, NULL_RTX, 1, to_mode,
                                       1, from, from_mode);
-      emit_move_insn (to, value);
+      insns = get_insns ();
+      end_sequence ();
+      emit_libcall_block (insns, to, value, gen_rtx_FLOAT_TRUNCATE (to_mode,
+                                                                   from));
       return;
     }