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]

Re: Target Specific Code Generation in GCC Core


On Tue, Nov 19, 2002 at 05:07:15PM +0000, Andrew Haley wrote:
> 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?

If you can tell (1) that we're compiling java and (2) that this is
a JNI function, then targetm.insert_attributes can do this.  Except
that jc1 does not, at present, call decl_attributes.

The first point can be handled with 

	strcmp (language_string, "GNU Java")

    Not ideal, really.  Should promote the nonsense in dwarf2out.c
    gen_compile_unit_die to be a proper lang thingy so it'd be more like

	lang_hooks.dwarf2_language() == DW_LANG_Java


No idea what to do about the second point.  Looks like you're
supposed to check

	METHOD_NATIVE(decl) && flag_jni

but this would only compile inside the Java front end.

So I guess a macro is all we've got left.


r~


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