aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRanjit Mathew <rmathew@hotmail.com>2003-02-12 18:39:35 +0000
committerTom Tromey <tromey@gcc.gnu.org>2003-02-12 18:39:35 +0000
commit55ae46b15fcf6a31291fd793f8819207a70e0bbb (patch)
tree294ce90da5ba11a513667b8035084a34c19c763d
parent3963c2e00eaf827b8ededa284db7b1e3df0ad859 (diff)
downloadgcc-55ae46b15fcf6a31291fd793f8819207a70e0bbb.zip
gcc-55ae46b15fcf6a31291fd793f8819207a70e0bbb.tar.gz
gcc-55ae46b15fcf6a31291fd793f8819207a70e0bbb.tar.bz2
tm.texi (MODIFY_JNI_METHOD_CALL): Document.
2003-02-12 Ranjit Mathew <rmathew@hotmail.com> * doc/tm.texi (MODIFY_JNI_METHOD_CALL): Document. * config/i386/cygwin.h (MODIFY_JNI_METHOD_CALL): New macro. From-SVN: r62776
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/cygwin.h11
-rw-r--r--gcc/doc/tm.texi16
3 files changed, 31 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5f1c638..67a1e0e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
+
+ * doc/tm.texi (MODIFY_JNI_METHOD_CALL): Document.
+ * config/i386/cygwin.h (MODIFY_JNI_METHOD_CALL): New macro.
+
2003-02-12 Zack Weinberg <zack@codesourcery.com>
* cpplib.c (do_include_common): Move warnings for
diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h
index 085c3e7..2419cf1 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 0abf394..9e8c4a2 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)