emit_library_call help
Stephen Biggs
xyzzy@hotpop.com
Sun Jun 22 17:09:00 GMT 2003
Greetings,
I am trying to unravel the many varied puzzles of emitting custom insns
and am making progress, but am stuck on an issue:
I have an internal library function that I wish to generate an insn for
which has the prototype:
void bar(void *);
... and I have a function in <machine>.c thus:
void
foo(rtx val) /* val is possibly a pseudo-register */
{
rtx val_ptr = force_reg(Pmode,val);
emit_library_call(gen_rtx_SYMBOL_REF(Pmode,"bar"),LCT_NORMAL,VOIDmode,1,val_ptr,Pmode);
}
The argument val_ptr is created in the recognized insn as an integer
instead of a pointer, even though I think I am forcing it to be a
pointer. What magic is needed here to have this argument be a pointer
argument instead of an integer argument? Thanks for any help.
More information about the Gcc
mailing list