> Peter Leist <peterle...@googlemail.com> writes:
> 
> > can I use emit_cmp_and_jump_insns while creating the function 
> > prologue/epilogue?
> > If I try, I always get an error at runtime
> >
> > func.c:33: internal compiler error: in make_edges, at cfgbuild.c:354
> >
> > I think this is because the jump doesn't get an JUMP_LABEL associated to it.
> > Is there an other way at this pass to add loops to the code?
> 
> Using a general function like emit_cmp_and_jump_insns when generating
> the prologue is somewhat risky, because emit_cmp_and_jump_insns expects
> to be run before reload.  It freely calls functions like force_reg and
> gen_reg_rtx which may not be used before reload.
> 
> In the function prologue you should know precisely which insns you want
> to emit.  It will be safer in general to use emit_insn (gen_XXX ())
> rather than to call a general routine.
> 
> I don't know of any existing cases where the prologue needs a jump, but
> it should be easy enough to emit a jump insn and set JUMP_LABEL
> yourself.

x86_64 has jump around saving SSE regs for variadic function prologue.

Honza
> 
> Ian

Reply via email to