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]

Implementing Library calls


Hi,

I'm working on a port where a long->float conversion is done
by a library call.  The calling convention requires that the long
be passed in memory.  I have a problem when making a call like:

	long foo;
	printf("%E",((float) foo));
	
All the arguments to printf are passed in memory.  The pointer to the
string is placed in memory, but then it is clobbered by the call to
the long->float conversion, since the long argument is passed in memory.
When I invoke, emit_library_call_value(), for the long->float conversion, 
I've used LCT_CONST and LCT_NORMAL for the libcall_type argument, but 
neither fixes my problem.

Thanks,
John Lu


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