This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

emit_library_call help


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]