OSDN Git Service

2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Feb 2003 18:39:35 +0000 (18:39 +0000)
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Feb 2003 18:39:35 +0000 (18:39 +0000)
* doc/tm.texi (MODIFY_JNI_METHOD_CALL): Document.
* config/i386/cygwin.h (MODIFY_JNI_METHOD_CALL): New macro.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62776 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/cygwin.h
gcc/doc/tm.texi

index 5f1c638..67a1e0e 100644 (file)
@@ -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
index 085c3e7..2419cf1 100644 (file)
@@ -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 *));
index 0abf394..9e8c4a2 100644 (file)
@@ -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)