Target Specific Code Generation in GCC Core
Ranjit Mathew
rmathew@hotmail.com
Wed Nov 13 04:16:00 GMT 2002
Hi,
How does one specify target-specific code in core GCC?
For example, consider the following patch fragment:
---------------------------- 8< --------------------------
+ tem = build_function_type (TREE_TYPE (TREE_TYPE (method)), arg_types);
+
+#if defined (__MINGW32__) || defined (__CYGWIN__)
+ /* JNI methods on Win32 are invoked using the stdcall convention */
+ tem = build_type_attribute_variant (tem, get_identifier ("stdcall"));
+#endif
+
+ jni_func_type = build_pointer_type (tem);
---------------------------- 8< --------------------------
The problem is that __MINGW32__ is defined only when the
host compiler itself is the MinGW GCC.
I looked at the defines passed to the compiler in this
stage, the xm-cygming.h, xm-mingw32.h, etc. files in
"gcc/config/i386" as well as the GCC docs but couldn't
find anything useful or definitive.
Thanks in advance for your help.
Sincerely Yours,
Ranjit.
--
Ranjit Mathew Email: rmathew AT hotmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/
More information about the Gcc
mailing list