This is the mail archive of the
mailing list for the GCC project.
Re: using emit_library_call
On Tue, Aug 06, 2002 at 03:20:54AM +0200, Per Fransson wrote:
> I've tried using emit_library_call during rtl generation, like this:
> emit_library_call (fn_rtx, 0,
> VOIDmode, 2,
> operand1_rtx, SImode,
> operand2_rtx, SImode
> but it still doesn't work most of the time (more often *with*
> optimization than without). Do I have to use start_sequence etc?
If you don't use start_sequence, it will be put at the end of
the rtl chain, i.e. at the end of the function so far.
> What if I do this during the preparation of a call to another
> function when some of the arguments for that function is already in place?
Boom. No can do.
> or can it only be done at certain places (how can I tell?)?
Only certain places. In order to tell, you must understand
the surrounding code.
You really want to be doing whatever it is you are doing at the
tree level, not the rtl level. See tree-ssa-20020619-branch.