From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3928 invoked by alias); 18 Jul 2012 16:27:49 -0000 Received: (qmail 3723 invoked by uid 22791); 18 Jul 2012 16:27:42 -0000 X-SWARE-Spam-Status: No, hits=-5.1 required=5.0 tests=AWL,BAYES_00,FSL_FREEMAIL_1,KHOP_RCVD_UNTRUST,NO_DNS_FOR_FROM,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga11.intel.com (HELO mga11.intel.com) (192.55.52.93) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 18 Jul 2012 16:27:29 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 18 Jul 2012 09:27:28 -0700 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([10.3.194.135]) by fmsmga001.fm.intel.com with ESMTP; 18 Jul 2012 09:27:28 -0700 Received: by gnu-6.sc.intel.com (Postfix, from userid 500) id C55B880D78; Wed, 18 Jul 2012 09:27:27 -0700 (PDT) Date: Wed, 18 Jul 2012 16:27:00 -0000 From: "H.J. Lu" To: Uros Bizjak , java-patches@gcc.gnu.org Cc: libffi-discuss@sourceware.org, gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Define FFI_SIZEOF_JAVA_RAW to 4 for x32 Message-ID: <20120718162727.GA23420@intel.com> Reply-To: "H.J. Lu" References: <20120716201408.GA5091@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120716201408.GA5091@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2012-q3/txt/msg00005.txt.bz2 On Mon, Jul 16, 2012 at 01:14:08PM -0700, H.J. Lu wrote: > 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 > > Hi, Here is the patch with updated ChangeLog entry. X32 has the same issue as MIPS n32, which was fixed by FFI_SIZEOF_JAVA_RAW: http://gcc.gnu.org/ml/gcc-patches/2007-11/msg01612.html http://gcc.gnu.org/ml/gcc-patches/2007-12/msg00005.html The same fix is needed for x32. OK for trunk? Thanks. H.J. --- 2012-07-16 H.J. Lu * src/x86/ffitarget.h: Check __ILP32__ instead of __LP64__ for x32. (FFI_SIZEOF_JAVA_RAW): Defined to 4 for x32. 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