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]
Other format: [Raw text]

[patch] Fix ARM bootstrap (PR target/40031)


Hi,

as Ramana seems to have checked that this fixes the bootstrap 
(http://gcc.gnu.org/ml/gcc/2009-05/msg00225.html), is it okay?

(I haven't personally checked bootstrap or regtested it on arm)


Ciao,
Michael.
	PR target/40031
	* config/arm/arm.c (require_pic_register): Emit on entry edge,
	not at entry of function.

Index: config/arm/arm.c
===================================================================
--- config/arm/arm.c	(Revision 147326)
+++ config/arm/arm.c	(Arbeitskopie)
@@ -3596,7 +3596,11 @@ require_pic_register (void)
 
 	      seq = get_insns ();
 	      end_sequence ();
-	      emit_insn_after (seq, entry_of_function ());
+	      /* We can be called during expansion of PHI nodes, where
+	         we can't yet emit instructions directly in the final
+		 insn stream.  Queue the insns on the entry edge, they will
+		 be committed after everything else is expanded.  */
+	      insert_insn_on_edge (seq, single_succ_edge (ENTRY_BLOCK_PTR));
 	    }
 	}
     }


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