This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

More fun with libcalls and the sh


The problem with user variable REGs turning to MEMs and causing spill failures
later is present also in convert_move.  This function generates a libcall
and copies the result to a register.  This register may turn into a MEM
during RTL generation.

I suggest fixing this by simply generating a libcall block.  This fix depends
on the patch I sent earlier today to prevent this problem in
emit_libcall_block.

Bernd

	* expr.c (convert_move): When generating a libcall, make a libcall
	block.

Index: expr.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/expr.c,v
retrieving revision 1.430
diff -u -p -r1.430 expr.c
--- expr.c	2000/09/08 14:46:59	1.430
+++ expr.c	2000/09/15 14:55:57
@@ -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;
     }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]