2000-07-03 17:06:12 +02:00
|
|
|
/* Header file for fp-bit.c. */
|
Makefile.in (FPBIT_FUNCS, [...]): Remove.
gcc:
* Makefile.in (FPBIT_FUNCS, DPBIT_FUNCS, TPBIT_FUNCS): Remove.
(libgcc-support): Remove $(FPBIT), $(DPBIT), $(TPBIT)
dependencies.
(libgcc.mvars): Remove FPBIT, FPBIT_FUNCS, DPBIT, DPBIT_FUNCS,
TPBIT, TPBIT_FUNCS.
* config/fp-bit.c, config/fp-bit.h: Move to ../libgcc.
* config/arm/t-strongarm-elf (FPBIT, DPBIT, dp-bit.c, fp-bit.c):
Remove.
* config/arm/t-vxworks: Likewise.
* config/arm/t-wince-pe: Likewise.
* config/avr/t-avr (fp-bit.c, FPBIT): Remove.
* config/bfin/t-bfin (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
* config/bfin/t-bfin-elf: Likewise.
* config/bfin/t-bfin-linux: Likewise.
* config/bfin/t-bfin-uclinux: Likewise.
* config/cris/t-cris (FPBIT, DPBIT, dp-bit.c, tmplibgcc_fp_bit.c):
Remove.
* config/fr30/t-fr30: Likewise.
* config/frv/t-frv: Likewise.
* config/h8300/t-h8300 (FPBIT, fp-bit.c): Remove.
* config/iq2000/t-iq2000 (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
* config/m32c/t-m32c: Likewise.
* config/m32r/t-linux: (LIB2FUNCS_EXTRA, fp-bit.c, dp-bit.c): Remove.
* config/m32r/t-m32r (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
* config/mcore/t-mcore: Likewise.
* config/mep/t-mep: Likewise.
* config/microblaze/t-microblaze: Likewise.
* config/mips/t-linux64 (TPBIT, tp-bit.c): Remove.
* config/mips/t-mips (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
* config/mips/t-sdemtk (FPBIT, DPBIT): Remove.
* config/mips/t-sr71k (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
* config/mn10300/t-linux: Remove.
* config/mn10300/t-mn10300 (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
* config/pdp11/t-pdp11: Likewise.
* config/picochip/t-picochip (FPBIT, fp-bit.c): Remove.
* config/rs6000/ppc64-fp.c: Move to ../libgcc/config/rs6000.
* config/rs6000/t-aix43 (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
(LIB2FUNCS_EXTRA): Remove $(srcdir)/config/rs6000/ppc64-fp.c.
* config/rs6000/t-aix52: Likewise.
* config/rs6000/t-darwin (LIB2FUNCS_EXTRA): Remove
$(srcdir)/config/rs6000/ppc64-fp.c.
* config/rs6000/t-fprules-fpbit: Remove.
* config/rs6000/t-linux64 (LIB2FUNCS_EXTRA): Remove.
* config/rs6000/t-lynx (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
* config/sh/t-netbsd (FPBIT, DPBIT): Remove.
* config/sh/t-sh (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
* config/sparc/t-elf: Likewise.
* config/sparc/t-leon: Likewise.
* config/sparc/t-leon3: Likewise.
* config/spu/t-spu-elf: Likewise.
(DPBIT_FUNCS): Remove.
* config/stormy16/t-stormy16 (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
* config/v850/t-v850: Likewise.
* config.gcc (avr-*-rtems*): Add avr/avr-lib.h to libgcc_tm_file.
(avr-*-*): Likewise.
(h8300-*-rtems*): Set libgcc_tm_file.
(h8300-*-elf*): Likewise.
(powerpc-*-eabisimaltivec*): Remove rs6000/t-fprules-fpbit from
tmake_file.
(powerpc-*-eabisim*): Likewise.
(powerpc-*-elf*): Likewise.
(powerpc-*-eabialtivec*): Likewise.
(powerpc-xilinx-eabi*): Likewise.
(powerpc-*-eabi*): Likewise.
(powerpc-*-rtems*): Likewise.
(powerpc-wrs-vxworks, powerpc-wrs-vxworksae): Likewise.
(powerpcle-*-elf*): Likewise.
(powerpcle-*-eabisim*): Likewise.
(powerpcle-*-eabi*): Likewise.
(rx-*-elf*): Add rx/rx-lib.h to libgcc_tm_file.
(am33_2.0-*-linux*): Remove mn10300/t-linux from tmake_file.
* doc/fragments.texi (Target Fragment, Floating Point Emulation):
Remove.
gcc/po:
* EXCLUDES (config/fp-bit.c, config/fp-bit.h): Remove.
libgcc:
* Makefile.in (double_type_size, long_double_type_size): Set.
Remove $(fpbit-in-libgcc) support.
(FPBIT_FUNCS, DPBIT_FUNCS, TPBIT_FUNCS): New variables.
(fpbit-src): New variable.
($(fpbit-o), $(fpbit-s-o)): Use $(fpbit-src) instead of $(FPBIT).
Compile with -DFLOAT $(FPBIT_CFLAGS).
Use $<.
($(dpbit-o), $(dpbit-s-o)): Use $(fpbit-src) instead of $(DPBIT).
Compile with $(FPBIT_CFLAGS).
Use $<.
($(tpbit-o), $(tpbit-s-o): Use $(fpbit-src) instead of $(TPBIT).
Compile with -DFLOAT $(TPBIT_CFLAGS).
Use $<.
* configure.ac (double_type_size, long_double_type_size):
Determine and substitute.
* configure: Regenerate.
* fp-bit.c, fp-bit.h: New files.
* config/avr/avr-lib.h, config/h8300/h8300-lib.h: New files.
* config/mips/t-irix6 (TPBIT, $(gcc_objdir)/tp-bit.c): Remove.
* config/mips/t-mips: New file.
* config/mips/t-sdemtk: New file.
* config/rs6000/ppc64-fp.c: New file.
* config/rs6000/t-darwin (LIB2ADD): Add
$(srcdir)/config/rs6000/ppc64-fp.c.
* config/rs6000/t-ppc64-fp: New file.
* config/rx/rx-lib.h: New file.
* config/rx/t-rx (FPBIT): Set to true.
($(gcc_objdir)/fp-bit.c): Remove.
(DPBIT): Set to true only with -m64bit-doubles.
($(gcc_objdir)/dp-bit.c): Remove.
* config/sparc/t-softfp: Remove.
* config/spu/t-elf: New file.
* config/t-fdpbit, config/t-fpbit: New files.
* config.host (m32c*-*-*): Add t-fdpbit to tmake_file.
(mips*-*-*): Likewise.
(arm-wrs-vxworks): Likewise.
(arm*-*-freebsd*): Likewise.
(avr-*-rtems*): Add t-fpbit to tmake_file.
(avr-*-*): Likewise.
(bfin*-elf*): Add t-fdpbit to tmake_file.
(bfin*-uclinux*): Likewise.
(bfin*-linux-uclibc*): Likewise.
(bfin*-rtems*): New case.
Add t-fdpbit to tmake_file.
(bfin*-*): Add t-fdpbit to tmake_file.
(crisv32-*-elf): Likewise.
(cris-*-linux*): Likewise.
(fr30-*-elf): Likewise.
(frv-*-elf, frv-*-*linux*): Likewise.
(h8300-*-rtems*, h8300-*-elf*): Add t-fpbit to tmake_file.
(iq2000*-*-elf*): Add t-fdpbit to tmake_file.
(m32r-*-elf*): Likewise.
(m32rle-*-elf*): Likewise.
(m32r-*-linux*): Likewise.
(m32rle-*-linux*): Likewise.
(mcore-*-elf): Add t-fdpbit to tmake_file.
(microblaze*-*-*): Likewise.
(mips-sgi-irix6.5*): Add t-tpbit to tmake_file.
(mips*-*-netbsd*): Add mips/t-mips to tmake_file.
(mips64*-*-linux*): Also handle mipsisa64*-*-linux*.
Fix typo.
Add mips/t-tpbit to tmake-file.
(mips*-*-linux*): Fix typo.
(mips*-sde-elf*): New case
Add mips/t-sdemtk unless using newlib.
(mipsisa64sr71k-*-elf*): Add t-fdpbit to tmake_file.
(mipsisa64sb1-*-elf*): Add mips/t-mips to tmake_file.
(mn10300-*-*): Likewise.
(pdp11-*-*): Likewise.
(picochip-*-*): Add t-fpbit to tmake_file.
(powerpc-*-eabisimaltivec*): Likewise.
(powerpc-*-eabisim*): Likewise.
(powerpc-*-elf*): Likewise.
(powerpc-*-eabialtivec*): Likewise.
(powerpc-xilinx-eabi*): New case.
Add t-fdpbit to tmake_file.
(powerpc-*-eabi*): Add t-fdpbit to tmake_file.
(powerpc-*-rtems*): Likewise.
(powerpc-*-linux*, powerpc64-*-linux*): Add rs6000/t-ppc64-fp to
tmake_file.
(powerpc-wrs-vxworks, powerpc-wrs-vxworksae): Add t-fdpbit to
tmake_file.
(powerpc-*-lynxos*): Likewise.
(powerpcle-*-elf*): Likewise.
(powerpcle-*-eabisim*): Likewise.
(powerpcle-*-eabi*): Likewise.
(rs6000-ibm-aix4.[3456789]*, powerpc-ibm-aix4.[3456789]*): Add
t-fdpbit, rs6000/t-ppc64-fp to tmake_file.
(rs6000-ibm-aix5.1.*, powerpc-ibm-aix5.1.*): Likewise.
(rs6000-ibm-aix[56789].*, powerpc-ibm-aix[56789].*): Likewise.
(rx-*-elf): Add t-fdpbit to tmake_file.
(sh-*-elf*, sh[12346l]*-*-elf*, sh-*-linux*)
(sh[2346lbe]*-*-linux*, sh-*-netbsdelf*, shl*-*-netbsdelf*)
(sh5-*-netbsd*, sh5l*-*-netbsd*, sh64-*-netbsd*)
(sh64l*-*-netbsd*): Add t-fdpbit to tmake_file except on
sh*-*-netbsd*.
(sh-*-rtems*): Add t-fdpbit to tmake_file.
(sh-wrs-vxworks): Likewise.
(sparc-*-elf*): Replace sparc/t-softfp by t-fdpbit in tmake_file.
(sparc-*-linux*): Add t-fdpbit to tmake_file for *-leon*.
(sparc-*-rtems*, sparc64-*-rtems*): Split off ...
(sparc64-*-rtems*): ... new case.
(sparc-*-rtems*): Add t-fdpbit to tmake_file.
(spu-*-elf*): Likewise.
Add spu/t-elf to tmake_file.
(v850*-*-*): Add t-fdpbit to tmake_file.
(xstormy16-*-elf): Likewise.
(am33_2.0-*-linux*): Add t-fdpbit to tmake_file.
(mep*-*-*): Likewise.
From-SVN: r177448
2011-08-05 16:53:09 +02:00
|
|
|
/* Copyright (C) 2000, 2002, 2003, 2006, 2009, 2010, 2011
|
2010-12-15 23:55:53 +01:00
|
|
|
Free Software Foundation, Inc.
|
2000-07-03 17:06:12 +02:00
|
|
|
|
2003-09-27 06:48:30 +02:00
|
|
|
This file is part of GCC.
|
2000-07-03 17:06:12 +02:00
|
|
|
|
2006-01-04 04:42:02 +01:00
|
|
|
GCC is free software; you can redistribute it and/or modify it under
|
|
|
|
the terms of the GNU General Public License as published by the Free
|
2009-04-09 17:00:19 +02:00
|
|
|
Software Foundation; either version 3, or (at your option) any later
|
2006-01-04 04:42:02 +01:00
|
|
|
version.
|
|
|
|
|
|
|
|
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
for more details.
|
2000-07-03 17:06:12 +02:00
|
|
|
|
2009-04-09 17:00:19 +02:00
|
|
|
Under Section 7 of GPL version 3, you are granted additional
|
|
|
|
permissions described in the GCC Runtime Library Exception, version
|
|
|
|
3.1, as published by the Free Software Foundation.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License and
|
|
|
|
a copy of the GCC Runtime Library Exception along with this program;
|
|
|
|
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|
|
|
<http://www.gnu.org/licenses/>. */
|
2000-07-03 17:06:12 +02:00
|
|
|
|
2001-05-26 03:31:47 +02:00
|
|
|
#ifndef GCC_FP_BIT_H
|
|
|
|
#define GCC_FP_BIT_H
|
2000-07-03 17:06:12 +02:00
|
|
|
|
|
|
|
/* Defining FINE_GRAINED_LIBRARIES allows one to select which routines
|
|
|
|
from this file are compiled via additional -D options.
|
|
|
|
|
|
|
|
This avoids the need to pull in the entire fp emulation library
|
|
|
|
when only a small number of functions are needed.
|
|
|
|
|
2002-06-20 01:01:59 +02:00
|
|
|
If FINE_GRAINED_LIBRARIES is not defined, then compile every
|
2000-07-03 17:06:12 +02:00
|
|
|
suitable routine. */
|
|
|
|
#ifndef FINE_GRAINED_LIBRARIES
|
|
|
|
#define L_pack_df
|
|
|
|
#define L_unpack_df
|
|
|
|
#define L_pack_sf
|
|
|
|
#define L_unpack_sf
|
|
|
|
#define L_addsub_sf
|
|
|
|
#define L_addsub_df
|
|
|
|
#define L_mul_sf
|
|
|
|
#define L_mul_df
|
|
|
|
#define L_div_sf
|
|
|
|
#define L_div_df
|
|
|
|
#define L_fpcmp_parts_sf
|
|
|
|
#define L_fpcmp_parts_df
|
|
|
|
#define L_compare_sf
|
|
|
|
#define L_compare_df
|
|
|
|
#define L_eq_sf
|
|
|
|
#define L_eq_df
|
|
|
|
#define L_ne_sf
|
|
|
|
#define L_ne_df
|
|
|
|
#define L_gt_sf
|
|
|
|
#define L_gt_df
|
|
|
|
#define L_ge_sf
|
|
|
|
#define L_ge_df
|
|
|
|
#define L_lt_sf
|
|
|
|
#define L_lt_df
|
|
|
|
#define L_le_sf
|
|
|
|
#define L_le_df
|
|
|
|
#define L_unord_sf
|
|
|
|
#define L_unord_df
|
2000-09-08 22:16:40 +02:00
|
|
|
#define L_usi_to_sf
|
|
|
|
#define L_usi_to_df
|
2000-07-03 17:06:12 +02:00
|
|
|
#define L_si_to_sf
|
|
|
|
#define L_si_to_df
|
|
|
|
#define L_sf_to_si
|
|
|
|
#define L_df_to_si
|
|
|
|
#define L_f_to_usi
|
|
|
|
#define L_df_to_usi
|
|
|
|
#define L_negate_sf
|
|
|
|
#define L_negate_df
|
|
|
|
#define L_make_sf
|
|
|
|
#define L_make_df
|
|
|
|
#define L_sf_to_df
|
|
|
|
#define L_df_to_sf
|
|
|
|
#ifdef FLOAT
|
|
|
|
#define L_thenan_sf
|
|
|
|
#else
|
|
|
|
#define L_thenan_df
|
|
|
|
#endif
|
|
|
|
#endif /* ! FINE_GRAINED_LIBRARIES */
|
|
|
|
|
2003-01-26 11:06:57 +01:00
|
|
|
#if __LDBL_MANT_DIG__ == 113 || __LDBL_MANT_DIG__ == 106
|
2006-01-27 20:59:49 +01:00
|
|
|
# if defined(TFLOAT) || defined(L_sf_to_tf) || defined(L_df_to_tf)
|
|
|
|
# define TMODES
|
|
|
|
# endif
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#endif
|
|
|
|
|
2000-07-03 17:06:12 +02:00
|
|
|
typedef float SFtype __attribute__ ((mode (SF)));
|
|
|
|
typedef float DFtype __attribute__ ((mode (DF)));
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#ifdef TMODES
|
|
|
|
typedef float TFtype __attribute__ ((mode (TF)));
|
|
|
|
#endif
|
2000-07-03 17:06:12 +02:00
|
|
|
|
|
|
|
typedef int HItype __attribute__ ((mode (HI)));
|
|
|
|
typedef int SItype __attribute__ ((mode (SI)));
|
|
|
|
typedef int DItype __attribute__ ((mode (DI)));
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#ifdef TMODES
|
|
|
|
typedef int TItype __attribute__ ((mode (TI)));
|
|
|
|
#endif
|
2000-07-03 17:06:12 +02:00
|
|
|
|
2006-03-08 00:41:00 +01:00
|
|
|
/* The type of the result of a floating point comparison. This must
|
2007-09-01 00:45:43 +02:00
|
|
|
match `__libgcc_cmp_return__' in GCC for the target. */
|
2000-07-03 17:06:12 +02:00
|
|
|
#ifndef CMPtype
|
2007-09-01 00:45:43 +02:00
|
|
|
typedef int CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
|
2000-07-03 17:06:12 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef unsigned int UHItype __attribute__ ((mode (HI)));
|
|
|
|
typedef unsigned int USItype __attribute__ ((mode (SI)));
|
|
|
|
typedef unsigned int UDItype __attribute__ ((mode (DI)));
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#ifdef TMODES
|
|
|
|
typedef unsigned int UTItype __attribute__ ((mode (TI)));
|
|
|
|
#endif
|
2000-07-03 17:06:12 +02:00
|
|
|
|
2001-02-02 12:02:05 +01:00
|
|
|
#define MAX_USI_INT (~(USItype)0)
|
|
|
|
#define MAX_SI_INT ((SItype) (MAX_USI_INT >> 1))
|
|
|
|
#define BITS_PER_SI (4 * BITS_PER_UNIT)
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#ifdef TMODES
|
|
|
|
#define MAX_UDI_INT (~(UDItype)0)
|
|
|
|
#define MAX_DI_INT ((DItype) (MAX_UDI_INT >> 1))
|
|
|
|
#define BITS_PER_DI (8 * BITS_PER_UNIT)
|
|
|
|
#endif
|
2000-07-03 17:06:12 +02:00
|
|
|
|
|
|
|
#ifdef FLOAT_ONLY
|
|
|
|
#define NO_DI_MODE
|
|
|
|
#endif
|
|
|
|
|
Makefile.in (FPBIT_FUNCS, [...]): Remove.
gcc:
* Makefile.in (FPBIT_FUNCS, DPBIT_FUNCS, TPBIT_FUNCS): Remove.
(libgcc-support): Remove $(FPBIT), $(DPBIT), $(TPBIT)
dependencies.
(libgcc.mvars): Remove FPBIT, FPBIT_FUNCS, DPBIT, DPBIT_FUNCS,
TPBIT, TPBIT_FUNCS.
* config/fp-bit.c, config/fp-bit.h: Move to ../libgcc.
* config/arm/t-strongarm-elf (FPBIT, DPBIT, dp-bit.c, fp-bit.c):
Remove.
* config/arm/t-vxworks: Likewise.
* config/arm/t-wince-pe: Likewise.
* config/avr/t-avr (fp-bit.c, FPBIT): Remove.
* config/bfin/t-bfin (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
* config/bfin/t-bfin-elf: Likewise.
* config/bfin/t-bfin-linux: Likewise.
* config/bfin/t-bfin-uclinux: Likewise.
* config/cris/t-cris (FPBIT, DPBIT, dp-bit.c, tmplibgcc_fp_bit.c):
Remove.
* config/fr30/t-fr30: Likewise.
* config/frv/t-frv: Likewise.
* config/h8300/t-h8300 (FPBIT, fp-bit.c): Remove.
* config/iq2000/t-iq2000 (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
* config/m32c/t-m32c: Likewise.
* config/m32r/t-linux: (LIB2FUNCS_EXTRA, fp-bit.c, dp-bit.c): Remove.
* config/m32r/t-m32r (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
* config/mcore/t-mcore: Likewise.
* config/mep/t-mep: Likewise.
* config/microblaze/t-microblaze: Likewise.
* config/mips/t-linux64 (TPBIT, tp-bit.c): Remove.
* config/mips/t-mips (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
* config/mips/t-sdemtk (FPBIT, DPBIT): Remove.
* config/mips/t-sr71k (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
* config/mn10300/t-linux: Remove.
* config/mn10300/t-mn10300 (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
* config/pdp11/t-pdp11: Likewise.
* config/picochip/t-picochip (FPBIT, fp-bit.c): Remove.
* config/rs6000/ppc64-fp.c: Move to ../libgcc/config/rs6000.
* config/rs6000/t-aix43 (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
(LIB2FUNCS_EXTRA): Remove $(srcdir)/config/rs6000/ppc64-fp.c.
* config/rs6000/t-aix52: Likewise.
* config/rs6000/t-darwin (LIB2FUNCS_EXTRA): Remove
$(srcdir)/config/rs6000/ppc64-fp.c.
* config/rs6000/t-fprules-fpbit: Remove.
* config/rs6000/t-linux64 (LIB2FUNCS_EXTRA): Remove.
* config/rs6000/t-lynx (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
* config/sh/t-netbsd (FPBIT, DPBIT): Remove.
* config/sh/t-sh (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
* config/sparc/t-elf: Likewise.
* config/sparc/t-leon: Likewise.
* config/sparc/t-leon3: Likewise.
* config/spu/t-spu-elf: Likewise.
(DPBIT_FUNCS): Remove.
* config/stormy16/t-stormy16 (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
* config/v850/t-v850: Likewise.
* config.gcc (avr-*-rtems*): Add avr/avr-lib.h to libgcc_tm_file.
(avr-*-*): Likewise.
(h8300-*-rtems*): Set libgcc_tm_file.
(h8300-*-elf*): Likewise.
(powerpc-*-eabisimaltivec*): Remove rs6000/t-fprules-fpbit from
tmake_file.
(powerpc-*-eabisim*): Likewise.
(powerpc-*-elf*): Likewise.
(powerpc-*-eabialtivec*): Likewise.
(powerpc-xilinx-eabi*): Likewise.
(powerpc-*-eabi*): Likewise.
(powerpc-*-rtems*): Likewise.
(powerpc-wrs-vxworks, powerpc-wrs-vxworksae): Likewise.
(powerpcle-*-elf*): Likewise.
(powerpcle-*-eabisim*): Likewise.
(powerpcle-*-eabi*): Likewise.
(rx-*-elf*): Add rx/rx-lib.h to libgcc_tm_file.
(am33_2.0-*-linux*): Remove mn10300/t-linux from tmake_file.
* doc/fragments.texi (Target Fragment, Floating Point Emulation):
Remove.
gcc/po:
* EXCLUDES (config/fp-bit.c, config/fp-bit.h): Remove.
libgcc:
* Makefile.in (double_type_size, long_double_type_size): Set.
Remove $(fpbit-in-libgcc) support.
(FPBIT_FUNCS, DPBIT_FUNCS, TPBIT_FUNCS): New variables.
(fpbit-src): New variable.
($(fpbit-o), $(fpbit-s-o)): Use $(fpbit-src) instead of $(FPBIT).
Compile with -DFLOAT $(FPBIT_CFLAGS).
Use $<.
($(dpbit-o), $(dpbit-s-o)): Use $(fpbit-src) instead of $(DPBIT).
Compile with $(FPBIT_CFLAGS).
Use $<.
($(tpbit-o), $(tpbit-s-o): Use $(fpbit-src) instead of $(TPBIT).
Compile with -DFLOAT $(TPBIT_CFLAGS).
Use $<.
* configure.ac (double_type_size, long_double_type_size):
Determine and substitute.
* configure: Regenerate.
* fp-bit.c, fp-bit.h: New files.
* config/avr/avr-lib.h, config/h8300/h8300-lib.h: New files.
* config/mips/t-irix6 (TPBIT, $(gcc_objdir)/tp-bit.c): Remove.
* config/mips/t-mips: New file.
* config/mips/t-sdemtk: New file.
* config/rs6000/ppc64-fp.c: New file.
* config/rs6000/t-darwin (LIB2ADD): Add
$(srcdir)/config/rs6000/ppc64-fp.c.
* config/rs6000/t-ppc64-fp: New file.
* config/rx/rx-lib.h: New file.
* config/rx/t-rx (FPBIT): Set to true.
($(gcc_objdir)/fp-bit.c): Remove.
(DPBIT): Set to true only with -m64bit-doubles.
($(gcc_objdir)/dp-bit.c): Remove.
* config/sparc/t-softfp: Remove.
* config/spu/t-elf: New file.
* config/t-fdpbit, config/t-fpbit: New files.
* config.host (m32c*-*-*): Add t-fdpbit to tmake_file.
(mips*-*-*): Likewise.
(arm-wrs-vxworks): Likewise.
(arm*-*-freebsd*): Likewise.
(avr-*-rtems*): Add t-fpbit to tmake_file.
(avr-*-*): Likewise.
(bfin*-elf*): Add t-fdpbit to tmake_file.
(bfin*-uclinux*): Likewise.
(bfin*-linux-uclibc*): Likewise.
(bfin*-rtems*): New case.
Add t-fdpbit to tmake_file.
(bfin*-*): Add t-fdpbit to tmake_file.
(crisv32-*-elf): Likewise.
(cris-*-linux*): Likewise.
(fr30-*-elf): Likewise.
(frv-*-elf, frv-*-*linux*): Likewise.
(h8300-*-rtems*, h8300-*-elf*): Add t-fpbit to tmake_file.
(iq2000*-*-elf*): Add t-fdpbit to tmake_file.
(m32r-*-elf*): Likewise.
(m32rle-*-elf*): Likewise.
(m32r-*-linux*): Likewise.
(m32rle-*-linux*): Likewise.
(mcore-*-elf): Add t-fdpbit to tmake_file.
(microblaze*-*-*): Likewise.
(mips-sgi-irix6.5*): Add t-tpbit to tmake_file.
(mips*-*-netbsd*): Add mips/t-mips to tmake_file.
(mips64*-*-linux*): Also handle mipsisa64*-*-linux*.
Fix typo.
Add mips/t-tpbit to tmake-file.
(mips*-*-linux*): Fix typo.
(mips*-sde-elf*): New case
Add mips/t-sdemtk unless using newlib.
(mipsisa64sr71k-*-elf*): Add t-fdpbit to tmake_file.
(mipsisa64sb1-*-elf*): Add mips/t-mips to tmake_file.
(mn10300-*-*): Likewise.
(pdp11-*-*): Likewise.
(picochip-*-*): Add t-fpbit to tmake_file.
(powerpc-*-eabisimaltivec*): Likewise.
(powerpc-*-eabisim*): Likewise.
(powerpc-*-elf*): Likewise.
(powerpc-*-eabialtivec*): Likewise.
(powerpc-xilinx-eabi*): New case.
Add t-fdpbit to tmake_file.
(powerpc-*-eabi*): Add t-fdpbit to tmake_file.
(powerpc-*-rtems*): Likewise.
(powerpc-*-linux*, powerpc64-*-linux*): Add rs6000/t-ppc64-fp to
tmake_file.
(powerpc-wrs-vxworks, powerpc-wrs-vxworksae): Add t-fdpbit to
tmake_file.
(powerpc-*-lynxos*): Likewise.
(powerpcle-*-elf*): Likewise.
(powerpcle-*-eabisim*): Likewise.
(powerpcle-*-eabi*): Likewise.
(rs6000-ibm-aix4.[3456789]*, powerpc-ibm-aix4.[3456789]*): Add
t-fdpbit, rs6000/t-ppc64-fp to tmake_file.
(rs6000-ibm-aix5.1.*, powerpc-ibm-aix5.1.*): Likewise.
(rs6000-ibm-aix[56789].*, powerpc-ibm-aix[56789].*): Likewise.
(rx-*-elf): Add t-fdpbit to tmake_file.
(sh-*-elf*, sh[12346l]*-*-elf*, sh-*-linux*)
(sh[2346lbe]*-*-linux*, sh-*-netbsdelf*, shl*-*-netbsdelf*)
(sh5-*-netbsd*, sh5l*-*-netbsd*, sh64-*-netbsd*)
(sh64l*-*-netbsd*): Add t-fdpbit to tmake_file except on
sh*-*-netbsd*.
(sh-*-rtems*): Add t-fdpbit to tmake_file.
(sh-wrs-vxworks): Likewise.
(sparc-*-elf*): Replace sparc/t-softfp by t-fdpbit in tmake_file.
(sparc-*-linux*): Add t-fdpbit to tmake_file for *-leon*.
(sparc-*-rtems*, sparc64-*-rtems*): Split off ...
(sparc64-*-rtems*): ... new case.
(sparc-*-rtems*): Add t-fdpbit to tmake_file.
(spu-*-elf*): Likewise.
Add spu/t-elf to tmake_file.
(v850*-*-*): Add t-fdpbit to tmake_file.
(xstormy16-*-elf): Likewise.
(am33_2.0-*-linux*): Add t-fdpbit to tmake_file.
(mep*-*-*): Likewise.
From-SVN: r177448
2011-08-05 16:53:09 +02:00
|
|
|
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
|
|
|
#define FLOAT_BIT_ORDER_MISMATCH
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if __BYTE_ORDER__ != __FLOAT_WORD_ORDER__
|
|
|
|
#define FLOAT_WORD_ORDER_MISMATCH
|
|
|
|
#endif
|
|
|
|
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#ifdef TFLOAT
|
|
|
|
# ifndef TMODES
|
|
|
|
# error "TFLOAT requires long double to have 113 bits of mantissa"
|
|
|
|
# endif
|
|
|
|
|
|
|
|
# define PREFIXFPDP tp
|
|
|
|
# define PREFIXSFDF tf
|
|
|
|
# define NGARDS 10L /* Is this right? */
|
|
|
|
# define GARDROUND 0x1ff
|
|
|
|
# define GARDMASK 0x3ff
|
|
|
|
# define GARDMSB 0x200
|
|
|
|
# define FRAC_NBITS 128
|
|
|
|
|
|
|
|
# if __LDBL_MANT_DIG__ == 113 /* IEEE quad */
|
|
|
|
# define EXPBITS 15
|
|
|
|
# define EXPBIAS 16383
|
|
|
|
# define EXPMAX (0x7fff)
|
|
|
|
# define QUIET_NAN ((TItype)0x8 << 108)
|
|
|
|
# define FRACHIGH ((TItype)0x8 << 124)
|
|
|
|
# define FRACHIGH2 ((TItype)0xc << 124)
|
|
|
|
# define FRACBITS 112
|
|
|
|
# endif
|
|
|
|
|
2003-01-26 11:06:57 +01:00
|
|
|
# if __LDBL_MANT_DIG__ == 106 /* IBM extended (double+double) */
|
|
|
|
# define EXPBITS 11
|
|
|
|
# define EXPBIAS 1023
|
|
|
|
# define EXPMAX (0x7ff)
|
|
|
|
# define QUIET_NAN ((TItype)0x8 << (48 + 64))
|
|
|
|
# define FRACHIGH ((TItype)0x8 << 124)
|
|
|
|
# define FRACHIGH2 ((TItype)0xc << 124)
|
|
|
|
# define FRACBITS 105
|
|
|
|
# define HALFFRACBITS 52
|
|
|
|
# define HALFSHIFT 64
|
|
|
|
# endif
|
|
|
|
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
# define pack_d __pack_t
|
|
|
|
# define unpack_d __unpack_t
|
|
|
|
# define __fpcmp_parts __fpcmp_parts_t
|
|
|
|
typedef UTItype fractype;
|
|
|
|
typedef UDItype halffractype;
|
|
|
|
typedef USItype qrtrfractype;
|
|
|
|
#define qrtrfractype qrtrfractype
|
|
|
|
typedef TFtype FLO_type;
|
|
|
|
typedef TItype intfrac;
|
|
|
|
#elif defined FLOAT
|
2000-07-03 17:06:12 +02:00
|
|
|
# define NGARDS 7L
|
|
|
|
# define GARDROUND 0x3f
|
|
|
|
# define GARDMASK 0x7f
|
|
|
|
# define GARDMSB 0x40
|
|
|
|
# define EXPBITS 8
|
|
|
|
# define EXPBIAS 127
|
|
|
|
# define FRACBITS 23
|
|
|
|
# define EXPMAX (0xff)
|
|
|
|
# define QUIET_NAN 0x100000L
|
|
|
|
# define FRAC_NBITS 32
|
|
|
|
# define FRACHIGH 0x80000000L
|
|
|
|
# define FRACHIGH2 0xc0000000L
|
|
|
|
# define pack_d __pack_f
|
|
|
|
# define unpack_d __unpack_f
|
|
|
|
# define __fpcmp_parts __fpcmp_parts_f
|
|
|
|
typedef USItype fractype;
|
|
|
|
typedef UHItype halffractype;
|
|
|
|
typedef SFtype FLO_type;
|
|
|
|
typedef SItype intfrac;
|
|
|
|
|
|
|
|
#else
|
|
|
|
# define PREFIXFPDP dp
|
|
|
|
# define PREFIXSFDF df
|
|
|
|
# define NGARDS 8L
|
|
|
|
# define GARDROUND 0x7f
|
|
|
|
# define GARDMASK 0xff
|
|
|
|
# define GARDMSB 0x80
|
|
|
|
# define EXPBITS 11
|
|
|
|
# define EXPBIAS 1023
|
|
|
|
# define FRACBITS 52
|
|
|
|
# define EXPMAX (0x7ff)
|
|
|
|
# define QUIET_NAN 0x8000000000000LL
|
|
|
|
# define FRAC_NBITS 64
|
|
|
|
# define FRACHIGH 0x8000000000000000LL
|
|
|
|
# define FRACHIGH2 0xc000000000000000LL
|
|
|
|
# define pack_d __pack_d
|
|
|
|
# define unpack_d __unpack_d
|
|
|
|
# define __fpcmp_parts __fpcmp_parts_d
|
|
|
|
typedef UDItype fractype;
|
|
|
|
typedef USItype halffractype;
|
|
|
|
typedef DFtype FLO_type;
|
|
|
|
typedef DItype intfrac;
|
|
|
|
#endif /* FLOAT */
|
|
|
|
|
2010-12-15 23:55:53 +01:00
|
|
|
#ifdef TFLOAT
|
|
|
|
# define add __addtf3
|
|
|
|
# define sub __subtf3
|
|
|
|
# define multiply __multf3
|
|
|
|
# define divide __divtf3
|
|
|
|
# define compare __cmptf2
|
|
|
|
# define _eq_f2 __eqtf2
|
|
|
|
# define _ne_f2 __netf2
|
|
|
|
# define _gt_f2 __gttf2
|
|
|
|
# define _ge_f2 __getf2
|
|
|
|
# define _lt_f2 __lttf2
|
|
|
|
# define _le_f2 __letf2
|
|
|
|
# define _unord_f2 __unordtf2
|
|
|
|
# define usi_to_float __floatunsitf
|
|
|
|
# define si_to_float __floatsitf
|
|
|
|
# define float_to_si __fixtfsi
|
|
|
|
# define float_to_usi __fixunstfsi
|
|
|
|
# define negate __negtf2
|
|
|
|
# define tf_to_sf __trunctfsf2
|
|
|
|
# define tf_to_df __trunctfdf2
|
|
|
|
#elif defined FLOAT
|
|
|
|
# define add __addsf3
|
|
|
|
# define sub __subsf3
|
|
|
|
# define multiply __mulsf3
|
|
|
|
# define divide __divsf3
|
|
|
|
# define compare __cmpsf2
|
|
|
|
# define _eq_f2 __eqsf2
|
|
|
|
# define _ne_f2 __nesf2
|
|
|
|
# define _gt_f2 __gtsf2
|
|
|
|
# define _ge_f2 __gesf2
|
|
|
|
# define _lt_f2 __ltsf2
|
|
|
|
# define _le_f2 __lesf2
|
|
|
|
# define _unord_f2 __unordsf2
|
|
|
|
# define usi_to_float __floatunsisf
|
|
|
|
# define si_to_float __floatsisf
|
|
|
|
# define float_to_si __fixsfsi
|
|
|
|
# define float_to_usi __fixunssfsi
|
|
|
|
# define negate __negsf2
|
|
|
|
# define sf_to_df __extendsfdf2
|
|
|
|
# define sf_to_tf __extendsftf2
|
2000-07-03 17:06:12 +02:00
|
|
|
#else
|
2010-12-15 23:55:53 +01:00
|
|
|
# define add __adddf3
|
|
|
|
# define sub __subdf3
|
|
|
|
# define multiply __muldf3
|
|
|
|
# define divide __divdf3
|
|
|
|
# define compare __cmpdf2
|
|
|
|
# define _eq_f2 __eqdf2
|
|
|
|
# define _ne_f2 __nedf2
|
|
|
|
# define _gt_f2 __gtdf2
|
|
|
|
# define _ge_f2 __gedf2
|
|
|
|
# define _lt_f2 __ltdf2
|
|
|
|
# define _le_f2 __ledf2
|
|
|
|
# define _unord_f2 __unorddf2
|
|
|
|
# define usi_to_float __floatunsidf
|
|
|
|
# define si_to_float __floatsidf
|
|
|
|
# define float_to_si __fixdfsi
|
|
|
|
# define float_to_usi __fixunsdfsi
|
|
|
|
# define negate __negdf2
|
|
|
|
# define df_to_sf __truncdfsf2
|
|
|
|
# define df_to_tf __extenddftf2
|
|
|
|
#endif /* FLOAT */
|
2000-07-03 17:06:12 +02:00
|
|
|
|
|
|
|
#ifndef INLINE
|
|
|
|
#define INLINE __inline__
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Preserve the sticky-bit when shifting fractions to the right. */
|
2005-11-28 14:41:38 +01:00
|
|
|
#define LSHIFT(a, s) { a = (a >> s) | !!(a & (((fractype) 1 << s) - 1)); }
|
2000-07-03 17:06:12 +02:00
|
|
|
|
|
|
|
/* numeric parameters */
|
|
|
|
/* F_D_BITOFF is the number of bits offset between the MSB of the mantissa
|
|
|
|
of a float and of a double. Assumes there are only two float types.
|
|
|
|
(double::FRAC_BITS+double::NGARDS-(float::FRAC_BITS-float::NGARDS))
|
|
|
|
*/
|
|
|
|
#define F_D_BITOFF (52+8-(23+7))
|
|
|
|
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#ifdef TMODES
|
|
|
|
# define F_T_BITOFF (__LDBL_MANT_DIG__-1+10-(23+7))
|
|
|
|
# define D_T_BITOFF (__LDBL_MANT_DIG__-1+10-(52+8))
|
|
|
|
#endif
|
|
|
|
|
2000-07-03 17:06:12 +02:00
|
|
|
|
|
|
|
#define NORMAL_EXPMIN (-(EXPBIAS)+1)
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#define IMPLICIT_1 ((fractype)1<<(FRACBITS+NGARDS))
|
|
|
|
#define IMPLICIT_2 ((fractype)1<<(FRACBITS+1+NGARDS))
|
2000-07-03 17:06:12 +02:00
|
|
|
|
|
|
|
/* common types */
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
CLASS_SNAN,
|
|
|
|
CLASS_QNAN,
|
|
|
|
CLASS_ZERO,
|
|
|
|
CLASS_NUMBER,
|
|
|
|
CLASS_INFINITY
|
|
|
|
} fp_class_type;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
#ifdef SMALL_MACHINE
|
|
|
|
char class;
|
|
|
|
unsigned char sign;
|
|
|
|
short normal_exp;
|
|
|
|
#else
|
|
|
|
fp_class_type class;
|
|
|
|
unsigned int sign;
|
|
|
|
int normal_exp;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
union
|
|
|
|
{
|
|
|
|
fractype ll;
|
|
|
|
halffractype l[2];
|
|
|
|
} fraction;
|
|
|
|
} fp_number_type;
|
|
|
|
|
|
|
|
typedef union
|
|
|
|
{
|
|
|
|
FLO_type value;
|
|
|
|
fractype value_raw;
|
|
|
|
|
|
|
|
#ifndef FLOAT
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
# ifdef qrtrfractype
|
|
|
|
qrtrfractype qwords[4];
|
|
|
|
# else
|
2000-07-03 17:06:12 +02:00
|
|
|
halffractype words[2];
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
# endif
|
2000-07-03 17:06:12 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef FLOAT_BIT_ORDER_MISMATCH
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
fractype fraction:FRACBITS __attribute__ ((packed));
|
|
|
|
unsigned int exp:EXPBITS __attribute__ ((packed));
|
|
|
|
unsigned int sign:1 __attribute__ ((packed));
|
|
|
|
}
|
|
|
|
bits;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef _DEBUG_BITFLOAT
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
unsigned int sign:1 __attribute__ ((packed));
|
|
|
|
unsigned int exp:EXPBITS __attribute__ ((packed));
|
|
|
|
fractype fraction:FRACBITS __attribute__ ((packed));
|
|
|
|
}
|
|
|
|
bits_big_endian;
|
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
fractype fraction:FRACBITS __attribute__ ((packed));
|
|
|
|
unsigned int exp:EXPBITS __attribute__ ((packed));
|
|
|
|
unsigned int sign:1 __attribute__ ((packed));
|
|
|
|
}
|
|
|
|
bits_little_endian;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
FLO_union_type;
|
|
|
|
|
2009-01-01 23:12:50 +01:00
|
|
|
/* Prototypes. */
|
2000-07-03 17:06:12 +02:00
|
|
|
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#if defined(L_pack_df) || defined(L_pack_sf) || defined(L_pack_tf)
|
2009-01-01 23:12:50 +01:00
|
|
|
extern FLO_type pack_d (const fp_number_type *);
|
2000-07-03 17:06:12 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
extern void unpack_d (FLO_union_type *, fp_number_type *);
|
|
|
|
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#if defined(L_addsub_sf) || defined(L_addsub_df) || defined(L_addsub_tf)
|
2000-07-03 17:06:12 +02:00
|
|
|
extern FLO_type add (FLO_type, FLO_type);
|
|
|
|
extern FLO_type sub (FLO_type, FLO_type);
|
|
|
|
#endif
|
|
|
|
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#if defined(L_mul_sf) || defined(L_mul_df) || defined(L_mul_tf)
|
2000-07-03 17:06:12 +02:00
|
|
|
extern FLO_type multiply (FLO_type, FLO_type);
|
|
|
|
#endif
|
|
|
|
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#if defined(L_div_sf) || defined(L_div_df) || defined(L_div_tf)
|
2000-07-03 17:06:12 +02:00
|
|
|
extern FLO_type divide (FLO_type, FLO_type);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern int __fpcmp_parts (fp_number_type *, fp_number_type *);
|
|
|
|
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#if defined(L_compare_sf) || defined(L_compare_df) || defined(L_compare_tf)
|
2000-07-03 17:06:12 +02:00
|
|
|
extern CMPtype compare (FLO_type, FLO_type);
|
|
|
|
#endif
|
|
|
|
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#if defined(L_eq_sf) || defined(L_eq_df) || defined(L_eq_tf)
|
2000-07-03 17:06:12 +02:00
|
|
|
extern CMPtype _eq_f2 (FLO_type, FLO_type);
|
|
|
|
#endif
|
|
|
|
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#if defined(L_ne_sf) || defined(L_ne_df) || defined(L_ne_tf)
|
2000-07-03 17:06:12 +02:00
|
|
|
extern CMPtype _ne_f2 (FLO_type, FLO_type);
|
|
|
|
#endif
|
|
|
|
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#if defined(L_gt_sf) || defined(L_gt_df) || defined(L_gt_tf)
|
2000-07-03 17:06:12 +02:00
|
|
|
extern CMPtype _gt_f2 (FLO_type, FLO_type);
|
|
|
|
#endif
|
|
|
|
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#if defined(L_ge_sf) || defined(L_ge_df) || defined(L_ge_tf)
|
2000-07-03 17:06:12 +02:00
|
|
|
extern CMPtype _ge_f2 (FLO_type, FLO_type);
|
|
|
|
#endif
|
|
|
|
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#if defined(L_lt_sf) || defined(L_lt_df) || defined(L_lt_tf)
|
2000-07-03 17:06:12 +02:00
|
|
|
extern CMPtype _lt_f2 (FLO_type, FLO_type);
|
|
|
|
#endif
|
|
|
|
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#if defined(L_le_sf) || defined(L_le_df) || defined(L_le_tf)
|
2000-07-03 17:06:12 +02:00
|
|
|
extern CMPtype _le_f2 (FLO_type, FLO_type);
|
|
|
|
#endif
|
|
|
|
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#if defined(L_unord_sf) || defined(L_unord_df) || defined(L_unord_tf)
|
2000-07-03 17:06:12 +02:00
|
|
|
extern CMPtype _unord_f2 (FLO_type, FLO_type);
|
|
|
|
#endif
|
|
|
|
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#if defined(L_si_to_sf) || defined(L_si_to_df) || defined(L_si_to_tf)
|
2000-07-03 17:06:12 +02:00
|
|
|
extern FLO_type si_to_float (SItype);
|
|
|
|
#endif
|
|
|
|
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#if defined(L_sf_to_si) || defined(L_df_to_si) || defined(L_tf_to_si)
|
2000-07-03 17:06:12 +02:00
|
|
|
extern SItype float_to_si (FLO_type);
|
|
|
|
#endif
|
|
|
|
|
2010-12-15 23:55:53 +01:00
|
|
|
#if defined(L_tf_to_usi)
|
2000-07-03 17:06:12 +02:00
|
|
|
extern USItype float_to_usi (FLO_type);
|
|
|
|
#endif
|
|
|
|
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#if defined(L_usi_to_sf) || defined(L_usi_to_df) || defined(L_usi_to_tf)
|
2000-12-22 13:27:36 +01:00
|
|
|
extern FLO_type usi_to_float (USItype);
|
|
|
|
#endif
|
|
|
|
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#if defined(L_negate_sf) || defined(L_negate_df) || defined(L_negate_tf)
|
2000-07-03 17:06:12 +02:00
|
|
|
extern FLO_type negate (FLO_type);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef FLOAT
|
|
|
|
#if defined(L_make_sf)
|
|
|
|
extern SFtype __make_fp (fp_class_type, unsigned int, int, USItype);
|
|
|
|
#endif
|
|
|
|
#ifndef FLOAT_ONLY
|
|
|
|
extern DFtype __make_dp (fp_class_type, unsigned int, int, UDItype);
|
|
|
|
#if defined(L_sf_to_df)
|
|
|
|
extern DFtype sf_to_df (SFtype);
|
|
|
|
#endif
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#if defined(L_sf_to_tf) && defined(TMODES)
|
|
|
|
extern TFtype sf_to_tf (SFtype);
|
|
|
|
#endif
|
2000-07-03 17:06:12 +02:00
|
|
|
#endif /* ! FLOAT_ONLY */
|
|
|
|
#endif /* FLOAT */
|
|
|
|
|
|
|
|
#ifndef FLOAT
|
|
|
|
extern SFtype __make_fp (fp_class_type, unsigned int, int, USItype);
|
|
|
|
#if defined(L_make_df)
|
|
|
|
extern DFtype __make_dp (fp_class_type, unsigned int, int, UDItype);
|
|
|
|
#endif
|
|
|
|
#if defined(L_df_to_sf)
|
|
|
|
extern SFtype df_to_sf (DFtype);
|
|
|
|
#endif
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#if defined(L_df_to_tf) && defined(TMODES)
|
|
|
|
extern TFtype df_to_tf (DFtype);
|
|
|
|
#endif
|
2000-07-03 17:06:12 +02:00
|
|
|
#endif /* ! FLOAT */
|
|
|
|
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
#ifdef TMODES
|
2003-01-30 05:20:07 +01:00
|
|
|
extern DFtype __make_dp (fp_class_type, unsigned int, int, UDItype);
|
fp-bit.h: Define macros for TFmode floating-point constants in IEEE quad TFmode type.
* config/fp-bit.h: Define macros for TFmode floating-point
constants in IEEE quad TFmode type. Declare functions according
to L_ macros.
(TMODES): Define if __LDBL_MANT_DIG__ is 113.
(TFtype, TItype, UTItype): Define if TMODES is defined.
(MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise.
(F_T_BITOFF, D_T_BITOFF): Define.
(IMPLICIT_1, IMPLICIT_2): Cast constants to types that are
guaranteed to be wide enough.
* config/fp-bit.c: Check for L_ macros for tf functions.
(__thenan_tf): New.
(nan): Adjust.
(pack_d, unpack_d): Support IEEE 854 quad type.
(_fpmul_parts): Support TFmode. Compute exponent adjustment
from FRAC_NBITS, FRAC_BITS and NGARDS.
(usi_to_float): Cast constants to be shifted to fractype
instead of assuming long long is wide enough.
(sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New.
From-SVN: r61835
2003-01-26 10:33:46 +01:00
|
|
|
extern TFtype __make_tp (fp_class_type, unsigned int, int, UTItype);
|
|
|
|
#ifdef TFLOAT
|
|
|
|
#if defined(L_tf_to_sf)
|
|
|
|
extern SFtype tf_to_sf (TFtype);
|
|
|
|
#endif
|
|
|
|
#if defined(L_tf_to_df)
|
|
|
|
extern DFtype tf_to_df (TFtype);
|
|
|
|
#endif
|
|
|
|
#if defined(L_di_to_tf)
|
|
|
|
extern TFtype di_to_df (DItype);
|
|
|
|
#endif
|
|
|
|
#endif /* TFLOAT */
|
|
|
|
#endif /* TMODES */
|
|
|
|
|
2001-05-26 03:31:47 +02:00
|
|
|
#endif /* ! GCC_FP_BIT_H */
|