From patchwork Wed Jul 18 16:27:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 171741 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 59C002C00B2 for ; Thu, 19 Jul 2012 02:28:06 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1343233686; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Date:From:To:Cc:Subject:Message-ID:Reply-To:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To: User-Agent:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=e8Nnn9q C+ftdQTi4kd/oC9klrAs=; b=OLmHcyQFL/8iBYTE8iNswWb95B8H3qCEBgNe1RH 39WHIk22N0LgETA1x+OID+lOqR9qBuBpZhC4rmA8l4w/RRUaEroFGXVbwGWYc1R+ 1YxeWegXMyhhfLSRCmthgptt4zKlAOzEraNHqTLvCbAFvV3Lza1WJlFu4oBQgmvX fxts= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-ExtLoop1:Received:Received:Date:From:To:Cc:Subject:Message-ID:Reply-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=aMeYflBCsM3ntm11ze8yPphcxhNxcQ7Chp2duTdO3fWr7I+Etj7ahLDQjeUPTv QXQWBu/1AgoPVKN7F78BiCzFDaZg6+fGScQx3ssGCOyxCMXb/a6LtFtL3s+qQ+hU D5STdLux2KDuhElqCwh6yHstMhXq/nP6BlARoVS6eLNj4=; Received: (qmail 3846 invoked by alias); 18 Jul 2012 16:27:47 -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 09:27:27 -0700 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-Disposition: inline In-Reply-To: <20120716201408.GA5091@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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