Commit Graph

6 Commits

Author SHA1 Message Date
Tobias Burnus 5a09d908bc re PR libquadmath/55225 (Fail to build lgammaq.c from trunk with mingw-w64)
2012-11-21  Tobias Burnus  <burnus@net-b.de>

        PR libquadmath/55225
        * math/lgammaq.c (lgammaq): Use local variable if
        math.h does not provide signgam.
        * acinclude.m4 (LIBQUAD_CHECK_MATH_H_SIGNGAM): New check.
        * configure.ac: Use it.
        * configure: Regenerate.
        * config.h.in: Regenerate.

From-SVN: r193695
2012-11-21 14:46:34 +01:00
Jakub Jelinek a855debfb4 libquadmath.texi (FLT128_DIG, [...]): Document.
* libquadmath.texi (FLT128_DIG, FLT128_MIN_10_EXP,
	FLT128_MAX_10_EXP): Document.
	(strtoflt128): Remove obsolete comment.
	* configure.ac (HAVE_STRTOULL): New check.
	* printf/gmp-impl.h (mpn_construct_float128): New prototype,
	define.
	* printf/mul_n.c: Include <config.h>.
	* printf/add_n.c: Likewise.
	* printf/cmp.c: Likewise.
	* printf/fpioconst.c: Likewise.
	* printf/mul_1.c: Likewise.
	* printf/rshift.c: Likewise.
	* printf/lshift.c: Likewise.
	* printf/submul_1.c: Likewise.
	* printf/sub_n.c: Likewise.
	* printf/divrem.c: Likewise.
	* printf/addmul_1.c: Likewise.
	* printf/mul.c: Likewise.
	* printf/quadmath-printf.h (isupper, isdigit, tolower): Change
	to avoid evaluating argument multiple times.
	(isxdigit): Redefine.
	* strtod/strtoflt128.c: New file.
	* strtod/strtod_l.c: New file.
	* strtod/mpn2flt128.c: New file.
	* strtod/grouping.h: New file.
	* strtod/tens_in_limb.c: New file.
	* gdtoa/arith.h: Removed.
	* gdtoa/gd_qnan.h: Removed.
	* gdtoa/gdtoa_fltrnds.h: Removed.
	* gdtoa/gdtoa.h: Removed.
	* gdtoa/gdtoaimp.h: Removed.
	* gdtoa/gethex.c: Removed.
	* gdtoa/gmisc.c: Removed.
	* gdtoa/hd_init.c: Removed.
	* gdtoa/hexnan.c: Removed.
	* gdtoa/makefile: Removed.
	* gdtoa/misc.c: Removed.
	* gdtoa/README.gdtoa: Removed.
	* gdtoa/smisc.c: Removed.
	* gdtoa/strtodg.c: Removed.
	* gdtoa/strtopQ.c: Removed.
	* gdtoa/sum.c: Removed.
	* quadmath.h (FLT128_DIG, FLT128_MIN_10_EXP, FLT128_MAX_10_EXP):
	Define.
	* Makefile.am (libquadmath_la_SOURCES): Remove gdtoa/*, add
	strtod/strtoflt128.c, strtod/mpn2flt128.c and strtod/tens_in_limb.c.
	* config.h.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.

From-SVN: r170254
2011-02-17 20:57:18 +01:00
Jakub Jelinek d2995f2185 quadmath-printf.c: Also check __GLIBC__ when checking whether workarounds for printf hook handling...
* printf/quadmath-printf.c: Also check __GLIBC__ when checking
	whether workarounds for printf hook handling should be added.

	* configure.ac: Check for locale.h too.
	(USE_LOCALE_SUPPORT): Remove check.
	(USE_NL_LANGINFO, USE_NL_LANGINFO_WC, USE_LOCALECONV): New checks.
	(USE_I18_NUMBER_H): Check also for _NL_CTYPE_MB_CUR_MAX.
	* printf/printf_fphex.c (__quadmath_printf_fphex): Use nl_langinfo
	or localeconv for narrow version and nl_langinfo if USE_NL_LANGINFO_WC
	for wide version.
	* printf/quadmath-printf.h: Include locale.h if HAVE_LOCALE_H.
	* printf/printf_fp.c (USE_I18N_NUMBER_H): Don't define to 0.
	(__quadmath_printf_fp): Use nl_langinfo or localeconv for narrow
	version and nl_langinfo if USE_NL_LANGINFO_WC for wide version.
	Guard nl_langinfo (_NL_CTYPE_MB_CUR_MAX) use with
	USE_I18N_NUMBER_H #ifdef.
	* configure: Regenerated.
	* config.h.in: Regenerated.

From-SVN: r170211
2011-02-16 14:54:30 +01:00
Jakub Jelinek 1d92226be3 re PR fortran/47642 (real(kind=16) - libquadmath - segfault on amd64 FreeBSD)
PR fortran/47642
	* libquadmath.texi (quadmath_snprintf): Document.
	(quadmath_flt128tostr): Remove.
	* Makefile.am (libquadmath_la_SOURCES): Add printf/*.c.
	Remove  quadmath_io.c, gdtoa/gdtoa.c, gdtoa/g__fmt.c,
	gdtoa/g_Qfmt.c, gdtoa/dmisc.c and gdtoa/ulp.c.
	* quadmath.h (quadmath_snprintf): New prototype.
	(quadmath_flt128tostr): Remove.
	* quadmath_weak.h (quadmath_snprintf): Add.
	(quadmath_flt128tostr): Remove.
	* configure.ac: New AC_CHECK_HEADERS headers: langinfo.h, wchar.h,
	wctype.h, limits.h, ctype.h, printf.h, errno.h.
	(AC_USE_SYSTEM_EXTENSIONS): Add.
	(HAVE_HIDDEN_VISIBILITY, HAVE_PRINTF_HOOKS,
	USE_LOCALE_SUPPORT, USE_I18N_NUMBER_H): New checks.
	* quadmath.map (QUADMATH_1.0): Add quadmath_snprintf.  Remove
	quadmath_flt128tostr.
	* printf/printf_fphex.c: New file.
	* printf/_itowa.h: New file.
	* printf/mul_n.c: New file.
	* printf/quadmath-printf.h: New file.
	* printf/submul_1.c: New file.
	* printf/quadmath-printf.c: New file.
	* printf/gmp-impl.h: New file.
	* printf/lshift.c: New file.
	* printf/fpioconst.h: New file.
	* printf/add_n.c: New file.
	* printf/cmp.c: New file.
	* printf/sub_n.c: New file.
	* printf/mul.c: New file.
	* printf/divrem.c: New file.
	* printf/addmul_1.c: New file.
	* printf/printf_fp.c: New file.
	* printf/_itoa.h: New file.
	* printf/fpioconst.c: New file.
	* printf/_i18n_number.h: New file.
	* printf/flt1282mpn.c: New file.
	* printf/rshift.c: New file.
	* printf/mul_1.c: New file.
	* quadmath_io.c: Removed.
	* gdtoa/gdtoa.c: Removed.
	* gdtoa/g__fmt.c: Removed.
	* gdtoa/g_Qfmt.c: Removed.
	* gdtoa/dmisc.c: Removed.
	* gdtoa/ulp.c: Removed.
	* config.h.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.

	* io/write_float.def (DTOAQ): Use quadmath_snprintf instead of
	quadmath_flt128tostr.
	* io/transfer128.c (tmp2): Initialize to quadmath_snprintf instead
	of quadmath_flt128tostr.

From-SVN: r170135
2011-02-14 16:34:44 +01:00
Jakub Jelinek e8d42d280e re PR fortran/46402 (libquadmath: Add fmalq)
PR fortran/46402
	* quadmath.map (QUADMATH_1.0): Add fmaq.
	* configure.ac: Check for fenv.h, feholdexcept, fesetround,
	feupdateenv, fesetenv and fetestexcept.
	* configure: Regenerated.
	* config.h.in: Regenerated.
	* quadmath.h (fmaq): New prototype.
	* quadmath_weak.h (fmaq): Add.
	* Makefile.am (libquadmath_la_SOURCES): Add math/fmaq.c.
	* Makefile.in: Regenerated.
	* quadmath-imp.h: Include config.h.
	* math/expq.c: Include fenv.h.
	(USE_FENV_H): Define if libm support for fe* is there.
	(expq): Add fesetround etc. support if USE_FENV_H is defined.
	* math/fmaq.c: New file.
	* libquadmath.texi (fmaq): Add.

From-SVN: r168852
2011-01-16 17:40:05 +01:00
Francois-Xavier Coudert 1ec601bf9f re PR fortran/32049 (Support on x86_64 also kind=16)
/
2010-11-13  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/32049
        * Makefile.def: Add libquadmath; build it with language=fortran.
        * configure.ac: Add libquadmath.
        * Makefile.tpl: Handle multiple libs in check-[+language+].
        * Makefile.in: Regenerate.
        * configure: Regenerate.

libquadmath/
2010-11-13  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/32049
        Initial implementation and checkin.

gcc/fortran/
2010-11-13  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/32049
        * gfortranspec.c (find_spec_file): New function.
        (lang_specific_driver): Try to find .spec file and use it.
        * trans-io.c (iocall): Define
        * IOCALL_X_REAL128/COMPLEX128(,write).
        (gfc_build_io_library_fndecls): Build decl for __float128 I/O.
        (transfer_expr): Call __float128 I/O functions.
        * trans-types.c (gfc_init_kinds): Allow kind-16 belonging
        to __float128.

gcc/testsuite/
2010-11-13  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/32049
        * gfortran.dg/quad_1.f90: New.
        * lib/gcc-defs.exp (gcc-set-multilib-library-path): Use also
        compiler arguments.
        * lib/gfortran.exp (gfortran_link_flags): Add libquadmath to
        library search path; call gcc-set-multilib-library-path with
        arguments such that libgfortran.spec is found.
        (gfortran_init): Add path for libgfortran.spec to
GFORTRAN_UNDER_TEST.

libgomp/
2010-11-13  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/32049
        * configure.ac: 
        * configure: Regenerate.

libgfortran/
2010-11-13  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/32049
        * Makefile.am: Add missing pow_r16_i4.c, add transfer128.c,
        link libquadmath, if used.
        * acinclude.m4 (LIBGFOR_CHECK_FLOAT128): Add.
        * configure.ac: Use it, touch spec file.
        * gfortran.map: Add pow_r16_i4 and
        transfer_(real,complex)128(,write) functions.
        * intrinsics/cshift0.c (cshift0): Handle __float128 type.
        * intrinsics/erfc_scaled_inc.c: Ditto.
        * intrinsics/pack_generic.c (pack): Ditto
        * intrinsics/spread_generic.c (spread): Ditto.
        * intrinsics/unpack_generic.c (unpack1): Ditto.
        * io/read.c (convert_real): Ditto.
        * io/transfer.c: Update comments.
        * io/transfer128.c: New file.
        * io/write_float.def (write_float): Handle __float128 type.
        * libgfortran.h: #include quadmath_weak.h, define __builtin_infq
        and nanq.
        * m4/mtype.m4: Handle __float128 type.
        * runtime/in_pack_generic.c (internal_pack): Ditto.
        * runtime/in_unpack_generic.c (internal_unpack): Ditto.
        * kinds-override.h: New file.
        * libgfortran.spec.in: Ditto.
        * generated/pow_r16_i4.c: Generated.
        * Makefile.in: Regenerate.
        * configure: Regenerate.
        * config.h: Regenerate.
        * bessel_r10.c: Regenerate.
        * bessel_r16.c: Regenerate.
        * bessel_r4.c: Regenerate.
        * bessel_r8.c: Regenerate.
        * exponent_r16.c: Regenerate.
        * fraction_r16.c: Regenerate.
        * nearest_r16.c: Regenerate.
        * norm2_r10.c: Regenerate.
        * norm2_r16.c: Regenerate.
        * norm2_r4.c: Regenerate.
        * norm2_r8.c: Regenerate.
        * rrspacing_r16.c: Regenerate.
        * set_exponent_r16.c: Regenerate.
        * spacing_r16.c: Regenerate.


Co-Authored-By: Tobias Burnus <burnus@net-b.de>

From-SVN: r166825
2010-11-16 22:23:19 +01:00