summaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2014-09-08 12:25:35 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2014-09-08 12:25:35 +0000
commitb660d3c60af3cf1dd13ce767b1eee27eece4a707 (patch)
treee1ade5d91e8aa1cba8b8bc27ce1506044e9c2dcf /libgcc
parent2aeea85514f49736b212694f4e4cd5fb2878beef (diff)
downloadgcc-b660d3c60af3cf1dd13ce767b1eee27eece4a707.tar.gz
Remove SF_SIZE etc. target macros.
gcc: * config/i386/cygming.h (TF_SIZE): Remove. * config/i386/darwin.h (TF_SIZE): Remove. * config/i386/dragonfly.h (TF_SIZE): Remove. * config/i386/freebsd.h (TF_SIZE): Remove. * config/i386/gnu-user-common.h (TF_SIZE): Remove. * config/i386/openbsdelf.h (TF_SIZE): Remove. * config/i386/sol2.h (TF_SIZE): Remove. * config/ia64/hpux.h (XF_SIZE, TF_SIZE): Remove. * config/ia64/linux.h (TF_SIZE): Remove. * doc/tm.texi.in (SF_SIZE, DF_SIZE, XF_SIZE, TF_SIZE): Remove. * doc/tm.texi: Regenerate. * system.h (SF_SIZE, DF_SIZE, XF_SIZE, TF_SIZE): Poison. gcc/c-family: * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa digits of floating-point modes if -fbuilding-libgcc. libgcc: * libgcc2.c (SF_SIZE): Change all uses to __LIBGCC_SF_MANT_DIG__. (DF_SIZE): Change all uses to __LIBGCC_DF_MANT_DIG__. (XF_SIZE): Change all uses to __LIBGCC_XF_MANT_DIG__. (TF_SIZE): Change all uses to __LIBGCC_TF_MANT_DIG__. * libgcc2.h (SF_SIZE): Change to __LIBGCC_SF_MANT_DIG__. Give error if not defined and LIBGCC2_HAS_SF_MODE is defined. (DF_SIZE): Change to __LIBGCC_DF_MANT_DIG__. Give error if not defined and LIBGCC2_HAS_DF_MODE is defined. (XF_SIZE): Change to __LIBGCC_XF_MANT_DIG__. Give error if not defined and LIBGCC2_HAS_XF_MODE is defined. (TF_SIZE): Change to __LIBGCC_TF_MANT_DIG__. Give error if not defined and LIBGCC2_HAS_TF_MODE is defined. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215014 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog15
-rw-r--r--libgcc/libgcc2.c52
-rw-r--r--libgcc/libgcc2.h30
3 files changed, 53 insertions, 44 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 8133025a648..b53f2e82473 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,5 +1,20 @@
2014-09-08 Joseph Myers <joseph@codesourcery.com>
+ * libgcc2.c (SF_SIZE): Change all uses to __LIBGCC_SF_MANT_DIG__.
+ (DF_SIZE): Change all uses to __LIBGCC_DF_MANT_DIG__.
+ (XF_SIZE): Change all uses to __LIBGCC_XF_MANT_DIG__.
+ (TF_SIZE): Change all uses to __LIBGCC_TF_MANT_DIG__.
+ * libgcc2.h (SF_SIZE): Change to __LIBGCC_SF_MANT_DIG__. Give
+ error if not defined and LIBGCC2_HAS_SF_MODE is defined.
+ (DF_SIZE): Change to __LIBGCC_DF_MANT_DIG__. Give error if not
+ defined and LIBGCC2_HAS_DF_MODE is defined.
+ (XF_SIZE): Change to __LIBGCC_XF_MANT_DIG__. Give error if not
+ defined and LIBGCC2_HAS_XF_MODE is defined.
+ (TF_SIZE): Change to __LIBGCC_TF_MANT_DIG__. Give error if not
+ defined and LIBGCC2_HAS_TF_MODE is defined.
+
+2014-09-08 Joseph Myers <joseph@codesourcery.com>
+
* fp-bit.c (pack_d, unpack_d): Remove LARGEST_EXPONENT_IS_NORMAL
and ROUND_TOWARDS_ZERO conditionals.
diff --git a/libgcc/libgcc2.c b/libgcc/libgcc2.c
index aea476a34e6..2800fe949e2 100644
--- a/libgcc/libgcc2.c
+++ b/libgcc/libgcc2.c
@@ -1506,7 +1506,7 @@ __fixsfdi (SFtype a)
XFtype
__floatdixf (DWtype u)
{
-#if W_TYPE_SIZE > XF_SIZE
+#if W_TYPE_SIZE > __LIBGCC_XF_MANT_DIG__
# error
#endif
XFtype d = (Wtype) (u >> W_TYPE_SIZE);
@@ -1520,7 +1520,7 @@ __floatdixf (DWtype u)
XFtype
__floatundixf (UDWtype u)
{
-#if W_TYPE_SIZE > XF_SIZE
+#if W_TYPE_SIZE > __LIBGCC_XF_MANT_DIG__
# error
#endif
XFtype d = (UWtype) (u >> W_TYPE_SIZE);
@@ -1534,7 +1534,7 @@ __floatundixf (UDWtype u)
TFtype
__floatditf (DWtype u)
{
-#if W_TYPE_SIZE > TF_SIZE
+#if W_TYPE_SIZE > __LIBGCC_TF_MANT_DIG__
# error
#endif
TFtype d = (Wtype) (u >> W_TYPE_SIZE);
@@ -1548,7 +1548,7 @@ __floatditf (DWtype u)
TFtype
__floatunditf (UDWtype u)
{
-#if W_TYPE_SIZE > TF_SIZE
+#if W_TYPE_SIZE > __LIBGCC_TF_MANT_DIG__
# error
#endif
TFtype d = (UWtype) (u >> W_TYPE_SIZE);
@@ -1568,11 +1568,11 @@ __floatunditf (UDWtype u)
#if defined(L_floatdisf)
#define FUNC __floatdisf
#define FSTYPE SFtype
-#define FSSIZE SF_SIZE
+#define FSSIZE __LIBGCC_SF_MANT_DIG__
#else
#define FUNC __floatdidf
#define FSTYPE DFtype
-#define FSSIZE DF_SIZE
+#define FSSIZE __LIBGCC_DF_MANT_DIG__
#endif
FSTYPE
@@ -1584,18 +1584,18 @@ FUNC (DWtype u)
f *= Wtype_MAXp1_F;
f += (UWtype)u;
return f;
-#elif (LIBGCC2_HAS_DF_MODE && F_MODE_OK (DF_SIZE)) \
- || (LIBGCC2_HAS_XF_MODE && F_MODE_OK (XF_SIZE)) \
- || (LIBGCC2_HAS_TF_MODE && F_MODE_OK (TF_SIZE))
+#elif (LIBGCC2_HAS_DF_MODE && F_MODE_OK (__LIBGCC_DF_MANT_DIG__)) \
+ || (LIBGCC2_HAS_XF_MODE && F_MODE_OK (__LIBGCC_XF_MANT_DIG__)) \
+ || (LIBGCC2_HAS_TF_MODE && F_MODE_OK (__LIBGCC_TF_MANT_DIG__))
-#if (LIBGCC2_HAS_DF_MODE && F_MODE_OK (DF_SIZE))
-# define FSIZE DF_SIZE
+#if (LIBGCC2_HAS_DF_MODE && F_MODE_OK (__LIBGCC_DF_MANT_DIG__))
+# define FSIZE __LIBGCC_DF_MANT_DIG__
# define FTYPE DFtype
-#elif (LIBGCC2_HAS_XF_MODE && F_MODE_OK (XF_SIZE))
-# define FSIZE XF_SIZE
+#elif (LIBGCC2_HAS_XF_MODE && F_MODE_OK (__LIBGCC_XF_MANT_DIG__))
+# define FSIZE __LIBGCC_XF_MANT_DIG__
# define FTYPE XFtype
-#elif (LIBGCC2_HAS_TF_MODE && F_MODE_OK (TF_SIZE))
-# define FSIZE TF_SIZE
+#elif (LIBGCC2_HAS_TF_MODE && F_MODE_OK (__LIBGCC_TF_MANT_DIG__))
+# define FSIZE __LIBGCC_TF_MANT_DIG__
# define FTYPE TFtype
#else
# error
@@ -1684,11 +1684,11 @@ FUNC (DWtype u)
#if defined(L_floatundisf)
#define FUNC __floatundisf
#define FSTYPE SFtype
-#define FSSIZE SF_SIZE
+#define FSSIZE __LIBGCC_SF_MANT_DIG__
#else
#define FUNC __floatundidf
#define FSTYPE DFtype
-#define FSSIZE DF_SIZE
+#define FSSIZE __LIBGCC_DF_MANT_DIG__
#endif
FSTYPE
@@ -1700,18 +1700,18 @@ FUNC (UDWtype u)
f *= Wtype_MAXp1_F;
f += (UWtype)u;
return f;
-#elif (LIBGCC2_HAS_DF_MODE && F_MODE_OK (DF_SIZE)) \
- || (LIBGCC2_HAS_XF_MODE && F_MODE_OK (XF_SIZE)) \
- || (LIBGCC2_HAS_TF_MODE && F_MODE_OK (TF_SIZE))
+#elif (LIBGCC2_HAS_DF_MODE && F_MODE_OK (__LIBGCC_DF_MANT_DIG__)) \
+ || (LIBGCC2_HAS_XF_MODE && F_MODE_OK (__LIBGCC_XF_MANT_DIG__)) \
+ || (LIBGCC2_HAS_TF_MODE && F_MODE_OK (__LIBGCC_TF_MANT_DIG__))
-#if (LIBGCC2_HAS_DF_MODE && F_MODE_OK (DF_SIZE))
-# define FSIZE DF_SIZE
+#if (LIBGCC2_HAS_DF_MODE && F_MODE_OK (__LIBGCC_DF_MANT_DIG__))
+# define FSIZE __LIBGCC_DF_MANT_DIG__
# define FTYPE DFtype
-#elif (LIBGCC2_HAS_XF_MODE && F_MODE_OK (XF_SIZE))
-# define FSIZE XF_SIZE
+#elif (LIBGCC2_HAS_XF_MODE && F_MODE_OK (__LIBGCC_XF_MANT_DIG__))
+# define FSIZE __LIBGCC_XF_MANT_DIG__
# define FTYPE XFtype
-#elif (LIBGCC2_HAS_TF_MODE && F_MODE_OK (TF_SIZE))
-# define FSIZE TF_SIZE
+#elif (LIBGCC2_HAS_TF_MODE && F_MODE_OK (__LIBGCC_TF_MANT_DIG__))
+# define FSIZE __LIBGCC_TF_MANT_DIG__
# define FTYPE TFtype
#else
# error
diff --git a/libgcc/libgcc2.h b/libgcc/libgcc2.h
index 498ecdfb351..8abd0b7f8bc 100644
--- a/libgcc/libgcc2.h
+++ b/libgcc/libgcc2.h
@@ -59,41 +59,35 @@ extern void __eprintf (const char *, const char *, unsigned int, const char *)
(BITS_PER_UNIT == 8 && LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128)
#endif
-#ifndef SF_SIZE
+#ifndef __LIBGCC_SF_MANT_DIG__
#if LIBGCC2_HAS_SF_MODE
-#define SF_SIZE FLT_MANT_DIG
+#error __LIBGCC_SF_MANT_DIG__ not defined
#else
-#define SF_SIZE 0
+#define __LIBGCC_SF_MANT_DIG__ 0
#endif
#endif
-#ifndef DF_SIZE
+#ifndef __LIBGCC_DF_MANT_DIG__
#if LIBGCC2_HAS_DF_MODE
-#if __SIZEOF_DOUBLE__ * __CHAR_BIT__ == 64
-#define DF_SIZE DBL_MANT_DIG
-#elif LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 64
-#define DF_SIZE LDBL_MANT_DIG
+#error __LIBGCC_DF_MANT_DIG__ not defined
#else
-#define DF_SIZE 0
-#endif
-#else
-#define DF_SIZE 0
+#define __LIBGCC_DF_MANT_DIG__ 0
#endif
#endif
-#ifndef XF_SIZE
+#ifndef __LIBGCC_XF_MANT_DIG__
#if LIBGCC2_HAS_XF_MODE
-#define XF_SIZE LDBL_MANT_DIG
+#error __LIBGCC_XF_MANT_DIG__ not defined
#else
-#define XF_SIZE 0
+#define __LIBGCC_XF_MANT_DIG__ 0
#endif
#endif
-#ifndef TF_SIZE
+#ifndef __LIBGCC_TF_MANT_DIG__
#if LIBGCC2_HAS_TF_MODE
-#define TF_SIZE LDBL_MANT_DIG
+#error __LIBGCC_TF_MANT_DIG__ not defined
#else
-#define TF_SIZE 0
+#define __LIBGCC_TF_MANT_DIG__ 0
#endif
#endif