From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8419 invoked by alias); 7 Nov 2014 15:31:00 -0000 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 Received: (qmail 8312 invoked by uid 89); 7 Nov 2014 15:31:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wg0-f49.google.com Received: from mail-wg0-f49.google.com (HELO mail-wg0-f49.google.com) (74.125.82.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 07 Nov 2014 15:30:59 +0000 Received: by mail-wg0-f49.google.com with SMTP id x13so3971004wgg.22 for ; Fri, 07 Nov 2014 07:30:56 -0800 (PST) X-Received: by 10.180.92.169 with SMTP id cn9mr6192289wib.26.1415374256047; Fri, 07 Nov 2014 07:30:56 -0800 (PST) Received: from pike.twiddle.home.com ([87.111.149.167]) by mx.google.com with ESMTPSA id p1sm12186731wjy.22.2014.11.07.07.30.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Nov 2014 07:30:55 -0800 (PST) From: Richard Henderson 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 Message-Id: <1415374240-1792-4-git-send-email-rth@twiddle.net> In-Reply-To: <1415374240-1792-1-git-send-email-rth@twiddle.net> References: <1415374240-1792-1-git-send-email-rth@twiddle.net> X-SW-Source: 2014/txt/msg00194.txt.bz2 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 #include +/* 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