From 55ae46b15fcf6a31291fd793f8819207a70e0bbb Mon Sep 17 00:00:00 2001 From: Ranjit Mathew Date: Wed, 12 Feb 2003 18:39:35 +0000 Subject: [PATCH] tm.texi (MODIFY_JNI_METHOD_CALL): Document. 2003-02-12 Ranjit Mathew * doc/tm.texi (MODIFY_JNI_METHOD_CALL): Document. * config/i386/cygwin.h (MODIFY_JNI_METHOD_CALL): New macro. From-SVN: r62776 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/cygwin.h | 11 ++++++++++- gcc/doc/tm.texi | 16 ++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5f1c638b3ca..67a1e0edcdd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-02-12 Ranjit Mathew + + * doc/tm.texi (MODIFY_JNI_METHOD_CALL): Document. + * config/i386/cygwin.h (MODIFY_JNI_METHOD_CALL): New macro. + 2003-02-12 Zack Weinberg * cpplib.c (do_include_common): Move warnings for diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h index 085c3e78fe0..2419cf1cf1f 100644 --- a/gcc/config/i386/cygwin.h +++ b/gcc/config/i386/cygwin.h @@ -1,6 +1,6 @@ /* Operating system specific defines to be used when targeting GCC for hosting on Windows32, using a Unix style C library and tools. - Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 + Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU CC. @@ -397,6 +397,15 @@ extern void i386_pe_unique_section PARAMS ((TREE, int)); const0_rtx)); \ } +/* Java Native Interface (JNI) methods on Win32 are invoked using the + stdcall calling convention. */ +#undef MODIFY_JNI_METHOD_CALL +#define MODIFY_JNI_METHOD_CALL(MDECL) \ + build_type_attribute_variant ((MDECL), \ + build_tree_list (get_identifier ("stdcall"), \ + NULL)) + + /* External function declarations. */ extern void i386_pe_record_external_function PARAMS ((const char *)); diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 0abf394f29c..9e8c4a26e6b 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -9246,6 +9246,22 @@ Define this macro for systems like AIX, where the linker discards object files that are not referenced from @code{main} and uses export lists. +@findex MODIFY_JNI_METHOD_CALL +@item MODIFY_JNI_METHOD_CALL (@var{mdecl}) +Define this macro to a C expression representing a variant of the +method call @var{mdecl}, if Java Native Interface (JNI) methods +must be invoked differently from other methods on your target. +For example, on 32-bit Windows, JNI methods must be invoked using +the @code{stdcall} calling convention and this macro is then +defined as this expression: + +@smallexample +build_type_attribute_variant (@var{mdecl}, + build_tree_list + (get_identifier ("stdcall"), + NULL)) +@end smallexample + @end table @deftypefn {Target Hook} bool TARGET_CANNOT_MODIFY_JUMPS_P (void)