+2012-03-01 Kai Tietz <ktietz@redhat.com>
+
+ * soft-fp/soft-fp.h (_FP_STRUCT_LAYOUT): New macro.
+ * soft-fp/quad.h (_FP_UNION_Q): Use _FP_STRUCT_LAYOUT on struct
+ containing bit-fields.
+ * soft-fp/extended.h (_FP_UNION_E): Likewise.
+ * soft-fp/single.h (_FP_UNION_S): Likewise.
+ * soft-fp/double.h (_FP_UNION_D): Likewise.
+
2012-02-29 Joseph Myers <joseph@codesourcery.com>
[BZ #13786]
/* 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),
union _FP_UNION_D
{
DFtype flt;
- struct {
+ struct _FP_STRUCT_LAYOUT {
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned sign : 1;
unsigned exp : _FP_EXPBITS_D;
union _FP_UNION_D
{
DFtype flt;
- struct {
+ struct _FP_STRUCT_LAYOUT {
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned sign : 1;
unsigned exp : _FP_EXPBITS_D;
/* 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).
union _FP_UNION_E
{
XFtype flt;
- struct
+ struct _FP_STRUCT_LAYOUT
{
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned long pad1 : _FP_W_TYPE_SIZE;
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;
/* 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),
union _FP_UNION_Q
{
TFtype flt;
- struct
+ struct _FP_STRUCT_LAYOUT
{
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned sign : 1;
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;
/* 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),
union _FP_UNION_S
{
SFtype flt;
- struct {
+ struct _FP_STRUCT_LAYOUT {
#if __BYTE_ORDER == __BIG_ENDIAN
unsigned sign : 1;
unsigned exp : _FP_EXPBITS_S;
/* Software floating-point emulation.
- Copyright (C) 1997,1998,1999,2000,2002,2003,2005,2006,2007
+ Copyright (C) 1997,1998,1999,2000,2002,2003,2005,2006,2007,2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
#define FP_EX_DENORM 0
#endif
+/* _FP_STRUCT_LAYOUT may be defined as an attribute to determine the
+ struct layout variant used for structures where bit-fields are used
+ to access specific parts of binary floating-point numbers. This is
+ required for systems where the default ABI uses struct layout with
+ differences in how consecutive bit-fields are laid out from the
+ default expected by soft-fp. */
+#ifndef _FP_STRUCT_LAYOUT
+#define _FP_STRUCT_LAYOUT
+#endif
+
#ifdef _FP_DECL_EX
#define FP_DECL_EX \
int _fex = 0; \