From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14538 invoked by alias); 9 Mar 2012 01:01:34 -0000 Received: (qmail 14529 invoked by uid 22791); 9 Mar 2012 01:01:33 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,TW_BF,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from e33.co.us.ibm.com (HELO e33.co.us.ibm.com) (32.97.110.151) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 09 Mar 2012 01:01:20 +0000 Received: from /spool/local by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 8 Mar 2012 18:01:19 -0700 Received: from d01dlp03.pok.ibm.com (9.56.224.17) by e33.co.us.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 8 Mar 2012 18:01:14 -0700 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id F2BEBC90058 for ; Thu, 8 Mar 2012 20:01:12 -0500 (EST) Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q2911DNW289216 for ; Thu, 8 Mar 2012 20:01:13 -0500 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q2911CBC022074 for ; Thu, 8 Mar 2012 20:01:12 -0500 Received: from [192.168.1.103] (vorma.rchland.ibm.com [9.10.86.174]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q29119SW021799; Thu, 8 Mar 2012 20:01:09 -0500 Message-ID: <1331254858.24120.17.camel@otta> Subject: Re: libffi fails to build on powerpc64-linux From: Peter Bergner To: Anthony Green Cc: libffi-discuss@sourceware.org, dclarke@blastwave.org Date: Fri, 09 Mar 2012 01:01:00 -0000 In-Reply-To: <1331248447.24120.14.camel@otta> References: <64185.10.0.66.17.1330988704.squirrel@interact.purplecow.org> <1330990156.29904.24.camel@otta> <1330993709.21041.5.camel@otta> <1331048083.21041.17.camel@otta> <1331248447.24120.14.camel@otta> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12030901-2398-0000-0000-000004E62028 X-IsSubscribed: yes Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org X-SW-Source: 2012/txt/msg00100.txt.bz2 On Thu, 2012-03-08 at 17:14 -0600, Peter Bergner wrote: > * src/powerpc/ffi.c (ffi_prep_args_SYSV): Declare double_tmp. > Silence casting pointer to integer of different size warning. > (ffi_call): Silence possibly undefined warning. > (ffi_closure_helper_SYSV): Declare variable type. Bah, incomplete ChangeLog entry. Here's the updated ChangeLog along with the patch again. Sorry. Peter * src/powerpc/ffi.c (ffi_prep_args_SYSV): Declare double_tmp. Silence casting pointer to integer of different size warning. Delete goto to previously deleted label. (ffi_call): Silence possibly undefined warning. (ffi_closure_helper_SYSV): Declare variable type. diff --git a/src/powerpc/ffi.c b/src/powerpc/ffi.c index 1920c91..baca694 100644 --- a/src/powerpc/ffi.c +++ b/src/powerpc/ffi.c @@ -146,6 +146,7 @@ ffi_prep_args_SYSV (extended_cif *ecif, unsigned *const stack) gpr_base.u = stacktop.u - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS; intarg_count = 0; #ifndef __NO_FPRS__ + double double_tmp; fpr_base.d = gpr_base.d - NUM_FPR_ARG_REGISTERS; fparg_count = 0; copy_space.c = ((flags & FLAG_FP_ARGUMENTS) ? fpr_base.c : gpr_base.c); @@ -155,9 +156,9 @@ ffi_prep_args_SYSV (extended_cif *ecif, unsigned *const stack) next_arg.u = stack + 2; /* Check that everything starts aligned properly. */ - FFI_ASSERT (((unsigned) (char *) stack & 0xF) == 0); - FFI_ASSERT (((unsigned) copy_space.c & 0xF) == 0); - FFI_ASSERT (((unsigned) stacktop.c & 0xF) == 0); + FFI_ASSERT (((unsigned long) (char *) stack & 0xF) == 0); + FFI_ASSERT (((unsigned long) copy_space.c & 0xF) == 0); + FFI_ASSERT (((unsigned long) stacktop.c & 0xF) == 0); FFI_ASSERT ((bytes & 0xF) == 0); FFI_ASSERT (copy_space.c >= next_arg.c); @@ -211,8 +212,6 @@ ffi_prep_args_SYSV (extended_cif *ecif, unsigned *const stack) case FFI_TYPE_DOUBLE: /* With FFI_LINUX_SOFT_FLOAT doubles are handled like UINT64. */ - if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) - goto soft_double_prep; double_tmp = **p_argv.d; if (fparg_count >= NUM_FPR_ARG_REGISTERS) @@ -925,7 +924,7 @@ ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) */ unsigned int smst_buffer[2]; extended_cif ecif; - unsigned int rsize; + unsigned int rsize = 0; ecif.cif = cif; ecif.avalue = avalue; @@ -1132,7 +1131,7 @@ ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue, if (nf < 8) { - temp = pfr->d; + double temp = pfr->d; pfr->f = (float) temp; avalue[i] = pfr; nf++;