public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Peter Bergner <bergner@vnet.ibm.com>
To: Anthony Green <green@moxielogic.com>
Cc: libffi-discuss@sourceware.org, dclarke@blastwave.org
Subject: Re: libffi fails to build on powerpc64-linux
Date: Fri, 09 Mar 2012 01:01:00 -0000	[thread overview]
Message-ID: <1331254858.24120.17.camel@otta> (raw)
In-Reply-To: <1331248447.24120.14.camel@otta>

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++;


  reply	other threads:[~2012-03-09  1:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-05 23:05 Dennis Clarke
2012-03-05 23:29 ` Peter Bergner
2012-03-06  0:29   ` Peter Bergner
2012-03-06  3:18     ` Anthony Green
2012-03-06 15:36       ` Peter Bergner
2012-03-06 16:16         ` Peter Bergner
2012-03-07  4:03         ` Peter Bergner
2012-03-08 23:14         ` Peter Bergner
2012-03-09  1:01           ` Peter Bergner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-03-09  2:37 David Edelsohn
2012-03-09  8:02 ` Kyle Moffett
2012-03-07  4:13 Dennis Clarke
2012-03-06  4:21 Dennis Clarke
2012-03-06 16:17 ` Peter Bergner
2012-03-05 22:56 Peter Bergner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1331254858.24120.17.camel@otta \
    --to=bergner@vnet.ibm.com \
    --cc=dclarke@blastwave.org \
    --cc=green@moxielogic.com \
    --cc=libffi-discuss@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).