From patchwork Thu Mar 1 16:07:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kai Tietz X-Patchwork-Id: 144065 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 A0FE7B6EF1 for ; Fri, 2 Mar 2012 03:08:01 +1100 (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=1331222881; h=Comment: DomainKey-Signature:Received:Received:Received:Received: Received-SPF:Received:MIME-Version:Received:Received:In-Reply-To: References:Date:Message-ID:Subject:From:To:Cc:Content-Type: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=0BBx2UwTTP9hT9gbfM9E kpEtq88=; b=Imm5dL4UkWScIp6H1ZroojOl23Sf9C3qGYqK/dD6an2JvOTI+5YX YCWJv5NhPkp5EafVpoIZUBX9iFn4hKeWnWETXK3g1s/mfIw5F7d58FEd6TsSOq6u Fj9qwyIb13bVEbct6D6KPYgRs/ruxvgsiB2h4ejTo6gPQyv1iJtoU/g= 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:Received-SPF:Authentication-Results:Received:MIME-Version:Received:Received:In-Reply-To:References:Date:Message-ID:Subject:From:To:Cc:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=AmQNxxVuBtOZE9UtBMBoXQrjwHXqC+8uEdyTrm6qDJJHNq1u5kPOUS/awzAUey ETtDecZDRNF9AdPwVJl0hG/DyZ22t0fMRu+MWdz6Lca5YzgKcw2Zn1xdYo7chD9d hrkNHKa3FkuIskmIxk7m61acLwE4SPERS2zp2ja/VLujM=; Received: (qmail 15642 invoked by alias); 1 Mar 2012 16:07:50 -0000 Received: (qmail 15626 invoked by uid 22791); 1 Mar 2012 16:07:48 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-gx0-f175.google.com (HELO mail-gx0-f175.google.com) (209.85.161.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Mar 2012 16:07:34 +0000 Received: by ggcy3 with SMTP id y3so247669ggc.20 for ; Thu, 01 Mar 2012 08:07:34 -0800 (PST) Received-SPF: pass (google.com: domain of ktietz70@googlemail.com designates 10.60.22.228 as permitted sender) client-ip=10.60.22.228; Authentication-Results: mr.google.com; spf=pass (google.com: domain of ktietz70@googlemail.com designates 10.60.22.228 as permitted sender) smtp.mail=ktietz70@googlemail.com; dkim=pass header.i=ktietz70@googlemail.com Received: from mr.google.com ([10.60.22.228]) by 10.60.22.228 with SMTP id h4mr2024763oef.57.1330618054046 (num_hops = 1); Thu, 01 Mar 2012 08:07:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.60.22.228 with SMTP id h4mr1778025oef.57.1330618053985; Thu, 01 Mar 2012 08:07:33 -0800 (PST) Received: by 10.182.33.103 with HTTP; Thu, 1 Mar 2012 08:07:33 -0800 (PST) In-Reply-To: References: Date: Thu, 1 Mar 2012 17:07:33 +0100 Message-ID: Subject: Re: [patch libgcc]: Fix float128 soft-float for mingw targets From: Kai Tietz To: "Joseph S. Myers" Cc: libc-alpha@sources.redhat.com, GCC Patches , Richard Henderson X-IsSubscribed: yes 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 2012/3/1 Joseph S. Myers : > On Thu, 1 Mar 2012, Kai Tietz wrote: > >> Thanks, I adjusted ChangeLog, comment, and added the copyright year. >> It would be kind, if somebody could apply this patch to glibc's >> repository as I don't have commit access to it.  I can do the applying >> to gcc's tree, if patch is ok-ed. > > This patch doesn't apply cleanly.  Please resend in a way that does not > munge any of the whitespace in the patch (including at ends of lines), > maybe as an attachment. Ok, as attachment. Regards, Kai Index: soft-fp/extended.h =================================================================== --- soft-fp/extended.h (revision 184686) +++ soft-fp/extended.h (working copy) @@ -1,6 +1,6 @@ /* Software floating-point emulation. Definitions for IEEE Extended Precision. - Copyright (C) 1999,2006,2007 Free Software Foundation, Inc. + Copyright (C) 1999,2006,2007, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek (jj@ultra.linux.cz). @@ -64,7 +64,7 @@ union _FP_UNION_E { XFtype flt; - struct + struct _FP_STRUCT_LAYOUT { #if __BYTE_ORDER == __BIG_ENDIAN unsigned long pad1 : _FP_W_TYPE_SIZE; @@ -263,7 +263,7 @@ union _FP_UNION_E { XFtype flt; - struct { + struct _FP_STRUCT_LAYOUT { #if __BYTE_ORDER == __BIG_ENDIAN _FP_W_TYPE pad : (_FP_W_TYPE_SIZE - 1 - _FP_EXPBITS_E); unsigned sign : 1; Index: soft-fp/single.h =================================================================== --- soft-fp/single.h (revision 184686) +++ soft-fp/single.h (working copy) @@ -1,6 +1,6 @@ /* Software floating-point emulation. Definitions for IEEE Single Precision. - Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc. + Copyright (C) 1997,1998,1999,2006, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), Jakub Jelinek (jj@ultra.linux.cz), @@ -58,7 +58,7 @@ union _FP_UNION_S { SFtype flt; - struct { + struct _FP_STRUCT_LAYOUT { #if __BYTE_ORDER == __BIG_ENDIAN unsigned sign : 1; unsigned exp : _FP_EXPBITS_S; Index: soft-fp/double.h =================================================================== --- soft-fp/double.h (revision 184686) +++ soft-fp/double.h (working copy) @@ -1,6 +1,6 @@ /* Software floating-point emulation. Definitions for IEEE Double Precision - Copyright (C) 1997, 1998, 1999, 2006, 2007, 2008, 2009 + Copyright (C) 1997, 1998, 1999, 2006, 2007, 2008, 2009, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), @@ -68,7 +68,7 @@ union _FP_UNION_D { DFtype flt; - struct { + struct _FP_STRUCT_LAYOUT { #if __BYTE_ORDER == __BIG_ENDIAN unsigned sign : 1; unsigned exp : _FP_EXPBITS_D; @@ -167,7 +167,7 @@ union _FP_UNION_D { DFtype flt; - struct { + struct _FP_STRUCT_LAYOUT { #if __BYTE_ORDER == __BIG_ENDIAN unsigned sign : 1; unsigned exp : _FP_EXPBITS_D; Index: soft-fp/quad.h =================================================================== --- soft-fp/quad.h (revision 184686) +++ soft-fp/quad.h (working copy) @@ -1,6 +1,6 @@ /* Software floating-point emulation. Definitions for IEEE Quad Precision. - Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc. + Copyright (C) 1997,1998,1999,2006,2007, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), Jakub Jelinek (jj@ultra.linux.cz), @@ -67,7 +67,7 @@ union _FP_UNION_Q { TFtype flt; - struct + struct _FP_STRUCT_LAYOUT { #if __BYTE_ORDER == __BIG_ENDIAN unsigned sign : 1; @@ -171,10 +171,11 @@ union _FP_UNION_Q { TFtype flt /* __attribute__((mode(TF))) */ ; - struct { + struct _FP_STRUCT_LAYOUT { _FP_W_TYPE a, b; } longs; - struct { + struct _FP_STRUCT_LAYOUT + { #if __BYTE_ORDER == __BIG_ENDIAN unsigned sign : 1; unsigned exp : _FP_EXPBITS_Q; Index: soft-fp/soft-fp.h =================================================================== --- soft-fp/soft-fp.h (revision 184686) +++ soft-fp/soft-fp.h (working copy) @@ -1,5 +1,5 @@ /* Software floating-point emulation. - Copyright (C) 1997,1998,1999,2000,2002,2003,2005,2006 + Copyright (C) 1997,1998,1999,2000,2002,2003,2005,2006, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), @@ -85,6 +85,13 @@ #define FP_EX_DENORM 0 #endif +/* By _FP_STRUCT_LAYOUT you can specify to be used struct-layout + variant. This is required for mingw targets, which are using + a specific struct-layout with differences in consecutive bit-fields. */ +#ifndef _FP_STRUCT_LAYOUT +#define _FP_STRUCT_LAYOUT +#endif + #ifdef _FP_DECL_EX #define FP_DECL_EX \ int _fex = 0; \