Target Specific Code Generation in GCC Core

Andrew Haley aph@redhat.com
Tue Nov 19 10:52:00 GMT 2002


Ranjit Mathew writes:
 > Andrew Haley wrote:
 > > Is "stdcall" used on all Windows targets or just x86?
 > 
 > I presume you mean "...with respect to JNI..." - in which
 > case I have experience only with Sun's JDKs on Windows
 > running on x86 where this holds true - I don't know about
 > other Windows targets, much less the behaviour of Sun's
 > JDKs on those (if such JDKs exist, that is).

Okay.

 > > If JNI uses stdcall on every machine where stdcall is defined, there
 > > is no problem: we'll just define a TARGET_STDCALL macro which does the
 > > appropriate thing.  
 > 
 > I know that even on Linux/x86 "stdcall" is a valid function
 > attribute, but JNI doesn't use "stdcall". Therefore, we
 > can't do such a thing, IMHO.

Well, it looks to me like we're running out of choices.  Create a
target macro called TARGET_FIXUP_JNI_DECL (or some more sensible
name), define it appropriately in win32.h but nowhere else.  Add doc
for the new target macro to doc/tm.texi.

Can someone can think of a better way to do this?

Andrew.



More information about the Gcc mailing list