> -----Original Message----- > From: Michael Matz [mailto:m...@suse.de] > Sent: 06 May 2009 18:00 > To: Richard Earnshaw > Cc: Paolo Bonzini; Joern Rennecke; Ramana Radhakrishnan; > m...@codesourcery.com; gcc@gcc.gnu.org > Subject: Re: Setting ARM PIC register (Was: RE: GCC 4.5.0 Status Report > (2009-05-05)) > > Hi, > > On Wed, 6 May 2009, Michael Matz wrote: > > > > There's already emit_insn_at_entry in cfgrtl.c. Would that work? > > > > Unfortunately not. That one also wants to immediately commit the > just > > inserted instructions, which doesn't work during the transition phase > > from GIMPLE to RTL. But just queuing them should be fine. > > I.e. like so. It fixes the testcase and to my untrained eye the output > looks correct (at least there seems to be loads from something .PIC > related :) ). But better testing would be appreciated.
I set up a bootstrap and test on arm-linux-gnueabi late last night with this patch on gcc55 but the machine seems to be down now. I'll let you know with any test results later. Ramana > > > Ciao, > Michael. > -- > Index: config/arm/arm.c > =================================================================== > --- config/arm/arm.c (revision 147187) > +++ config/arm/arm.c (working copy) > @@ -3596,7 +3596,7 @@ require_pic_register (void) > > seq = get_insns (); > end_sequence (); > - emit_insn_after (seq, entry_of_function ()); > + insert_insn_on_edge (seq, single_succ_edge > (ENTRY_BLOCK_PTR)); > } > } > }