This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch libgcc]: Fix float128 soft-float for mingw targets
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Kai Tietz <ktietz70 at googlemail dot com>
- Cc: libc-alpha at sources dot redhat dot com, GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Henderson <rth at redhat dot com>
- Date: Mon, 27 Feb 2012 16:53:33 +0000 (UTC)
- Subject: Re: [patch libgcc]: Fix float128 soft-float for mingw targets
- References: <CAEwic4aZE8WXvs0TwAWr-1GZn6JNzi7_WJ50vBcm45HpdPVGdw@mail.gmail.com><Pine.LNX.4.64.1202271539400.15223@digraph.polyomino.org.uk><CAEwic4bO7MbWoGcjG-a2jJw6m7v_YrGpy98yYcn3wyo3r7g8ww@mail.gmail.com>
On Mon, 27 Feb 2012, Kai Tietz wrote:
> For gcc_struct variant bitfields with different types get merged
> together, but for ms_struct bitfields are getting merged together
> only, if they have same type. As in those structures - I modified in
> this patch - we have varying types for bitfields, this struct-layout
> attribute is required.
I think you need a comment in soft-fp.h explaining the issue (and in
particular that it is about structures with consecutive (?) bit-fields
with different declared types). Though I presume the attribute is
harmless on other structures - so it might make sense to put it in
single.h and double.h as well to make it clear that those structures too
are expected to follow the same layout rules as those in extended.h and
quad.h.
> 2012-02-28 Kai Tietz <ktietz@redhat.com>
>
> * config/i386/sfp-machine.h (_FP_STRUCT_LAYOUT): Define it
> for mingw-targets as attribute gcc_struct.
> * soft-fp/soft-fp.h (_FP_STRUCT_LAYOUT): If not defined,
> define it as empty macro.
> * soft-fp/quad.h: Mark bitfield-structures by _FP_STRUCT_LAYOUT.
> * soft-fp/extended.h: Mark bitfield-structures by _FP_STRUCT_LAYOUT.
Please send patches to libc-alpha that apply cleanly to current git glibc.
That means only patching files present in glibc (not GCC's sfp-machine.h)
and having ChangeLog entries only for the files in glibc.
> Index: soft-fp/soft-fp.h
> ===================================================================
> --- soft-fp/soft-fp.h (revision 184486)
> +++ soft-fp/soft-fp.h (working copy)
> @@ -210,4 +210,8 @@
> extern void abort (void);
> #endif
>
> +#ifndef _FP_STRUCT_LAYOUT
> +#define _FP_STRUCT_LAYOUT
> #endif
I think this belongs at the bottom of the sequence of #ifndef default
definitions of various macros, not at the bottom of the whole file, and is
where the comment should go explaining why there is such a macro.
--
Joseph S. Myers
joseph@codesourcery.com