Skip to content
Snippets Groups Projects
  1. May 06, 2024
    • Xiao Zeng's avatar
      [RISC-V] Add support for _Bfloat16 · 8c7cee80
      Xiao Zeng authored
      1 At point <https://github.com/riscv/riscv-bfloat16>,
        BF16 has already been completed "post public review".
      
      2 LLVM has also added support for RISCV BF16 in
        <https://reviews.llvm.org/D151313> and
        <https://reviews.llvm.org/D150929>.
      
      3 According to the discussion <https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/367
      
      >,
        this use __bf16 and use DF16b in riscv_mangle_type like x86.
      
      Below test are passed for this patch
          * The riscv fully regression test.
      
      gcc/ChangeLog:
      
      	* config/riscv/iterators.md: New mode iterator HFBF.
      	* config/riscv/riscv-builtins.cc (riscv_init_builtin_types):
      	Initialize data type _Bfloat16.
      	* config/riscv/riscv-modes.def (FLOAT_MODE): New.
      	(ADJUST_FLOAT_FORMAT): New.
      	* config/riscv/riscv.cc (riscv_mangle_type): Support for BFmode.
      	(riscv_scalar_mode_supported_p): Ditto.
      	(riscv_libgcc_floating_mode_supported_p): Ditto.
      	(riscv_init_libfuncs): Set the conversion method for BFmode and
      	HFmode.
      	(riscv_block_arith_comp_libfuncs_for_mode): Set the arithmetic
      	and comparison libfuncs for the mode.
      	* config/riscv/riscv.md (mode" ): Add BF.
      	(movhf): Support for BFmode.
      	(mov<mode>): Ditto.
      	(*movhf_softfloat): Ditto.
      	(*mov<mode>_softfloat): Ditto.
      
      libgcc/ChangeLog:
      
      	* config/riscv/sfp-machine.h (_FP_NANFRAC_B): New.
      	(_FP_NANSIGN_B): Ditto.
      	* config/riscv/t-softfp32: Add support for BF16 libfuncs.
      	* config/riscv/t-softfp64: Ditto.
      	* soft-fp/floatsibf.c: For si -> bf16.
      	* soft-fp/floatunsibf.c: For unsi -> bf16.
      
      gcc/testsuite/ChangeLog:
      
      	* gcc.target/riscv/bf16_arithmetic.c: New test.
      	* gcc.target/riscv/bf16_call.c: New test.
      	* gcc.target/riscv/bf16_comparison.c: New test.
      	* gcc.target/riscv/bf16_float_libcall_convert.c: New test.
      	* gcc.target/riscv/bf16_integer_libcall_convert.c: New test.
      
      Co-authored-by: default avatarJin Ma <jinma@linux.alibaba.com>
      8c7cee80
  2. Feb 13, 2024
    • Jakub Jelinek's avatar
      libgcc: Fix UB in FP_FROM_BITINT · 2ca373b7
      Jakub Jelinek authored
      As I wrote earlier, I was seeing
      FAIL: gcc.dg/torture/bitint-24.c   -O0  execution test
      FAIL: gcc.dg/torture/bitint-24.c   -O2  execution test
      with the ia32 _BitInt enablement patch on i686-linux.  I thought
      floatbitintxf.c was miscompiled with -O2 -march=i686 -mtune=generic, but it
      turned out to be UB in it.
      
      If a signed _BitInt to be converted to binary floating point has
      (after sign extension from possible partial limb to full limb) one or
      more most significant limbs equal to all ones and then in the limb below
      (the most significant non-~(UBILtype)0 limb) has the most significant limb
      cleared, like for 32-bit limbs
      0x81582c05U, 0x0a8b01e4U, 0xc1b8b18fU, 0x2aac2a08U, -1U, -1U
      then bitint_reduce_prec can't reduce it to that 0x2aac2a08U limb, so
      msb is all ones and precision is negative (so it reduced precision from
      161 to 192 bits down to 160 bits, in theory could go as low as 129 bits
      but that wouldn't change anything on the following behavior).
      But still iprec is negative, -160 here.
      For that case (i.e. where we are dealing with an negative input), the
      code was using 65 - __builtin_clzll (~msb) to compute how many relevant
      bits we have from the msb.  Unfortunately that invokes UB for msb all ones.
      The right number of relevant bits in that case is 1 though (like for
      -2 it is 2 and -4 or -3 3 as already computed) - all we care about from that
      is that the most significant bit is set (i.e. the number is negative) and
      the bits below that should be supplied from the limbs below.
      
      So, the following patch fixes it by special casing it not to invoke UB.
      
      For msb 0 we already have a special case from before (but that is also
      different because msb 0 implies the whole number is 0 given the way
      bitint_reduce_prec works - even if we have limbs like ..., 0x80000000U, 0U
      the reduction can skip the most significant limb and msb then would be
      the one below it), so if iprec > 0, we already don't call __builtin_clzll
      on 0.
      
      2024-02-13  Jakub Jelinek  <jakub@redhat.com>
      
      	* soft-fp/bitint.h (FP_FROM_BITINT): If iprec < 0 and msb is all ones,
      	just set n to 1 instead of using __builtin_clzll (~msb).
      2ca373b7
  3. Feb 10, 2024
    • Jakub Jelinek's avatar
      libgcc: Fix a bug in _BitInt -> dfp conversions · 1e87fcf2
      Jakub Jelinek authored
      The ia32 _BitInt support revealed a bug in floatbitint?d.c.
      As can be even guessed from how the code is written in the loop,
      the intention was to set inexact to non-zero whenever the remainder
      after division wasn't zero, but I've ended up just checking whether
      the 2 least significant limbs of the remainder were non-zero.
      Now, in the dfp/bitint-4.c test in one case the remainder happens
      to have least significant 64 bits zero and then the higher limbs are
      non-zero; with 32-bit limbs that means 2 least significant limbs are zero
      and so the code acted as if it was exactly divisible.
      
      Fixed thusly.
      
      2024-02-10  Jakub Jelinek  <jakub@redhat.com>
      
      	* soft-fp/floatbitintdd.c (__bid_floatbitintdd): Or in all remainder
      	limbs into inexact rather than just first two.
      	* soft-fp/floatbitintsd.c (__bid_floatbitintsd): Likewise.
      	* soft-fp/floatbitinttd.c (__bid_floatbitinttd): Likewise.
      1e87fcf2
    • Jakub Jelinek's avatar
      libgcc: Fix BIL_TYPE_SIZE == 32 support in _BitInt <-> dfp support · b2684e55
      Jakub Jelinek authored
      I've tried last night to enable _BitInt support for i?86-linux, and
      a few spots in libgcc emitted -Wshift-count-overflow warnings and clearly
      didn't do what it was supposed to do.
      
      Fixed thusly.
      
      2024-02-10  Jakub Jelinek  <jakub@redhat.com>
      
      	* soft-fp/fixddbitint.c (__bid_fixddbitint): Fix up
      	BIL_TYPE_SIZE == 32 shifts.
      	* soft-fp/fixsdbitint.c (__bid_fixsdbitint): Likewise.
      	* soft-fp/fixtdbitint.c (__bid_fixtdbitint): Likewise.
      	* soft-fp/floatbitintdd.c (__bid_floatbitintdd): Likewise.
      	* soft-fp/floatbitinttd.c (__bid_floatbitinttd): Likewise.
      b2684e55
  4. Jan 12, 2024
    • Jakub Jelinek's avatar
      libgcc: Use may_alias attribute in bitint handlers · 6dece991
      Jakub Jelinek authored
      As discussed on IRC, the following patch uses may_alias attribute, so that
      on targets like aarch64 where abi_limb_mode != limb_mode the library
      accesses the limbs (half limbs of the ABI) in the arrays with conservative
      alias set.
      
      2024-01-12  Jakub Jelinek  <jakub@redhat.com>
      
      	* libgcc2.h (UBILtype): New typedef with may_alias attribute.
      	(__mulbitint3, __divmodbitint4): Use UBILtype * instead of
      	UWtype * and const UBILtype * instead of const UWtype *.
      	* libgcc2.c (bitint_reduce_prec, bitint_mul_1, bitint_addmul_1,
      	__mulbitint3, bitint_negate, bitint_submul_1, __divmodbitint4):
      	Likewise.
      	* soft-fp/bitint.h (UBILtype): Change define into a typedef with
      	may_alias attribute.
      6dece991
  5. Nov 09, 2023
    • Jakub Jelinek's avatar
      libgcc: Add {unsigned ,}__int128 <-> _Decimal{32,64,128} conversion support [PR65833] · f172b9d3
      Jakub Jelinek authored
      The following patch adds the missing
      {unsigned ,}__int128 <-> _Decimal{32,64,128}
      conversion support into libgcc.a on top of the _BitInt support
      (doing it without that would be larger amount of code and I hope all
      the targets which support __int128 will eventually support _BitInt,
      after all it is a required part of C23) and because it is in libgcc.a
      only, it doesn't hurt that much if it is added for some architectures
      only in GCC 15.
      Initially I thought about doing this on the compiler side, but doing
      it on the library side seems to be easier and more -Os friendly.
      The tests currently require bitint effective target, that can be
      removed when all the int128 targets support bitint.
      
      2023-11-09  Jakub Jelinek  <jakub@redhat.com>
      
      	PR libgcc/65833
      libgcc/
      	* config/t-softfp (softfp_bid_list): Add
      	{U,}TItype <-> _Decimal{32,64,128} conversions.
      	* soft-fp/floattisd.c: New file.
      	* soft-fp/floattidd.c: New file.
      	* soft-fp/floattitd.c: New file.
      	* soft-fp/floatuntisd.c: New file.
      	* soft-fp/floatuntidd.c: New file.
      	* soft-fp/floatuntitd.c: New file.
      	* soft-fp/fixsdti.c: New file.
      	* soft-fp/fixddti.c: New file.
      	* soft-fp/fixtdti.c: New file.
      	* soft-fp/fixunssdti.c: New file.
      	* soft-fp/fixunsddti.c: New file.
      	* soft-fp/fixunstdti.c: New file.
      gcc/testsuite/
      	* gcc.dg/dfp/int128-1.c: New test.
      	* gcc.dg/dfp/int128-2.c: New test.
      	* gcc.dg/dfp/int128-3.c: New test.
      	* gcc.dg/dfp/int128-4.c: New test.
      f172b9d3
  6. Sep 06, 2023
    • Jakub Jelinek's avatar
      libgcc _BitInt helper documentation [PR102989] · f6e0ec56
      Jakub Jelinek authored
      On Mon, Aug 21, 2023 at 05:32:04PM +0000, Joseph Myers wrote:
      > I think the libgcc functions (i.e. those exported by libgcc, to which
      > references are generated by the compiler) need documenting in libgcc.texi.
      > Internal functions or macros in the libgcc patch need appropriate comments
      > specifying their semantics; especially FP_TO_BITINT and FP_FROM_BITINT
      > which have a lot of arguments and no comments saying what the semantics of
      > the macros and their arguments are supposed to me.
      
      Here is an incremental patch which does that.
      
      2023-09-06  Jakub Jelinek  <jakub@redhat.com>
      
      	PR c/102989
      gcc/
      	* doc/libgcc.texi (Bit-precise integer arithmetic functions):
      	Document general rules for _BitInt support library functions
      	and document __mulbitint3 and __divmodbitint4.
      	(Conversion functions): Document __fix{s,d,x,t}fbitint,
      	__floatbitint{s,d,x,t,h,b}f, __bid_fix{s,d,t}dbitint and
      	__bid_floatbitint{s,d,t}d.
      libgcc/
      	* libgcc2.c (bitint_negate): Add function comment.
      	* soft-fp/bitint.h (bitint_negate): Add function comment.
      	(FP_TO_BITINT, FP_FROM_BITINT): Add comment explaining the macros.
      f6e0ec56
    • Jakub Jelinek's avatar
      libgcc _BitInt support [PR102989] · 2ce182e2
      Jakub Jelinek authored
      This patch adds the library helpers for multiplication, division + modulo
      and casts from and to floating point (both binary and decimal).
      As described in the intro, the first step is try to reduce further the
      passed in precision by skipping over most significant limbs with just zeros
      or sign bit copies.  For multiplication and division I've implemented
      a simple algorithm, using something smarter like Karatsuba or Toom N-Way
      might be faster for very large _BitInts (which we don't support right now
      anyway), but could mean more code in libgcc, which maybe isn't what people
      are willing to accept.
      For the to/from floating point conversions the patch uses soft-fp, because
      it already has tons of handy macros which can be used for that.  In theory
      it could be implemented using {,unsigned} long long or {,unsigned} __int128
      to/from floating point conversions with some frexp before/after, but at that
      point we already need to force it into integer registers and analyze it
      anyway.  Plus, for 32-bit arches there is no __int128 that could be used
      for XF/TF mode stuff.
      I know that soft-fp is owned by glibc and I think the op-common.h change
      should be propagated there, but the bitint stuff is really GCC specific
      and IMHO doesn't belong into the glibc copy.
      
      2023-09-06  Jakub Jelinek  <jakub@redhat.com>
      
      	PR c/102989
      libgcc/
      	* config/aarch64/t-softfp (softfp_extras): Use += rather than :=.
      	* config/i386/64/t-softfp (softfp_extras): Likewise.
      	* config/i386/libgcc-glibc.ver (GCC_14.0.0): Export _BitInt support
      	routines.
      	* config/i386/t-softfp (softfp_extras): Add fixxfbitint and
      	bf, hf and xf mode floatbitint.
      	(CFLAGS-floatbitintbf.c, CFLAGS-floatbitinthf.c): Add -msse2.
      	* config/riscv/t-softfp32 (softfp_extras): Use += rather than :=.
      	* config/rs6000/t-e500v1-fp (softfp_extras): Likewise.
      	* config/rs6000/t-e500v2-fp (softfp_extras): Likewise.
      	* config/t-softfp (softfp_floatbitint_funcs): New.
      	(softfp_bid_list): New.
      	(softfp_func_list): Add sf and df mode from and to _BitInt libcalls.
      	(softfp_bid_file_list): New.
      	(LIB2ADD_ST): Add $(softfp_bid_file_list).
      	* config/t-softfp-sfdftf (softfp_extras): Add fixtfbitint and
      	floatbitinttf.
      	* config/t-softfp-tf (softfp_extras): Likewise.
      	* libgcc2.c (bitint_reduce_prec): New inline function.
      	(BITINT_INC, BITINT_END): Define.
      	(bitint_mul_1, bitint_addmul_1): New helper functions.
      	(__mulbitint3): New function.
      	(bitint_negate, bitint_submul_1): New helper functions.
      	(__divmodbitint4): New function.
      	* libgcc2.h (LIBGCC2_UNITS_PER_WORD): When building _BitInt support
      	libcalls, redefine depending on __LIBGCC_BITINT_LIMB_WIDTH__.
      	(__mulbitint3, __divmodbitint4): Declare.
      	* libgcc-std.ver.in (GCC_14.0.0): Export _BitInt support routines.
      	* Makefile.in (lib2funcs): Add _mulbitint3.
      	(LIB2_DIVMOD_FUNCS): Add _divmodbitint4.
      	* soft-fp/bitint.h: New file.
      	* soft-fp/fixdfbitint.c: New file.
      	* soft-fp/fixsfbitint.c: New file.
      	* soft-fp/fixtfbitint.c: New file.
      	* soft-fp/fixxfbitint.c: New file.
      	* soft-fp/floatbitintbf.c: New file.
      	* soft-fp/floatbitintdf.c: New file.
      	* soft-fp/floatbitinthf.c: New file.
      	* soft-fp/floatbitintsf.c: New file.
      	* soft-fp/floatbitinttf.c: New file.
      	* soft-fp/floatbitintxf.c: New file.
      	* soft-fp/op-common.h (_FP_FROM_INT): Add support for rsize up to
      	4 * _FP_W_TYPE_SIZE rather than just 2 * _FP_W_TYPE_SIZE.
      	* soft-fp/bitintpow10.c: New file.
      	* soft-fp/fixsdbitint.c: New file.
      	* soft-fp/fixddbitint.c: New file.
      	* soft-fp/fixtdbitint.c: New file.
      	* soft-fp/floatbitintsd.c: New file.
      	* soft-fp/floatbitintdd.c: New file.
      	* soft-fp/floatbitinttd.c: New file.
      2ce182e2
    • Jakub Jelinek's avatar
      libgcc: Generated tables for _BitInt <-> _Decimal* conversions [PR102989] · 7a610d44
      Jakub Jelinek authored
      The following patch adds a header with generated helper tables to support
      computation of powers of 10 from 10^0 to 10^6111 inclusive into a
      sufficiently large array of _BitInt limbs.  This is split from the rest
      of the libgcc _BitInt support because it is quite large and together it
      would run into gcc-patches mail length limits.
      
      2023-09-06  Jakub Jelinek  <jakub@redhat.com>
      
      	PR c/102989
      libgcc/
      	* soft-fp/bitintpow10.h: New file.
      7a610d44
  7. Mar 12, 2023
    • Jakub Jelinek's avatar
      aarch64: Add bfloat16_t support for aarch64 · 13071c3c
      Jakub Jelinek authored
      x86_64/i686 has for a few months working std::bfloat16_t support, __bf16
      there is no longer a storage only type, but can be used for arithmetics
      and is supported in libgcc and libstdc++.
      
      The following patch adds similar support for AArch64.
      
      Unlike the x86 changes, this one keeps the old __bf16 mangling of
      u6__bf16 rather than DF16b (so an exception from Itanium ABI), but
      otherwise __bf16 and decltype (0.0bf16) are the same type and both
      in C++ act as extended floating-point type.
      
      2023-03-13  Jakub Jelinek  <jakub@redhat.com>
      
      gcc/
      	* config/aarch64/aarch64.h (aarch64_bf16_type_node): Remove.
      	(aarch64_bf16_ptr_type_node): Adjust comment.
      	* config/aarch64/aarch64.cc (aarch64_gimplify_va_arg_expr): Use
      	bfloat16_type_node rather than aarch64_bf16_type_node.
      	(aarch64_libgcc_floating_mode_supported_p,
      	aarch64_scalar_mode_supported_p): Also support BFmode.
      	(aarch64_invalid_conversion, aarch64_invalid_unary_op): Remove.
      	(aarch64_invalid_binary_op): Remove BFmode related rejections.
      	(TARGET_INVALID_CONVERSION, TARGET_INVALID_UNARY_OP): Don't redefine.
      	* config/aarch64/aarch64-builtins.cc (aarch64_bf16_type_node): Remove.
      	(aarch64_int_or_fp_type): Use bfloat16_type_node rather than
      	aarch64_bf16_type_node.
      	(aarch64_init_simd_builtin_types): Likewise.
      	(aarch64_init_bf16_types): Likewise.  Don't create bfloat16_type_node,
      	which is created in tree.cc already.
      	* config/aarch64/aarch64-sve-builtins.def (svbfloat16_t): Likewise.
      gcc/testsuite/
      	* gcc.target/aarch64/sve/acle/general-c/ternary_bfloat16_opt_n_1.c:
      	Don't expect one __bf16 related error.
      	* gcc.target/aarch64/bfloat16_vector_typecheck_1.c: Adjust or remove
      	dg-error directives for __bf16 being an extended arithmetic type.
      	* gcc.target/aarch64/bfloat16_vector_typecheck_2.c: Likewise.
      	* gcc.target/aarch64/bfloat16_scalar_typecheck.c: Likewise.
      	* g++.target/aarch64/bfloat_cpp_typecheck.C: Don't expect two __bf16
      	related errors.
      libgcc/
      	* config/aarch64/t-softfp (softfp_extensions): Add bfsf.
      	(softfp_truncations): Add tfbf dfbf sfbf hfbf.
      	(softfp_extras): Add floatdibf floatundibf floattibf floatuntibf.
      	* config/aarch64/libgcc-softfp.ver (GCC_13.0.0): Export
      	__extendbfsf2 and __trunc{s,d,t,h}fbf2.
      	* config/aarch64/sfp-machine.h (_FP_NANFRAC_B, _FP_NANSIGN_B): Define.
      	* soft-fp/floatundibf.c: New file.
      	* soft-fp/floatdibf.c: New file.
      libstdc++-v3/
      	* config/abi/pre/gnu.ver (CXXABI_1.3.14): Also export __bf16 tinfos
      	if it isn't mangled as DF16b but u6__bf16.
      13071c3c
  8. Mar 10, 2023
    • Jakub Jelinek's avatar
      libgcc, i386: Add __fix{,uns}bfti and __float{,un}tibf [PR107703] · 246127ab
      Jakub Jelinek authored
      While DI <-> BF conversions can be handled (and are) through
      DI <-> XF <-> BF and for narrower integral modes even sometimes
      through DF or SF, because XFmode has 64-bit mantissa and so all
      the DImode values are exactly representable in XFmode.
      That is not the case for TImode, and while e.g. the HF -> TI
      conversions are IMHO useless in libgcc, because HFmode has
      -65504.0f16, 65504.0f16 range, all the integers will be already
      representable in SImode (or even HImode for unsigned) and so
      I think HF -> DI -> TI conversions are faster and valid,
      BFmode has roughly the same range as SFmode and so we absolutely need
      the TI -> BF conversions to avoid double rounding.
      
      As for BF -> TI conversions, they can be either also implemented
      in libgcc, or they can be implemented (as done in this commit)
      as BF -> SF -> TI conversions with the same code generation used
      elsewhere, just doing the 16-bit left shift of the bits - I think
      we don't need to handle sNaNs during the BF -> SF part because
      SF -> TI (which is already a libcall too) will handle that too.
      
      The BF -> SF -> TI path avoids wasting
          32: 0000000000015e10   321 FUNC    GLOBAL DEFAULT   13 __fixbfti@@GCC_13.0.0
          89: 0000000000015f60   299 FUNC    GLOBAL DEFAULT   13 __fixunsbfti@@GCC_13.0.0
      
      2023-03-10  Jakub Jelinek  <jakub@redhat.com>
      
      	PR target/107703
      	* optabs.cc (expand_fix): For conversions from BFmode to integral,
      	use shifts to convert it to SFmode first and then convert SFmode
      	to integral.
      
      	* soft-fp/floattibf.c: New file.
      	* soft-fp/floatuntibf.c: New file.
      	* config/i386/libgcc-glibc.ver: Export __float{,un}tibf @ GCC_13.0.0.
      	* config/i386/64/t-softfp (softfp_extras): Add floattibf and
      	floatuntibf.
      	(CFLAGS-floattibf.c, CFLAGS-floatunstibf.c): Add -msse2.
      246127ab
  9. Mar 06, 2023
    • Michael Meissner's avatar
      PR target/107299: Fix build issue when long double is IEEE 128-bit · 306c7b1a
      Michael Meissner authored
      This patch updates the IEEE 128-bit types used in libgcc.
      
      At the moment, we cannot build GCC when the target uses IEEE 128-bit long
      doubles, such as building the compiler for a native Fedora 36 system.  The
      build dies when it is trying to build the _mulkc3.c and _divkc3 modules.
      
      This patch changes libgcc to use long double for the IEEE 128-bit base type if
      long double is IEEE 128-bit, and it uses _Float128 otherwise.  The built-in
      functions are adjusted to be the correct version based on the IEEE 128-bit base
      type used.
      
      While it is desirable to ultimately have __float128 and _Float128 use the same
      internal type and mode within GCC, at present if you use the option
      -mabi=ieeelongdouble, the __float128 type will use the long double type and not
      the _Float128 type.  We get an internal compiler error if we combine the
      signbitf128 built-in with a long double type.
      
      I've gone through several iterations of trying to fix this within GCC, and
      there are various problems that have come up.  I developed this alternative
      patch that changes libgcc so that it does not tickle the issue.  I hope we can
      fix the compiler at some point, but right now, this is preventing people on
      Fedora 36 systems from building compilers where the default long double is IEEE
      128-bit.
      
      2023-03-06   Michael Meissner  <meissner@linux.ibm.com>
      
      libgcc/
      
      	PR target/107299
      	* config/rs6000/_divkc3.c (COPYSIGN): Use the correct built-in based on
      	whether long double is IBM or IEEE.
      	(INFINITY): Likewise.
      	(FABS): Likewise.
      	* config/rs6000/_mulkc3.c (COPYSIGN): Likewise.
      	(INFINITY): Likewise.
      	* config/rs6000/quad-float128.h (TF): Remove definition.
      	(TFtype): Define to be long double or _Float128.
      	(TCtype): Define to be _Complex long double or _Complex _Float128.
      	* libgcc2.h (TFtype): Allow machine config files to override this.
      	(TCtype): Likewise.
      	* soft-fp/quad.h (TFtype): Likewise.
      306c7b1a
  10. Oct 14, 2022
    • Jakub Jelinek's avatar
      middle-end, c++, i386, libgcc: std::bfloat16_t and __bf16 arithmetic support · c2565a31
      Jakub Jelinek authored
      Here is a complete patch to add std::bfloat16_t support on
      x86 (AArch64 and ARM left for later).  Almost no BFmode optabs
      are added by the patch, so for binops/unops it extends to SFmode
      first and then truncates back to BFmode.
      For {HF,SF,DF,XF,TF}mode -> BFmode conversions libgcc has implementations
      of all those conversions so that we avoid double rounding, for
      BFmode -> {DF,XF,TF}mode conversions to avoid growing libgcc too much
      it emits BFmode -> SFmode conversion first and then converts to the even
      wider mode, neither step should be imprecise.
      For BFmode -> HFmode, it first emits a precise BFmode -> SFmode conversion
      and then SFmode -> HFmode, because neither format is subset or superset
      of the other, while SFmode is superset of both.
      expr.cc then contains a -ffast-math optimization of the BF -> SF and
      SF -> BF conversions if we don't optimize for space (and for the latter
      if -frounding-math isn't enabled either).
      For x86, perhaps truncsfbf2 optab could be defined for TARGET_AVX512BF16
      but IMNSHO should FAIL if !flag_finite_math || flag_rounding_math
      || !flag_unsafe_math_optimizations, because I think the insn doesn't
      raise on sNaNs, hardcodes round to nearest and flushes denormals to zero.
      By default (unless x86 -fexcess-precision=16) we use float excess
      precision for BFmode, so truncate only on explicit casts and assignments.
      The patch introduces a single __bf16 builtin - __builtin_nansf16b,
      because (__bf16) __builtin_nansf ("") will drop the sNaN into qNaN,
      and uses f16b suffix instead of bf16 because there would be ambiguity on
      log vs. logb - __builtin_logbf16 could be either log with bf16 suffix
      or logb with f16 suffix.  In other cases libstdc++ should mostly use
      __builtin_*f for std::bfloat16_t overloads (we have a problem with
      std::nextafter though but that one we have also for std::float16_t).
      
      2022-10-14  Jakub Jelinek  <jakub@redhat.com>
      
      gcc/
      	* tree-core.h (enum tree_index): Add TI_BFLOAT16_TYPE.
      	* tree.h (bfloat16_type_node): Define.
      	* tree.cc (excess_precision_type): Promote bfloat16_type_mode
      	like float16_type_mode.
      	(build_common_tree_nodes): Initialize bfloat16_type_node if
      	BFmode is supported.
      	* expmed.h (maybe_expand_shift): Declare.
      	* expmed.cc (maybe_expand_shift): No longer static.
      	* expr.cc (convert_mode_scalar): Don't ICE on BF -> HF or HF -> BF
      	conversions.  If there is no optab, handle BF -> {DF,XF,TF,HF}
      	conversions as separate BF -> SF -> {DF,XF,TF,HF} conversions, add
      	-ffast-math generic implementation for BF -> SF and SF -> BF
      	conversions.
      	* builtin-types.def (BT_BFLOAT16, BT_FN_BFLOAT16_CONST_STRING): New.
      	* builtins.def (BUILT_IN_NANSF16B): New builtin.
      	* fold-const-call.cc (fold_const_call): Handle CFN_BUILT_IN_NANSF16B.
      	* config/i386/i386.cc (classify_argument): Handle E_BCmode.
      	(ix86_libgcc_floating_mode_supported_p): Also return true for BFmode
      	for -msse2.
      	(ix86_mangle_type): Mangle BFmode as DF16b.
      	(ix86_invalid_conversion, ix86_invalid_unary_op,
      	ix86_invalid_binary_op): Remove.
      	(TARGET_INVALID_CONVERSION, TARGET_INVALID_UNARY_OP,
      	TARGET_INVALID_BINARY_OP): Don't redefine.
      	* config/i386/i386-builtins.cc (ix86_bf16_type_node): Remove.
      	(ix86_register_bf16_builtin_type): Use bfloat16_type_node rather than
      	ix86_bf16_type_node, only create it if still NULL.
      	* config/i386/i386-builtin-types.def (BFLOAT16): Likewise.
      	* config/i386/i386.md (cbranchbf4, cstorebf4): New expanders.
      gcc/c-family/
      	* c-cppbuiltin.cc (c_cpp_builtins): If bfloat16_type_node,
      	predefine __BFLT16_*__ macros and for C++23 also
      	__STDCPP_BFLOAT16_T__.  Predefine bfloat16_type_node related
      	macros for -fbuilding-libgcc.
      	* c-lex.cc (interpret_float): Handle CPP_N_BFLOAT16.
      gcc/c/
      	* c-typeck.cc (convert_arguments): Don't promote __bf16 to
      	double.
      gcc/cp/
      	* cp-tree.h (extended_float_type_p): Return true for
      	bfloat16_type_node.
      	* typeck.cc (cp_compare_floating_point_conversion_ranks): Set
      	extended{1,2} if mv{1,2} is bfloat16_type_node.  Adjust comment.
      gcc/testsuite/
      	* lib/target-supports.exp (check_effective_target_bfloat16,
      	check_effective_target_bfloat16_runtime, add_options_for_bfloat16):
      	New.
      	* gcc.dg/torture/bfloat16-basic.c: New test.
      	* gcc.dg/torture/bfloat16-builtin.c: New test.
      	* gcc.dg/torture/bfloat16-builtin-issignaling-1.c: New test.
      	* gcc.dg/torture/bfloat16-complex.c: New test.
      	* gcc.dg/torture/builtin-issignaling-1.c: Allow to be includable
      	from bfloat16-builtin-issignaling-1.c.
      	* gcc.dg/torture/floatn-basic.h: Allow to be includable from
      	bfloat16-basic.c.
      	* gcc.target/i386/vect-bfloat16-typecheck_2.c: Adjust expected
      	diagnostics.
      	* gcc.target/i386/sse2-bfloat16-scalar-typecheck.c: Likewise.
      	* gcc.target/i386/vect-bfloat16-typecheck_1.c: Likewise.
      	* g++.target/i386/bfloat_cpp_typecheck.C: Likewise.
      libcpp/
      	* include/cpplib.h (CPP_N_BFLOAT16): Define.
      	* expr.cc (interpret_float_suffix): Handle bf16 and BF16 suffixes for
      	C++.
      libgcc/
      	* config/i386/t-softfp (softfp_extensions): Add bfsf.
      	(softfp_truncations): Add tfbf xfbf dfbf sfbf hfbf.
      	(CFLAGS-extendbfsf2.c, CFLAGS-truncsfbf2.c, CFLAGS-truncdfbf2.c,
      	CFLAGS-truncxfbf2.c, CFLAGS-trunctfbf2.c, CFLAGS-trunchfbf2.c): Add
      	-msse2.
      	* config/i386/libgcc-glibc.ver (GCC_13.0.0): Export
      	__extendbfsf2 and __trunc{s,d,x,t,h}fbf2.
      	* config/i386/sfp-machine.h (_FP_NANSIGN_B): Define.
      	* config/i386/64/sfp-machine.h (_FP_NANFRAC_B): Define.
      	* config/i386/32/sfp-machine.h (_FP_NANFRAC_B): Define.
      	* soft-fp/brain.h: New file.
      	* soft-fp/truncsfbf2.c: New file.
      	* soft-fp/truncdfbf2.c: New file.
      	* soft-fp/truncxfbf2.c: New file.
      	* soft-fp/trunctfbf2.c: New file.
      	* soft-fp/trunchfbf2.c: New file.
      	* soft-fp/truncbfhf2.c: New file.
      	* soft-fp/extendbfsf2.c: New file.
      libiberty/
      	* cp-demangle.h (D_BUILTIN_TYPE_COUNT): Increment.
      	* cp-demangle.c (cplus_demangle_builtin_types): Add std::bfloat16_t
      	entry.
      	(cplus_demangle_type): Demangle DF16b.
      	* testsuite/demangle-expected (_Z3xxxDF16b): New test.
      c2565a31
  11. Aug 16, 2022
    • Kito Cheng's avatar
      soft-fp: Update soft-fp from glibc · e2302610
      Kito Cheng authored
      This patch is updating all soft-fp from glibc, most changes are
      copyright years update, removing "Contributed by" lines and update URL for
      license, and changes other than those update are adding conversion
      function between IEEE half and 32-bit/64-bit integer, those functions are
      required by RISC-V _Float16 support.
      
      libgcc/ChangeLog:
      
      	* soft-fp/fixhfdi.c: New.
      	* soft-fp/fixhfsi.c: Likewise.
      	* soft-fp/fixunshfdi.c: Likewise.
      	* soft-fp/fixunshfsi.c: Likewise.
      	* soft-fp/floatdihf.c: Likewise.
      	* soft-fp/floatsihf.c: Likewise.
      	* soft-fp/floatundihf.c: Likewise.
      	* soft-fp/floatunsihf.c: Likewise.
      	* soft-fp/adddf3.c: Updating copyright years, removing "Contributed by"
      	lines and update URL for license.
      	* soft-fp/addsf3.c: Likewise.
      	* soft-fp/addtf3.c: Likewise.
      	* soft-fp/divdf3.c: Likewise.
      	* soft-fp/divsf3.c: Likewise.
      	* soft-fp/divtf3.c: Likewise.
      	* soft-fp/double.h: Likewise.
      	* soft-fp/eqdf2.c: Likewise.
      	* soft-fp/eqhf2.c: Likewise.
      	* soft-fp/eqsf2.c: Likewise.
      	* soft-fp/eqtf2.c: Likewise.
      	* soft-fp/extenddftf2.c: Likewise.
      	* soft-fp/extended.h: Likewise.
      	* soft-fp/extendhfdf2.c: Likewise.
      	* soft-fp/extendhfsf2.c: Likewise.
      	* soft-fp/extendhftf2.c: Likewise.
      	* soft-fp/extendhfxf2.c: Likewise.
      	* soft-fp/extendsfdf2.c: Likewise.
      	* soft-fp/extendsftf2.c: Likewise.
      	* soft-fp/extendxftf2.c: Likewise.
      	* soft-fp/fixdfdi.c: Likewise.
      	* soft-fp/fixdfsi.c: Likewise.
      	* soft-fp/fixdfti.c: Likewise.
      	* soft-fp/fixhfti.c: Likewise.
      	* soft-fp/fixsfdi.c: Likewise.
      	* soft-fp/fixsfsi.c: Likewise.
      	* soft-fp/fixsfti.c: Likewise.
      	* soft-fp/fixtfdi.c: Likewise.
      	* soft-fp/fixtfsi.c: Likewise.
      	* soft-fp/fixtfti.c: Likewise.
      	* soft-fp/fixunsdfdi.c: Likewise.
      	* soft-fp/fixunsdfsi.c: Likewise.
      	* soft-fp/fixunsdfti.c: Likewise.
      	* soft-fp/fixunshfti.c: Likewise.
      	* soft-fp/fixunssfdi.c: Likewise.
      	* soft-fp/fixunssfsi.c: Likewise.
      	* soft-fp/fixunssfti.c: Likewise.
      	* soft-fp/fixunstfdi.c: Likewise.
      	* soft-fp/fixunstfsi.c: Likewise.
      	* soft-fp/fixunstfti.c: Likewise.
      	* soft-fp/floatdidf.c: Likewise.
      	* soft-fp/floatdisf.c: Likewise.
      	* soft-fp/floatditf.c: Likewise.
      	* soft-fp/floatsidf.c: Likewise.
      	* soft-fp/floatsisf.c: Likewise.
      	* soft-fp/floatsitf.c: Likewise.
      	* soft-fp/floattidf.c: Likewise.
      	* soft-fp/floattihf.c: Likewise.
      	* soft-fp/floattisf.c: Likewise.
      	* soft-fp/floattitf.c: Likewise.
      	* soft-fp/floatundidf.c: Likewise.
      	* soft-fp/floatundisf.c: Likewise.
      	* soft-fp/floatunditf.c: Likewise.
      	* soft-fp/floatunsidf.c: Likewise.
      	* soft-fp/floatunsisf.c: Likewise.
      	* soft-fp/floatunsitf.c: Likewise.
      	* soft-fp/floatuntidf.c: Likewise.
      	* soft-fp/floatuntihf.c: Likewise.
      	* soft-fp/floatuntisf.c: Likewise.
      	* soft-fp/floatuntitf.c: Likewise.
      	* soft-fp/gedf2.c: Likewise.
      	* soft-fp/gesf2.c: Likewise.
      	* soft-fp/getf2.c: Likewise.
      	* soft-fp/half.h: Likewise.
      	* soft-fp/ledf2.c: Likewise.
      	* soft-fp/lesf2.c: Likewise.
      	* soft-fp/letf2.c: Likewise.
      	* soft-fp/muldf3.c: Likewise.
      	* soft-fp/mulsf3.c: Likewise.
      	* soft-fp/multf3.c: Likewise.
      	* soft-fp/negdf2.c: Likewise.
      	* soft-fp/negsf2.c: Likewise.
      	* soft-fp/negtf2.c: Likewise.
      	* soft-fp/op-1.h: Likewise.
      	* soft-fp/op-2.h: Likewise.
      	* soft-fp/op-4.h: Likewise.
      	* soft-fp/op-8.h: Likewise.
      	* soft-fp/op-common.h: Likewise.
      	* soft-fp/quad.h: Likewise.
      	* soft-fp/single.h: Likewise.
      	* soft-fp/soft-fp.h: Likewise.
      	* soft-fp/subdf3.c: Likewise.
      	* soft-fp/subsf3.c: Likewise.
      	* soft-fp/subtf3.c: Likewise.
      	* soft-fp/truncdfhf2.c: Likewise.
      	* soft-fp/truncdfsf2.c: Likewise.
      	* soft-fp/truncsfhf2.c: Likewise.
      	* soft-fp/trunctfdf2.c: Likewise.
      	* soft-fp/trunctfhf2.c: Likewise.
      	* soft-fp/trunctfsf2.c: Likewise.
      	* soft-fp/trunctfxf2.c: Likewise.
      	* soft-fp/truncxfhf2.c: Likewise.
      	* soft-fp/unorddf2.c: Likewise.
      	* soft-fp/unordsf2.c: Likewise.
      	* soft-fp/unordtf2.c: Likewise.
      e2302610
  12. Sep 02, 2021
    • liuhongt's avatar
      Update hf soft-fp from glibc. · e42d2d2a
      liuhongt authored
      libgcc/ChangeLog
      
      	* soft-fp/eqhf2.c: New file.
      	* soft-fp/extendhfdf2.c: New file.
      	* soft-fp/extendhfsf2.c: New file.
      	* soft-fp/half.h (FP_CMP_EQ_H): New marco.
      	* soft-fp/truncdfhf2.c: New file
      	* soft-fp/truncsfhf2.c: New file
      e42d2d2a
  13. Jul 01, 2021
    • H.J. Lu's avatar
      soft-fp: Update soft-fp from glibc · 1a4b2224
      H.J. Lu authored
      This patch is updating soft-fp from glibc:
      
      1. Add __extendhfxf2 to return an IEEE half converted to IEEE extended.
      2. Add __truncxfhf2 to truncate IEEE extended into IEEE half.
      
      These are needed by x86 _Float16 support.
      
      	* soft-fp/extendhfxf2.c: New file.
      	* soft-fp/truncxfhf2.c: Likewise.
      1a4b2224
  14. May 17, 2019
    • H.J. Lu's avatar
      soft-fp: Update soft-fp from glibc · 2581344d
      H.J. Lu authored
      This patch is updating all soft-fp from glibc, most changes are
      copyright years update, and changes other than years update are
      
      	* soft-fp/extenddftf2.c: Use "_FP_W_TYPE_SIZE < 64" to check if
      	4_FP_W_TYPEs are used for IEEE quad precision.
      	* soft-fp/extendhftf2.c: Likewise.
      	* soft-fp/extendsftf2.c: Likewise.
      	* soft-fp/extendxftf2.c: Likewise.
      	* soft-fp/trunctfdf2.c: Likewise.
      	* soft-fp/trunctfhf2.c: Likewise.
      	* soft-fp/trunctfsf2.c: Likewise.
      	* soft-fp/trunctfxf2.c: Likewise.
      	* config/rs6000/ibm-ldouble.c: Likewise.
      
      From-SVN: r271327
      2581344d
  15. Nov 08, 2018
    • Kito Cheng's avatar
      Update soft-fp from glibc. · 222cfefa
      Kito Cheng authored
      This patch is updating all soft-fp from glibc, most changes are
      copyright years update, and changes other than years update are list
      bellow, this patch has been tested with riscv32-elf(rv32imac),
      riscv64-elf(rv64imac) and nds32le-elf(v3), didn't introduce new test
      fail:
      
      soft-fp/op-4.h
        - soft-fp: Use temporary variable in FP_FRAC_SUB_3/FP_FRAC_SUB_4
          - ff48ea6787526d7e669af93ce2681b911d39675c
      soft-fp/op-8.h
        - soft-fp: Add implementation for 128 bit self-contained
          - af1d5782c1e3a635fdd13d6688be64de7759857c
      soft-fp/op-common.h
      - Add narrowing multiply functions.
         - 69a01461ee1417578d2ba20aac935828b50f1118
      
      soft-fp/extended.h
      soft-fp/half.h
      soft-fp/single.h
      soft-fp/double.h
      soft-fp/quad.h
      - Do not use packed structures in soft-fp.
        - 049375e2b5fc707436fd5d80337c253beededb2d
      
      2018-11-08  Kito Cheng  <kito@andestech.com>
      
      	* soft-fp/adddf3.c: Update from glibc.
      	* soft-fp/addsf3.c: Likewise.
      	* soft-fp/addtf3.c: Likewise.
      	* soft-fp/divdf3.c: Likewise.
      	* soft-fp/divsf3.c: Likewise.
      	* soft-fp/divtf3.c: Likewise.
      	* soft-fp/double.h: Likewise.
      	* soft-fp/eqdf2.c: Likewise.
      	* soft-fp/eqsf2.c: Likewise.
      	* soft-fp/eqtf2.c: Likewise.
      	* soft-fp/extenddftf2.c: Likewise.
      	* soft-fp/extended.h: Likewise.
      	* soft-fp/extendhftf2.c: Likewise.
      	* soft-fp/extendsfdf2.c: Likewise.
      	* soft-fp/extendsftf2.c: Likewise.
      	* soft-fp/extendxftf2.c: Likewise.
      	* soft-fp/fixdfdi.c: Likewise.
      	* soft-fp/fixdfsi.c: Likewise.
      	* soft-fp/fixdfti.c: Likewise.
      	* soft-fp/fixhfti.c: Likewise.
      	* soft-fp/fixsfdi.c: Likewise.
      	* soft-fp/fixsfsi.c: Likewise.
      	* soft-fp/fixsfti.c: Likewise.
      	* soft-fp/fixtfdi.c: Likewise.
      	* soft-fp/fixtfsi.c: Likewise.
      	* soft-fp/fixtfti.c: Likewise.
      	* soft-fp/fixunsdfdi.c: Likewise.
      	* soft-fp/fixunsdfsi.c: Likewise.
      	* soft-fp/fixunsdfti.c: Likewise.
      	* soft-fp/fixunshfti.c: Likewise.
      	* soft-fp/fixunssfdi.c: Likewise.
      	* soft-fp/fixunssfsi.c: Likewise.
      	* soft-fp/fixunssfti.c: Likewise.
      	* soft-fp/fixunstfdi.c: Likewise.
      	* soft-fp/fixunstfsi.c: Likewise.
      	* soft-fp/fixunstfti.c: Likewise.
      	* soft-fp/floatdidf.c: Likewise.
      	* soft-fp/floatdisf.c: Likewise.
      	* soft-fp/floatditf.c: Likewise.
      	* soft-fp/floatsidf.c: Likewise.
      	* soft-fp/floatsisf.c: Likewise.
      	* soft-fp/floatsitf.c: Likewise.
      	* soft-fp/floattidf.c: Likewise.
      	* soft-fp/floattihf.c: Likewise.
      	* soft-fp/floattisf.c: Likewise.
      	* soft-fp/floattitf.c: Likewise.
      	* soft-fp/floatundidf.c: Likewise.
      	* soft-fp/floatundisf.c: Likewise.
      	* soft-fp/floatunditf.c: Likewise.
      	* soft-fp/floatunsidf.c: Likewise.
      	* soft-fp/floatunsisf.c: Likewise.
      	* soft-fp/floatunsitf.c: Likewise.
      	* soft-fp/floatuntidf.c: Likewise.
      	* soft-fp/floatuntihf.c: Likewise.
      	* soft-fp/floatuntisf.c: Likewise.
      	* soft-fp/floatuntitf.c: Likewise.
      	* soft-fp/gedf2.c: Likewise.
      	* soft-fp/gesf2.c: Likewise.
      	* soft-fp/getf2.c: Likewise.
      	* soft-fp/half.h: Likewise.
      	* soft-fp/ledf2.c: Likewise.
      	* soft-fp/lesf2.c: Likewise.
      	* soft-fp/letf2.c: Likewise.
      	* soft-fp/muldf3.c: Likewise.
      	* soft-fp/mulsf3.c: Likewise.
      	* soft-fp/multf3.c: Likewise.
      	* soft-fp/negdf2.c: Likewise.
      	* soft-fp/negsf2.c: Likewise.
      	* soft-fp/negtf2.c: Likewise.
      	* soft-fp/op-1.h: Likewise.
      	* soft-fp/op-2.h: Likewise.
      	* soft-fp/op-4.h: Likewise.
      	* soft-fp/op-8.h: Likewise.
      	* soft-fp/op-common.h: Likewise.
      	* soft-fp/quad.h: Likewise.
      	* soft-fp/single.h: Likewise.
      	* soft-fp/soft-fp.h: Likewise.
      	* soft-fp/subdf3.c: Likewise.
      	* soft-fp/subsf3.c: Likewise.
      	* soft-fp/subtf3.c: Likewise.
      	* soft-fp/truncdfsf2.c: Likewise.
      	* soft-fp/trunctfdf2.c: Likewise.
      	* soft-fp/trunctfhf2.c: Likewise.
      	* soft-fp/trunctfsf2.c: Likewise.
      	* soft-fp/trunctfxf2.c: Likewise.
      	* soft-fp/unorddf2.c: Likewise.
      	* soft-fp/unordsf2.c: Likewise.
      	* soft-fp/unordtf2.c: Likewise.
      
      From-SVN: r265925
      222cfefa
  16. Jan 24, 2017
  17. Nov 23, 2016
    • James Greenhalgh's avatar
      [Patch libgcc 9/17] Update soft-fp from glibc · 5823ef23
      James Greenhalgh authored
      libgcc/
      
      	* soft-fp/extendhftf2.c: New.
      	* soft-fp/fixhfti.c: Likewise.
      	* soft-fp/fixunshfti.c: Likewise.
      	* soft-fp/floattihf.c: Likewise.
      	* soft-fp/floatuntihf.c: Likewise.
      	* soft-fp/half.h: Likewise.
      	* soft-fp/trunctfhf2.c: Likewise.
      
      From-SVN: r242779
      5823ef23
  18. Aug 16, 2016
    • Joseph Myers's avatar
      Update soft-fp from glibc (PR libgcc/77265). · feeb6268
      Joseph Myers authored
      This patch updates soft-fp from glibc, bringing in the fix for PR
      libgcc/77265, XFmode extension to TFmode wrongly turning an infinity
      into a NaN.  A test for that bug is added.
      
      Bootstrapped with no regressions on x86_64-pc-linux-gnu.
      
      	PR libgcc/77265
      gcc/testsuite:
      	* gcc.dg/torture/float128-extend-inf.c: New test.
      
      libgcc:
      	* soft-fp/adddf3.c: Update from glibc.
      	* soft-fp/addsf3.c: Likewise.
      	* soft-fp/addtf3.c: Likewise.
      	* soft-fp/divdf3.c: Likewise.
      	* soft-fp/divsf3.c: Likewise.
      	* soft-fp/divtf3.c: Likewise.
      	* soft-fp/double.h: Likewise.
      	* soft-fp/eqdf2.c: Likewise.
      	* soft-fp/eqsf2.c: Likewise.
      	* soft-fp/eqtf2.c: Likewise.
      	* soft-fp/extenddftf2.c: Likewise.
      	* soft-fp/extended.h: Likewise.
      	* soft-fp/extendsfdf2.c: Likewise.
      	* soft-fp/extendsftf2.c: Likewise.
      	* soft-fp/extendxftf2.c: Likewise.
      	* soft-fp/fixdfdi.c: Likewise.
      	* soft-fp/fixdfsi.c: Likewise.
      	* soft-fp/fixdfti.c: Likewise.
      	* soft-fp/fixsfdi.c: Likewise.
      	* soft-fp/fixsfsi.c: Likewise.
      	* soft-fp/fixsfti.c: Likewise.
      	* soft-fp/fixtfdi.c: Likewise.
      	* soft-fp/fixtfsi.c: Likewise.
      	* soft-fp/fixtfti.c: Likewise.
      	* soft-fp/fixunsdfdi.c: Likewise.
      	* soft-fp/fixunsdfsi.c: Likewise.
      	* soft-fp/fixunsdfti.c: Likewise.
      	* soft-fp/fixunssfdi.c: Likewise.
      	* soft-fp/fixunssfsi.c: Likewise.
      	* soft-fp/fixunssfti.c: Likewise.
      	* soft-fp/fixunstfdi.c: Likewise.
      	* soft-fp/fixunstfsi.c: Likewise.
      	* soft-fp/fixunstfti.c: Likewise.
      	* soft-fp/floatdidf.c: Likewise.
      	* soft-fp/floatdisf.c: Likewise.
      	* soft-fp/floatditf.c: Likewise.
      	* soft-fp/floatsidf.c: Likewise.
      	* soft-fp/floatsisf.c: Likewise.
      	* soft-fp/floatsitf.c: Likewise.
      	* soft-fp/floattidf.c: Likewise.
      	* soft-fp/floattisf.c: Likewise.
      	* soft-fp/floattitf.c: Likewise.
      	* soft-fp/floatundidf.c: Likewise.
      	* soft-fp/floatundisf.c: Likewise.
      	* soft-fp/floatunditf.c: Likewise.
      	* soft-fp/floatunsidf.c: Likewise.
      	* soft-fp/floatunsisf.c: Likewise.
      	* soft-fp/floatunsitf.c: Likewise.
      	* soft-fp/floatuntidf.c: Likewise.
      	* soft-fp/floatuntisf.c: Likewise.
      	* soft-fp/floatuntitf.c: Likewise.
      	* soft-fp/gedf2.c: Likewise.
      	* soft-fp/gesf2.c: Likewise.
      	* soft-fp/getf2.c: Likewise.
      	* soft-fp/ledf2.c: Likewise.
      	* soft-fp/lesf2.c: Likewise.
      	* soft-fp/letf2.c: Likewise.
      	* soft-fp/muldf3.c: Likewise.
      	* soft-fp/mulsf3.c: Likewise.
      	* soft-fp/multf3.c: Likewise.
      	* soft-fp/negdf2.c: Likewise.
      	* soft-fp/negsf2.c: Likewise.
      	* soft-fp/negtf2.c: Likewise.
      	* soft-fp/op-1.h: Likewise.
      	* soft-fp/op-2.h: Likewise.
      	* soft-fp/op-4.h: Likewise.
      	* soft-fp/op-8.h: Likewise.
      	* soft-fp/op-common.h: Likewise.
      	* soft-fp/quad.h: Likewise.
      	* soft-fp/single.h: Likewise.
      	* soft-fp/soft-fp.h: Likewise.
      	* soft-fp/subdf3.c: Likewise.
      	* soft-fp/subsf3.c: Likewise.
      	* soft-fp/subtf3.c: Likewise.
      	* soft-fp/truncdfsf2.c: Likewise.
      	* soft-fp/trunctfdf2.c: Likewise.
      	* soft-fp/trunctfsf2.c: Likewise.
      	* soft-fp/trunctfxf2.c: Likewise.
      	* soft-fp/unorddf2.c: Likewise.
      	* soft-fp/unordsf2.c: Likewise.
      	* soft-fp/unordtf2.c: Likewise.
      
      From-SVN: r239513
      feeb6268
  19. Sep 28, 2015
    • Joseph Myers's avatar
      Update soft-fp from glibc. · 30954527
      Joseph Myers authored
      This patch updates the soft-fp code in libgcc from glibc.  There are
      no changes here of significance to the use of soft-fp in GCC (and so
      no testsuite additions); it's simply an update to bring in the latest
      soft-fp version (which will also hopefully go into Linux 4.4 to
      replace the 15-year-old copy currently in Linux).
      
      Bootstrapped with no regressions on x86_64-pc-linux-gnu.
      
      	* soft-fp/adddf3.c: Update from glibc.
      	* soft-fp/addsf3.c: Likewise.
      	* soft-fp/addtf3.c: Likewise.
      	* soft-fp/divdf3.c: Likewise.
      	* soft-fp/divsf3.c: Likewise.
      	* soft-fp/divtf3.c: Likewise.
      	* soft-fp/double.h: Likewise.
      	* soft-fp/eqdf2.c: Likewise.
      	* soft-fp/eqsf2.c: Likewise.
      	* soft-fp/eqtf2.c: Likewise.
      	* soft-fp/extenddftf2.c: Likewise.
      	* soft-fp/extended.h: Likewise.
      	* soft-fp/extendsfdf2.c: Likewise.
      	* soft-fp/extendsftf2.c: Likewise.
      	* soft-fp/extendxftf2.c: Likewise.
      	* soft-fp/fixdfdi.c: Likewise.
      	* soft-fp/fixdfsi.c: Likewise.
      	* soft-fp/fixdfti.c: Likewise.
      	* soft-fp/fixsfdi.c: Likewise.
      	* soft-fp/fixsfsi.c: Likewise.
      	* soft-fp/fixsfti.c: Likewise.
      	* soft-fp/fixtfdi.c: Likewise.
      	* soft-fp/fixtfsi.c: Likewise.
      	* soft-fp/fixtfti.c: Likewise.
      	* soft-fp/fixunsdfdi.c: Likewise.
      	* soft-fp/fixunsdfsi.c: Likewise.
      	* soft-fp/fixunsdfti.c: Likewise.
      	* soft-fp/fixunssfdi.c: Likewise.
      	* soft-fp/fixunssfsi.c: Likewise.
      	* soft-fp/fixunssfti.c: Likewise.
      	* soft-fp/fixunstfdi.c: Likewise.
      	* soft-fp/fixunstfsi.c: Likewise.
      	* soft-fp/fixunstfti.c: Likewise.
      	* soft-fp/floatdidf.c: Likewise.
      	* soft-fp/floatdisf.c: Likewise.
      	* soft-fp/floatditf.c: Likewise.
      	* soft-fp/floatsidf.c: Likewise.
      	* soft-fp/floatsisf.c: Likewise.
      	* soft-fp/floatsitf.c: Likewise.
      	* soft-fp/floattidf.c: Likewise.
      	* soft-fp/floattisf.c: Likewise.
      	* soft-fp/floattitf.c: Likewise.
      	* soft-fp/floatundidf.c: Likewise.
      	* soft-fp/floatundisf.c: Likewise.
      	* soft-fp/floatunditf.c: Likewise.
      	* soft-fp/floatunsidf.c: Likewise.
      	* soft-fp/floatunsisf.c: Likewise.
      	* soft-fp/floatunsitf.c: Likewise.
      	* soft-fp/floatuntidf.c: Likewise.
      	* soft-fp/floatuntisf.c: Likewise.
      	* soft-fp/floatuntitf.c: Likewise.
      	* soft-fp/gedf2.c: Likewise.
      	* soft-fp/gesf2.c: Likewise.
      	* soft-fp/getf2.c: Likewise.
      	* soft-fp/ledf2.c: Likewise.
      	* soft-fp/lesf2.c: Likewise.
      	* soft-fp/letf2.c: Likewise.
      	* soft-fp/muldf3.c: Likewise.
      	* soft-fp/mulsf3.c: Likewise.
      	* soft-fp/multf3.c: Likewise.
      	* soft-fp/negdf2.c: Likewise.
      	* soft-fp/negsf2.c: Likewise.
      	* soft-fp/negtf2.c: Likewise.
      	* soft-fp/op-1.h: Likewise.
      	* soft-fp/op-2.h: Likewise.
      	* soft-fp/op-4.h: Likewise.
      	* soft-fp/op-8.h: Likewise.
      	* soft-fp/op-common.h: Likewise.
      	* soft-fp/quad.h: Likewise.
      	* soft-fp/single.h: Likewise.
      	* soft-fp/soft-fp.h: Likewise.
      	* soft-fp/subdf3.c: Likewise.
      	* soft-fp/subsf3.c: Likewise.
      	* soft-fp/subtf3.c: Likewise.
      	* soft-fp/truncdfsf2.c: Likewise.
      	* soft-fp/trunctfdf2.c: Likewise.
      	* soft-fp/trunctfsf2.c: Likewise.
      	* soft-fp/trunctfxf2.c: Likewise.
      	* soft-fp/unorddf2.c: Likewise.
      	* soft-fp/unordsf2.c: Likewise.
      	* soft-fp/unordtf2.c: Likewise.
      
      From-SVN: r228223
      30954527
  20. Oct 09, 2014
    • Joseph Myers's avatar
      Update soft-fp from glibc. · 5f606431
      Joseph Myers authored
      This patch updates libgcc's copy of soft-fp from glibc, adding a
      testcase for a bug fix this brings in.
      
      Bootstrapped with no regressions on x86_64-unknown-linux-gnu.
      
      libgcc:
      	* soft-fp/double.h: Update from glibc.
      	* soft-fp/eqdf2.c: Likewise.
      	* soft-fp/eqsf2.c: Likewise.
      	* soft-fp/eqtf2.c: Likewise.
      	* soft-fp/extenddftf2.c: Likewise.
      	* soft-fp/extended.h: Likewise.
      	* soft-fp/extendsfdf2.c: Likewise.
      	* soft-fp/extendsftf2.c: Likewise.
      	* soft-fp/extendxftf2.c: Likewise.
      	* soft-fp/gedf2.c: Likewise.
      	* soft-fp/gesf2.c: Likewise.
      	* soft-fp/getf2.c: Likewise.
      	* soft-fp/ledf2.c: Likewise.
      	* soft-fp/lesf2.c: Likewise.
      	* soft-fp/letf2.c: Likewise.
      	* soft-fp/op-1.h: Likewise.
      	* soft-fp/op-2.h: Likewise.
      	* soft-fp/op-4.h: Likewise.
      	* soft-fp/op-8.h: Likewise.
      	* soft-fp/op-common.h: Likewise.
      	* soft-fp/quad.h: Likewise.
      	* soft-fp/single.h: Likewise.
      	* soft-fp/soft-fp.h: Likewise.
      	* soft-fp/unorddf2.c: Likewise.
      	* soft-fp/unordsf2.c: Likewise.
      	* soft-fp/unordtf2.c: Likewise.
      	* config/c6x/eqd.c (__c6xabi_eqd): Update call to FP_CMP_EQ_D.
      	* config/c6x/eqf.c (__c6xabi_eqf): Update call to FP_CMP_EQ_S.
      	* config/c6x/ged.c (__c6xabi_ged): Update call to FP_CMP_D.
      	* config/c6x/gef.c (__c6xabi_gef): Update call to FP_CMP_S.
      	* config/c6x/gtd.c (__c6xabi_gtd): Update call to FP_CMP_D.
      	* config/c6x/gtf.c (__c6xabi_gtf): Update call to FP_CMP_S.
      	* config/c6x/led.c (__c6xabi_led): Update call to FP_CMP_D.
      	* config/c6x/lef.c (__c6xabi_lef): Update call to FP_CMP_S.
      	* config/c6x/ltd.c (__c6xabi_ltd): Update call to FP_CMP_D.
      	* config/c6x/ltf.c (__c6xabi_ltf): Update call to FP_CMP_S.
      
      gcc/testsuite:
      	* gcc.dg/torture/float128-extendxf-underflow.c: New test.
      
      From-SVN: r216048
      5f606431
  21. Feb 12, 2014
    • Joseph Myers's avatar
      float128-mul-underflow.c, [...]: New tests. · 9acf28f1
      Joseph Myers authored
      gcc/testsuite:
      	* gcc.dg/torture/float128-mul-underflow.c,
      	gcc.dg/torture/float128-truncdf-underflow.c,
      	gcc.dg/torture/float128-truncsf-underflow.c: New tests.
      
      libgcc:
      	* soft-fp/adddf3.c: Update from glibc.
      	* soft-fp/addsf3.c: Likewise.
      	* soft-fp/addtf3.c: Likewise.
      	* soft-fp/divdf3.c: Likewise.
      	* soft-fp/divsf3.c: Likewise.
      	* soft-fp/divtf3.c: Likewise.
      	* soft-fp/double.h: Likewise.
      	* soft-fp/eqdf2.c: Likewise.
      	* soft-fp/eqsf2.c: Likewise.
      	* soft-fp/eqtf2.c: Likewise.
      	* soft-fp/extenddftf2.c: Likewise.
      	* soft-fp/extended.h: Likewise.
      	* soft-fp/extendsfdf2.c: Likewise.
      	* soft-fp/extendsftf2.c: Likewise.
      	* soft-fp/extendxftf2.c: Likewise.
      	* soft-fp/fixdfdi.c: Likewise.
      	* soft-fp/fixdfsi.c: Likewise.
      	* soft-fp/fixdfti.c: Likewise.
      	* soft-fp/fixsfdi.c: Likewise.
      	* soft-fp/fixsfsi.c: Likewise.
      	* soft-fp/fixsfti.c: Likewise.
      	* soft-fp/fixtfdi.c: Likewise.
      	* soft-fp/fixtfsi.c: Likewise.
      	* soft-fp/fixtfti.c: Likewise.
      	* soft-fp/fixunsdfdi.c: Likewise.
      	* soft-fp/fixunsdfsi.c: Likewise.
      	* soft-fp/fixunsdfti.c: Likewise.
      	* soft-fp/fixunssfdi.c: Likewise.
      	* soft-fp/fixunssfsi.c: Likewise.
      	* soft-fp/fixunssfti.c: Likewise.
      	* soft-fp/fixunstfdi.c: Likewise.
      	* soft-fp/fixunstfsi.c: Likewise.
      	* soft-fp/fixunstfti.c: Likewise.
      	* soft-fp/floatdidf.c: Likewise.
      	* soft-fp/floatdisf.c: Likewise.
      	* soft-fp/floatditf.c: Likewise.
      	* soft-fp/floatsidf.c: Likewise.
      	* soft-fp/floatsisf.c: Likewise.
      	* soft-fp/floatsitf.c: Likewise.
      	* soft-fp/floattidf.c: Likewise.
      	* soft-fp/floattisf.c: Likewise.
      	* soft-fp/floattitf.c: Likewise.
      	* soft-fp/floatundidf.c: Likewise.
      	* soft-fp/floatundisf.c: Likewise.
      	* soft-fp/floatunditf.c: Likewise.
      	* soft-fp/floatunsidf.c: Likewise.
      	* soft-fp/floatunsisf.c: Likewise.
      	* soft-fp/floatunsitf.c: Likewise.
      	* soft-fp/floatuntidf.c: Likewise.
      	* soft-fp/floatuntisf.c: Likewise.
      	* soft-fp/floatuntitf.c: Likewise.
      	* soft-fp/gedf2.c: Likewise.
      	* soft-fp/gesf2.c: Likewise.
      	* soft-fp/getf2.c: Likewise.
      	* soft-fp/ledf2.c: Likewise.
      	* soft-fp/lesf2.c: Likewise.
      	* soft-fp/letf2.c: Likewise.
      	* soft-fp/muldf3.c: Likewise.
      	* soft-fp/mulsf3.c: Likewise.
      	* soft-fp/multf3.c: Likewise.
      	* soft-fp/negdf2.c: Likewise.
      	* soft-fp/negsf2.c: Likewise.
      	* soft-fp/negtf2.c: Likewise.
      	* soft-fp/op-1.h: Likewise.
      	* soft-fp/op-2.h: Likewise.
      	* soft-fp/op-4.h: Likewise.
      	* soft-fp/op-8.h: Likewise.
      	* soft-fp/op-common.h: Likewise.
      	* soft-fp/quad.h: Likewise.
      	* soft-fp/single.h: Likewise.
      	* soft-fp/soft-fp.h: Likewise.
      	* soft-fp/subdf3.c: Likewise.
      	* soft-fp/subsf3.c: Likewise.
      	* soft-fp/subtf3.c: Likewise.
      	* soft-fp/truncdfsf2.c: Likewise.
      	* soft-fp/trunctfdf2.c: Likewise.
      	* soft-fp/trunctfsf2.c: Likewise.
      	* soft-fp/trunctfxf2.c: Likewise.
      	* soft-fp/unorddf2.c: Likewise.
      	* soft-fp/unordsf2.c: Likewise.
      	* soft-fp/unordtf2.c: Likewise.
      	* config/aarch64/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): New
      	macro.
      	* config/arm/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
      	Likewise.
      	* config/c6x/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
      	Likewise.
      	* config/cris/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
      	Likewise.
      	* config/i386/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
      	Likewise.
      	* config/ia64/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
      	Likewise.
      	* config/lm32/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
      	Likewise.
      	* config/mips/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
      	Likewise.
      	* config/moxie/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
      	Likewise.
      	* config/nds32/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
      	Likewise.
      	* config/nios2/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
      	Likewise.
      	* config/rs6000/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
      	Likewise.
      	* config/score/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
      	Likewise.
      	* config/tilegx/sfp-machine32.h (_FP_TININESS_AFTER_ROUNDING):
      	Likewise.
      	* config/tilegx/sfp-machine64.h (_FP_TININESS_AFTER_ROUNDING):
      	Likewise.
      	* config/tilepro/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
      	Likewise.
      
      From-SVN: r207742
      9acf28f1
  22. Nov 27, 2013
  23. Nov 06, 2013
    • Joseph Myers's avatar
      float128-cmp-invalid.c, [...]: New tests. · 9954c743
      Joseph Myers authored
      gcc/testsuite:
      	* gcc.dg/torture/float128-cmp-invalid.c,
      	gcc.dg/torture/float128-div-underflow.c,
      	gcc.dg/torture/float128-extend-nan.c,
      	gcc.dg/torture/fp-int-convert-float128-timode-3.c: New tests.
      
      libgcc:
      	* soft-fp/README: Update.
      	* soft-fp/adddf3.c: Update from glibc.
      	* soft-fp/addsf3.c: Likewise.
      	* soft-fp/addtf3.c: Likewise.
      	* soft-fp/divdf3.c: Likewise.
      	* soft-fp/divsf3.c: Likewise.
      	* soft-fp/divtf3.c: Likewise.
      	* soft-fp/double.h: Likewise.
      	* soft-fp/eqdf2.c: Likewise.
      	* soft-fp/eqsf2.c: Likewise.
      	* soft-fp/eqtf2.c: Likewise.
      	* soft-fp/extenddftf2.c: Likewise.
      	* soft-fp/extended.h: Likewise.
      	* soft-fp/extendsfdf2.c: Likewise.
      	* soft-fp/extendsftf2.c: Likewise.
      	* soft-fp/extendxftf2.c: Likewise.
      	* soft-fp/fixdfdi.c: Likewise.
      	* soft-fp/fixdfsi.c: Likewise.
      	* soft-fp/fixdfti.c: Likewise.
      	* soft-fp/fixsfdi.c: Likewise.
      	* soft-fp/fixsfsi.c: Likewise.
      	* soft-fp/fixsfti.c: Likewise.
      	* soft-fp/fixtfdi.c: Likewise.
      	* soft-fp/fixtfsi.c: Likewise.
      	* soft-fp/fixtfti.c: Likewise.
      	* soft-fp/fixunsdfdi.c: Likewise.
      	* soft-fp/fixunsdfsi.c: Likewise.
      	* soft-fp/fixunsdfti.c: Likewise.
      	* soft-fp/fixunssfdi.c: Likewise.
      	* soft-fp/fixunssfsi.c: Likewise.
      	* soft-fp/fixunssfti.c: Likewise.
      	* soft-fp/fixunstfdi.c: Likewise.
      	* soft-fp/fixunstfsi.c: Likewise.
      	* soft-fp/fixunstfti.c: Likewise.
      	* soft-fp/floatdidf.c: Likewise.
      	* soft-fp/floatdisf.c: Likewise.
      	* soft-fp/floatditf.c: Likewise.
      	* soft-fp/floatsidf.c: Likewise.
      	* soft-fp/floatsisf.c: Likewise.
      	* soft-fp/floatsitf.c: Likewise.
      	* soft-fp/floattidf.c: Likewise.
      	* soft-fp/floattisf.c: Likewise.
      	* soft-fp/floattitf.c: Likewise.
      	* soft-fp/floatundidf.c: Likewise.
      	* soft-fp/floatundisf.c: Likewise.
      	* soft-fp/floatunditf.c: Likewise.
      	* soft-fp/floatunsidf.c: Likewise.
      	* soft-fp/floatunsisf.c: Likewise.
      	* soft-fp/floatunsitf.c: Likewise.
      	* soft-fp/floatuntidf.c: Likewise.
      	* soft-fp/floatuntisf.c: Likewise.
      	* soft-fp/floatuntitf.c: Likewise.
      	* soft-fp/gedf2.c: Likewise.
      	* soft-fp/gesf2.c: Likewise.
      	* soft-fp/getf2.c: Likewise.
      	* soft-fp/ledf2.c: Likewise.
      	* soft-fp/lesf2.c: Likewise.
      	* soft-fp/letf2.c: Likewise.
      	* soft-fp/muldf3.c: Likewise.
      	* soft-fp/mulsf3.c: Likewise.
      	* soft-fp/multf3.c: Likewise.
      	* soft-fp/negdf2.c: Likewise.
      	* soft-fp/negsf2.c: Likewise.
      	* soft-fp/negtf2.c: Likewise.
      	* soft-fp/op-1.h: Likewise.
      	* soft-fp/op-2.h: Likewise.
      	* soft-fp/op-4.h: Likewise.
      	* soft-fp/op-8.h: Likewise.
      	* soft-fp/op-common.h: Likewise.
      	* soft-fp/quad.h: Likewise.
      	* soft-fp/single.h: Likewise.
      	* soft-fp/soft-fp.h: Likewise.
      	* soft-fp/subdf3.c: Likewise.
      	* soft-fp/subsf3.c: Likewise.
      	* soft-fp/subtf3.c: Likewise.
      	* soft-fp/truncdfsf2.c: Likewise.
      	* soft-fp/trunctfdf2.c: Likewise.
      	* soft-fp/trunctfsf2.c: Likewise.
      	* soft-fp/trunctfxf2.c: Likewise.
      	* soft-fp/unorddf2.c: Likewise.
      	* soft-fp/unordsf2.c: Likewise.
      	* soft-fp/unordtf2.c: Likewise.
      
      From-SVN: r204489
      9954c743
  24. Jun 21, 2013
    • Joseph Myers's avatar
      re PR other/53317 (Conversion from __int128 to __float128) · fa1e55b0
      Joseph Myers authored
      	PR other/53317
      
      gcc/testsuite:
      	* gcc.dg/torture/fp-int-convert-float128-timode-2.c: New test.
      
      libgcc:
      	* soft-fp/adddf3.c: Update from glibc.
      	* soft-fp/addsf3.c: Likewise.
      	* soft-fp/addtf3.c: Likewise.
      	* soft-fp/divdf3.c: Likewise.
      	* soft-fp/divsf3.c: Likewise.
      	* soft-fp/divtf3.c: Likewise.
      	* soft-fp/double.h: Likewise.
      	* soft-fp/eqdf2.c: Likewise.
      	* soft-fp/eqsf2.c: Likewise.
      	* soft-fp/eqtf2.c: Likewise.
      	* soft-fp/extenddftf2.c: Likewise.
      	* soft-fp/extended.h: Likewise.
      	* soft-fp/extendsfdf2.c: Likewise.
      	* soft-fp/extendsftf2.c: Likewise.
      	* soft-fp/fixdfdi.c: Likewise.
      	* soft-fp/fixdfsi.c: Likewise.
      	* soft-fp/fixsfdi.c: Likewise.
      	* soft-fp/fixsfsi.c: Likewise.
      	* soft-fp/fixtfdi.c: Likewise.
      	* soft-fp/fixtfsi.c: Likewise.
      	* soft-fp/fixunsdfdi.c: Likewise.
      	* soft-fp/fixunsdfsi.c: Likewise.
      	* soft-fp/fixunssfdi.c: Likewise.
      	* soft-fp/fixunssfsi.c: Likewise.
      	* soft-fp/fixunstfdi.c: Likewise.
      	* soft-fp/fixunstfsi.c: Likewise.
      	* soft-fp/floatdidf.c: Likewise.
      	* soft-fp/floatdisf.c: Likewise.
      	* soft-fp/floatditf.c: Likewise.
      	* soft-fp/floatsidf.c: Likewise.
      	* soft-fp/floatsisf.c: Likewise.
      	* soft-fp/floatsitf.c: Likewise.
      	* soft-fp/floatundidf.c: Likewise.
      	* soft-fp/floatundisf.c: Likewise.
      	* soft-fp/floatunditf.c: Likewise.
      	* soft-fp/floatunsidf.c: Likewise.
      	* soft-fp/floatunsisf.c: Likewise.
      	* soft-fp/floatunsitf.c: Likewise.
      	* soft-fp/gedf2.c: Likewise.
      	* soft-fp/gesf2.c: Likewise.
      	* soft-fp/getf2.c: Likewise.
      	* soft-fp/ledf2.c: Likewise.
      	* soft-fp/lesf2.c: Likewise.
      	* soft-fp/letf2.c: Likewise.
      	* soft-fp/muldf3.c: Likewise.
      	* soft-fp/mulsf3.c: Likewise.
      	* soft-fp/multf3.c: Likewise.
      	* soft-fp/negdf2.c: Likewise.
      	* soft-fp/negsf2.c: Likewise.
      	* soft-fp/negtf2.c: Likewise.
      	* soft-fp/op-1.h: Likewise.
      	* soft-fp/op-2.h: Likewise.
      	* soft-fp/op-4.h: Likewise.
      	* soft-fp/op-8.h: Likewise.
      	* soft-fp/op-common.h: Likewise.
      	* soft-fp/quad.h: Likewise.
      	* soft-fp/single.h: Likewise.
      	* soft-fp/soft-fp.h: Likewise.
      	* soft-fp/subdf3.c: Likewise.
      	* soft-fp/subsf3.c: Likewise.
      	* soft-fp/subtf3.c: Likewise.
      	* soft-fp/truncdfsf2.c: Likewise.
      	* soft-fp/trunctfdf2.c: Likewise.
      	* soft-fp/trunctfsf2.c: Likewise.
      	* soft-fp/unorddf2.c: Likewise.
      	* soft-fp/unordsf2.c: Likewise.
      	* soft-fp/unordtf2.c: Likewise.
      	* config/aarch64/sfp-machine.h (_FP_QNANNEGATEDP): Define to 0.
      	* config/arm/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
      	* config/c6x/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
      	* config/i386/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
      	* config/ia64/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
      	* config/lm32/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
      	* config/moxie/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
      	* config/rs6000/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
      	* config/score/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
      	* config/tilegx/sfp-machine32.h (_FP_QNANNEGATEDP): Likewise.
      	* config/tilegx/sfp-machine64.h (_FP_QNANNEGATEDP): Likewise.
      	* config/tilepro/sfp-machine.h (_FP_QNANNEGATEDP): Likewise.
      
      From-SVN: r200318
      fa1e55b0
  25. Nov 15, 2012
  26. Mar 01, 2012
  27. Aug 05, 2011
    • Rainer Orth's avatar
      soft-fp: Move to ../libgcc. · aca0b0b3
      Rainer Orth authored
      	gcc:
      	* config/soft-fp: Move to ../libgcc.
      	* Makefile.in (SFP_MACHINE): Remove.
      	(libgcc-support): Remove $(SFP_MACHINE) dependency.
      	* config/arm/sfp-machine.h: Move to ../libgcc/config/arm.
      	* config/arm/t-arm-softfp: Move to
      	../libgcc/config/arm/t-softfp.
      	* config/c6x/sfp-machine.h: Move to ../libgcc/config/c6x.
      	* config/c6x/t-c6x-softfp: Remove.
      	* config/i386/sfp-machine.h: Move to ../libgcc/config/i386.
      	* config/i386/t-fprules-softfp: Move to
      	../libgcc/config/t-softfp-tf.
      	* config/ia64/sfp-machine.h: Move to ../libgcc/config/ia64.
      	* config/ia64/t-fprules-softfp: Remove.
      	* config/lm32/sfp-machine.h: Move to ../libgcc/config/lm32.
      	* config/lm32/t-fprules-softfp: Remove.
      	* config/moxie/sfp-machine.h: Remove.
      	* config/moxie/t-moxie-softfp: Remove.
      	* config/rs6000/darwin-ldouble-format: Move to
      	../libgcc/config/rs6000/ibm-ldouble-format.
      	* config/rs6000/darwin-ldouble.c: Move to
      	../libgcc/config/rs6000/ibm-ldouble.c
      	* config/rs6000/libgcc-ppc-glibc.ver: Move to ../libgcc/config/rs6000.
      	* config/rs6000/libgcc-ppc64.ver: Likewise.
      	* config/rs6000/sfp-machine.h: Likewise.
      	* config/rs6000/t-aix43 (SHLIB_MAPFILES): Remove
      	$(srcdir)/config/rs6000/libgcc-ppc64.ver.
      	(LIB2FUNCS_EXTRA): Remove.
      	(TARGET_LIBGCC2_CFLAGS): Remove.
      	* config/rs6000/t-aix52: Likewise
      	* config/rs6000/t-darwin (LIB2FUNCS_EXTRA): Remove
      	$(srcdir)/config/rs6000/darwin-ldouble.c.
      	(SHLIB_MAPFILES): Remove.
      	* config/rs6000/t-darwin64 (LIB2FUNCS_EXTRA): Remove
      	$(srcdir)/config/rs6000/darwin-ldouble.c.
      	* config/rs6000/t-fprules-softfp: Move to
      	../libgcc/config/t-softfp-sfdf.
      	* config/rs6000/t-freebsd: Move to ../libgcc/config/rs6000.
      	* config/rs6000/t-linux64 (softfp_wrap_start, softfp_wrap_end): Remove.
      	* config/rs6000/t-ppccomm (LIB2FUNCS_EXTRA): Remove
      	$(srcdir)/config/rs6000/darwin-ldouble.c.
      	* config/score/sfp-machine.h: Move to ../libgcc/config/score.
      	* config/score/t-score-softfp: Remove.
      	* config.gcc (arm*-*-linux*): Remove arm/t-arm-softfp,
      	soft-fp/t-softfp from tmake_file.
      	(arm*-*-uclinux*): Likewise.
      	(arm*-*-ecos-elf): Likewise.
      	(arm*-*-eabi*, arm*-*-symbianelf*): Likewise.
      	(arm*-*-rtems*): Likewise.
      	(arm*-*-elf): Likewise.
      	(moxie-*-elf): Remove moxie/t-moxie-softfp, soft-fp/t-softfp from
      	tmake_file.
      	(moxie-*-uclinux*): Likewise.
      	(moxie-*-rtems*): Likewise.
      	(lm32-*-elf*): Remove lm32/t-fprules-softfp, soft-fp/t-softfp from
      	tmake_file.
      	(lm32-*-rtems*): Likewise.
      	(lm32-*-uclinux*): Likewise.
      	(powerpc-*-freebsd*): Remove rs6000/t-freebsd,
      	rs6000/t-fprules-softfp, soft-fp/t-softfp from tmake_file.
      	(powerpc-*-linux*, powerpc64-*-linux*): Remove
      	rs6000/t-fprules-softfp, soft-fp/t-softfp from tmake_file.
      	(score-*-elf): Remove score/t-score-softfp, soft-fp/t-softfp from
      	tmake_file.
      	(tic6x-*-elf): Remove c6x/t-c6x-softfp, soft-fp/t-softfp from
      	tmake_file.
      	(tic6x-*-uclinux): Likewise.
      	(i[34567]86-*-darwin*, x86_64-*-darwin*): Remove i386/t-fprules-softfp,
      	soft-fp/t-softfp from tmake_file.
      	(i[34567]86-*-linux*, x86_64-*-linux*, i[34567]86-*-kfreebsd*-gnu)
      	(x86_64-*-kfreebsd*-gnu, i[34567]86-*-gnu*): Likewise.
      	(i[34567]86-*-solaris2*, x86_64-*-solaris2.1[0-9]*): Likewise.
      	(i[34567]86-*-cygwin*, i[34567]86-*-mingw*, x86_64-*-mingw*):
      	Likewise.
      	(i[34567]86-*-freebsd*, x86_64-*-freebsd*): Likewise.
      
      	libgcc:
      	* config/t-softfp: Remove.
      	* soft-fp: Moved from ../gcc/config.
      	* soft-fp/README: Remove t-softfp reference.
      	* soft-fp/t-softfp: Move to config/t-softfp.
      	(softfp_machine_header): Remove.
      	(softfp_file_list): Remove config subdir.
      	(soft-fp-objects): New variable.
      	($(soft-fp-objects)): Set INTERNAL_CFLAGS.
      	(LIB2FUNCS_EXTRA): Add to LIB2ADD instead.
      	(SFP_MACHINE, $(SFP_MACHINE)): Remove.
      	* config/t-softfp-excl: New file.
      	* config/t-softfp-sfdf: New file.
      	* config/t-softfp-tf: New file.
      	* config/no-sfp-machine.h: New file.
      	* config/arm/sfp-machine.h: New file.
      	* config/arm/t-softfp: New file.
      	* config/c6x/sfp-machine.h: New file.
      	* config/i386/32/t-fprules-softfp: Rename to ...
      	* config/i386/32/t-softfp: ... this.
      	(tifunctions, LIB2ADD): Remove.
      	(softfp_int_modes): Override.
      	* config/i386/64/t-softfp-compat (tf-functions): Remove config
      	subdir.
      	* config/i386/64/eqtf2.c: Likewise.
      	* config/i386/64/getf2.c: Likewise.
      	* config/i386/64/letf2.c: Likewise.
      	* config/ia64/sft-machine.h: New file.
      	* config/ia64/t-fprules-softfp: Rename to ...
      	* config/ia64/t-softfp: ... this.
      	* config/lm32/sfp-machine.h: New file.
      	* config/moxie/t-moxie-softfp: Remove.
      	* config/rs6000/ibm-ldouble-format: New file.
      	* config/rs6000/ibm-ldouble.c: New file.
      	* config/rs6000/libgcc-ppc-glibc.ver: New file
      	* config/rs6000/libgcc-ppc64.ver: New file
      	* config/rs6000/sfp-machine.h: New file.
      	* config/rs6000/t-freebsd: New file.
      	* config/rs6000/t-ibm-ldouble: New file.
      	* config/rs6000/t-ldbl128: Use $(srcdir) to refer to
      	libgcc-ppc-glibc.ver.
      	* config/rs6000/t-linux64: New file.
      	* config/rs6000/t-ppccomm (LIB2ADD): Add
      	$(srcdir)/config/rs6000/ibm-ldouble.c.
      	* config/rs6000/t-ppccomm-ldbl: New file.
      	* config/score/sfp-machine.h: New file.
      	* config.host (sfp_machine_header): Explain.
      	(arm*-*-linux*): Add t-softfp-sfdf, t-softfp-excl, arm/t-softfp,
      	t-softfp to tmake_file.
      	(arm*-*-uclinux*): Likewise.
      	(arm*-*-ecos-elf): Likewise.
      	(arm*-*-eabi*, arm*-*-symbianelf*): Likewise.
      	(arm*-*-rtems*): Likewise.
      	(arm*-*-elf): Likewise.
      	(ia64*-*-linux*): Replace ia64/t-fprules-softfp by ia64/t-softfp
      	in tmake_file.
      	Add t-softfp-tf, t-softfp-excl, t-softfp to tmake_file.
      	(lm32-*-elf*, lm32-*-rtems*): Add t-softfp-sfdf, t-softfp to tmake_file.
      	(lm32-*-uclinux*): Likewise.
      	(moxie-*-*): Replace moxie/t-moxie-softfp by t-softfp-sfdf,
      	t-softfp-excl, t-softfp.
      	(powerpc-*-darwin*): Add rs6000/t-ibm-ldouble to tmake_file.
      	(powerpc64-*-darwin*): Likewise.
      	(powerpc-*-freebsd*): Add t-softfp-sfdf, t-softfp-excl, t-softfp
      	to tmake_file.
      	(powerpc-*-eabisimaltivec*): Add rs6000/t-ppccomm-ldbl to
      	tmake_file.
      	(powerpc-*-eabisim*): Likewise.
      	(powerpc-*-elf*): Likewise.
      	(powerpc-*-eabialtivec*): Likewise.
      	(powerpc-xilinx-eabi*): Likewise.
      	(powerpc-*-rtems*): Likewise.
      	(powerpc-*-linux*, powerpc64-*-linux*): Add t-softfp-sfdf,
      	t-softfp-excl, t-softfp to tmake_file.
      	(powerpc-wrs-vxworks, powerpc-wrs-vxworksae): Add
      	rs6000/t-ppccomm-ldbl to tmake_file.
      	(powerpcle-*-elf*): Likewise.
      	(powerpcle-*-eabisim*): Likewise.
      	(powerpcle-*-eabi*): Likewise.
      	(rs6000-ibm-aix4.[3456789]*, powerpc-ibm-aix4.[3456789]*): Add
      	rs6000/t-ibm-ldouble to tmake_file.
      	(rs6000-ibm-aix5.1.*, powerpc-ibm-aix5.1.*): Likewise.
      	(rs6000-ibm-aix[56789].*, powerpc-ibm-aix[56789].*): Likewise.
      	(score-*-elf): Add t-softfp-sfdf, t-softfp-excl, t-softfp to tmake_file.
      	(tic6x-*-*): Likewise.
      	(i[34567]86-*-darwin*, x86_64-*-darwin*,
      	i[34567]86-*-kfreebsd*-gnu, x86_64-*-kfreebsd*-gnu,
      	i[34567]86-*-linux*, x86_64-*-linux*, i[34567]86-*-gnu*,
      	i[34567]86-*-solaris2*, x86_64-*-solaris2.1[0-9]*,
      	i[34567]86-*-cygwin*, i[34567]86-*-mingw*, x86_64-*-mingw*,
      	i[34567]86-*-freebsd*, x86_64-*-freebsd*): Add t-softfp-tf,
      	t-softfp to tmake_file.
      	* configure.ac (sfp_machine_header): Provide default if unset.
      	Substitute.
      	Link sfp-machine.h to config/$sfp_machine_header.
      	* configure: Regenerate.
      
      From-SVN: r177452
      aca0b0b3
Loading