#include "soft-fp.h"
#include "quad-float128.h"
-#define COPYSIGN(x,y) __builtin_copysignf128 (x, y)
-#define INFINITY __builtin_inff128 ()
-#define FABS __builtin_fabsf128
+#ifndef __LONG_DOUBLE_IEEE128__
+#error "_divkc3.c needs to be compiled with -mabi=ieeelongdouble."
+#endif
+
+#define COPYSIGN(x,y) __builtin_copysignl (x, y)
+#define INFINITY __builtin_infl ()
+#define FABS __builtin_fabsl
#define isnan __builtin_isnan
#define isinf __builtin_isinf
#define isfinite __builtin_isfinite
#define __divkc3 __divkc3_sw
#endif
-#ifndef __LONG_DOUBLE_IEEE128__
-#define RBIG (__LIBGCC_KF_MAX__ / 2)
-#define RMIN (__LIBGCC_KF_MIN__)
-#define RMIN2 (__LIBGCC_KF_EPSILON__)
-#define RMINSCAL (1 / __LIBGCC_KF_EPSILON__)
-#define RMAX2 (RBIG * RMIN2)
-#else
#define RBIG (__LIBGCC_TF_MAX__ / 2)
#define RMIN (__LIBGCC_TF_MIN__)
#define RMIN2 (__LIBGCC_TF_EPSILON__)
#define RMINSCAL (1 / __LIBGCC_TF_EPSILON__)
#define RMAX2 (RBIG * RMIN2)
-#endif
TCtype
__divkc3 (TFtype a, TFtype b, TFtype c, TFtype d)
#include "soft-fp.h"
#include "quad-float128.h"
-#define COPYSIGN(x,y) __builtin_copysignf128 (x, y)
-#define INFINITY __builtin_inff128 ()
+#ifndef __LONG_DOUBLE_IEEE128__
+#error "_mulkc3.c needs to be compiled with -mabi=ieeelongdouble."
+#endif
+
+#define COPYSIGN(x,y) __builtin_copysignl (x, y)
+#define INFINITY __builtin_infl ()
#define isnan __builtin_isnan
#define isinf __builtin_isinf
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-/* quad.h defines the TFtype type by:
- typedef float TFtype __attribute__ ((mode (TF)));
-
- This define forces it to use KFmode (aka, ieee 128-bit floating point).
- However, when the compiler's default is changed so that long double is IEEE
- 128-bit floating point, we need to go back to using TFmode and TCmode. */
+/* Override quad.h's definitions for 128-bit floating point type. */
#ifndef __LONG_DOUBLE_IEEE128__
-#define TF KF
-
-/* We also need TCtype to represent complex ieee 128-bit float for
- __mulkc3 and __divkc3. */
-typedef __complex float TCtype __attribute__ ((mode (KC)));
+#define TFtype _Float128 /* long double is IBM. */
+#define TCtype _Complex _Float128
#else
-typedef __complex float TCtype __attribute__ ((mode (TC)));
+#define TFtype long double /* long double is IEEE. */
+#define TCtype _Complex long double
#endif
/* Force the use of the VSX instruction set. */
#endif
extern IBM128_TYPE __extendkftf2_sw (TFtype);
extern TFtype __trunctfkf2_sw (IBM128_TYPE);
+
+#ifdef __LONG_DOUBLE_IEEE128__
extern TCtype __mulkc3_sw (TFtype, TFtype, TFtype, TFtype);
extern TCtype __divkc3_sw (TFtype, TFtype, TFtype, TFtype);
+#endif
#ifdef _ARCH_PPC64
extern TItype_ppc __fixkfti (TFtype);
#endif
extern IBM128_TYPE __extendkftf2_hw (TFtype);
extern TFtype __trunctfkf2_hw (IBM128_TYPE);
+
+#ifdef __LONG_DOUBLE_IEEE128__
extern TCtype __mulkc3_hw (TFtype, TFtype, TFtype, TFtype);
extern TCtype __divkc3_hw (TFtype, TFtype, TFtype, TFtype);
+#endif
/* Ifunc function declarations, to automatically switch between software
emulation and hardware support. */
extern TFtype __trunctfkf2 (IBM128_TYPE);
/* Complex __float128 built on __float128 interfaces. */
+#ifdef __LONG_DOUBLE_IEEE128__
extern TCtype __mulkc3 (TFtype, TFtype, TFtype, TFtype);
extern TCtype __divkc3 (TFtype, TFtype, TFtype, TFtype);
+#endif
/* Convert IEEE 128-bit floating point to/from string. We explicitly use
_Float128 instead of TFmode because _strtokf and _strfromkf must be compiled