This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Fix ARM bootstrap (PR target/40031)
- From: Michael Matz <matz at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Richard Earnshaw <rearnsha at arm dot com>, Ramana Radhakrishnan <ramana dot radhakrishnan at arm dot com>
- Date: Sun, 10 May 2009 04:29:08 +0200 (CEST)
- Subject: [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));
}
}
}