This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
[PATCH] Define FFI_SIZEOF_JAVA_RAW to 4 for x32
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: libffi-discuss at sourceware dot org
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 16 Jul 2012 13:14:08 -0700
- Subject: [PATCH] Define FFI_SIZEOF_JAVA_RAW to 4 for x32
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
This patch defines FFI_SIZEOF_JAVA_RAW to 4 for x32, similar to MIPS n32.
It fixed:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53982
Thanks.
H.J.
---
ChangeLog | 5 +++++
src/x86/ffitarget.h | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index ba44189..303aac0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-07-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ * src/x86//ffitarget.h (FFI_SIZEOF_JAVA_RAW): Defined to 4 for
+ x32.
+
2012-05-05 Nicolas Lelong
* libffi.xcodeproj/project.pbxproj: Fixes.
diff --git a/src/x86/ffitarget.h b/src/x86/ffitarget.h
index f442654..46f294c 100644
--- a/src/x86/ffitarget.h
+++ b/src/x86/ffitarget.h
@@ -61,8 +61,9 @@ typedef unsigned long long ffi_arg;
typedef long long ffi_sarg;
#endif
#else
-#if defined __x86_64__ && !defined __LP64__
+#if defined __x86_64__ && defined __ILP32__
#define FFI_SIZEOF_ARG 8
+#define FFI_SIZEOF_JAVA_RAW 4
typedef unsigned long long ffi_arg;
typedef long long ffi_sarg;
#else
--
1.7.10.4