public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: libffi-discuss@sourceware.org
Subject: [PATCH 03/13] x86: Force FFI_TYPE_LONGDOUBLE different from FFI_TYPE_DOUBLE
Date: Fri, 07 Nov 2014 15:31:00 -0000	[thread overview]
Message-ID: <1415374240-1792-4-git-send-email-rth@twiddle.net> (raw)
In-Reply-To: <1415374240-1792-1-git-send-email-rth@twiddle.net>

There are few abis that set double = long double.  Eliminate the
conditional compilation and let this code simply be unused there.
---
 src/x86/ffi.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/x86/ffi.c b/src/x86/ffi.c
index 98aa008..339ca89 100644
--- a/src/x86/ffi.c
+++ b/src/x86/ffi.c
@@ -34,6 +34,18 @@
 #include <ffi_common.h>
 #include <stdlib.h>
 
+/* Force FFI_TYPE_LONGDOUBLE to be different than FFI_TYPE_DOUBLE;
+   all further uses in this file will refer to the 80-bit type.  */
+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
+# if FFI_TYPE_LONGDOUBLE != 4
+#  error FFI_TYPE_LONGDOUBLE out of date
+# endif
+#else
+# undef FFI_TYPE_LONGDOUBLE
+# define FFI_TYPE_LONGDOUBLE 4
+#endif
+
+
 /* ffi_prep_args is called by the assembly routine once stack space
    has been allocated for the function's arguments */
 
@@ -205,9 +217,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
     case FFI_TYPE_SINT64:
     case FFI_TYPE_FLOAT:
     case FFI_TYPE_DOUBLE:
-#if FFI_TYPE_DOUBLE != FFI_TYPE_LONGDOUBLE
     case FFI_TYPE_LONGDOUBLE:
-#endif
       cif->flags = (unsigned) cif->rtype->type;
       break;
 
-- 
1.9.3

  parent reply	other threads:[~2014-11-07 15:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-07 15:30 [PATCH 00/13] Go closures for i686 Richard Henderson
2014-11-07 15:30 ` [PATCH 02/13] x86: Remove some conditional compilation Richard Henderson
2014-11-07 15:31 ` [PATCH 07/13] x86: Rewrite closures Richard Henderson
2014-11-07 15:31 ` [PATCH 10/13] x86: Add support for Go closures Richard Henderson
2014-11-07 15:31 ` [PATCH 05/13] ffi_cif: Add cfa_escape Richard Henderson
2014-11-07 15:31 ` [PATCH 12/13] testsuite: Add two dg-do run markers Richard Henderson
2014-11-07 15:31 ` [PATCH 11/13] x86: Use win32 name mangling for fastcall functions Richard Henderson
2014-11-07 15:31 ` [PATCH 09/13] x86: Add support for Complex Richard Henderson
2014-11-07 15:31 ` [PATCH 04/13] x86: Convert to gas generated unwind info Richard Henderson
2014-11-07 15:31 ` [PATCH 08/13] testsuite: Fix return_complex2 vs excessive precision Richard Henderson
2014-11-07 15:31 ` [PATCH 01/13] x86: Tidy ffi_abi Richard Henderson
2014-11-07 15:31 ` [PATCH 06/13] x86: Rewrite ffi_call Richard Henderson
2014-11-07 15:31 ` Richard Henderson [this message]
2014-11-07 15:31 ` [PATCH 13/13] x86: Work around two clang assembler bugs Richard Henderson
2014-11-07 16:09 ` [PATCH 00/13] Go closures for i686 Richard Henderson

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=1415374240-1792-4-git-send-email-rth@twiddle.net \
    --to=rth@twiddle.net \
    --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).