Patchwork Define FFI_SIZEOF_JAVA_RAW to 4 for x32

login
register
mail settings
Submitter H.J. Lu
Date July 16, 2012, 8:14 p.m.
Message ID <20120716201408.GA5091@intel.com>
Download mbox | patch
Permalink /patch/171245/
State New
Headers show

Comments

H.J. Lu - July 16, 2012, 8:14 p.m.
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(-)

Patch

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