[PATCH] RFA small patch to expr.c

Eric Christopher echristo@redhat.com
Tue Oct 21 20:28:00 GMT 2003


Ran across this when debugging a separate problem. Seems we were doing
things like:

(float_truncate:DF (blah:SF ))

which obviously looks weird. :)

Bootstrapped and tested on x86-linux, mipsisa64-elf.

OK?

-eric

-- 
Eric Christopher <echristo@redhat.com>

2003-10-21  Eric Christopher  <echristo@redhat.com>

	* expr.c (convert_move): Use FLOAT_EXTEND for extensions.

Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.596
diff -u -p -w -r1.596 expr.c
--- expr.c	14 Oct 2003 15:01:44 -0000	1.596
+++ expr.c	21 Oct 2003 20:23:11 -0000
@@ -634,8 +634,10 @@ convert_move (rtx to, rtx from, int unsi
 				       1, from, from_mode);
       insns = get_insns ();
       end_sequence ();
-      emit_libcall_block (insns, to, value, gen_rtx_FLOAT_TRUNCATE
(to_mode,
-								    from));
+      emit_libcall_block (insns, to, value,
+			  tab == trunc_optab ? gen_rtx_FLOAT_TRUNCATE (to_mode,
+								       from)
+			  : gen_rtx_FLOAT_EXTEND (to_mode, from));
       return;
     }
 




More information about the Gcc-patches mailing list