glibc/soft-fp/soft-fp.h

355 lines
9.8 KiB
C
Raw Normal View History

/* Software floating-point emulation.
Copyright (C) 1997-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz),
David S. Miller (davem@redhat.com) and
Peter Maydell (pmaydell@chiark.greenend.org.uk).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
* soft-fp/adddf3.c: Add libgcc exception. Update FSF address. * 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/sqrtdf2.c: Likewise. * soft-fp/sqrtsf2.c: Likewise. * soft-fp/sqrttf2.c: 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.
2006-04-04 10:25:52 +02:00
In addition to the permissions in the GNU Lesser General Public
License, the Free Software Foundation gives you unlimited
permission to link the compiled version of this file into
combinations with other programs, and to distribute those
combinations without any restriction coming from the use of this
file. (The Lesser General Public License restrictions do apply in
other respects; for example, they cover modification of the file,
and distribution when not linked into a combine executable.)
The GNU C Library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef SOFT_FP_H
#define SOFT_FP_H 1
* sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.c: Moved to ... * sysdeps/sparc/dl-procinfo.c: ... here, new file. * sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h: Moved to ... * sysdeps/sparc/dl-procinfo.h: ... here, new file. (HWCAP_IMPORTANT): Include HWCAP_SPARC_V9 when [__WORDSIZE__ != 64]. * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.c: File removed. * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h: File removed. 2006-02-18 Joseph S. Myers <joseph@codesourcery.com> * soft-fp/single.h (SFtype): Define. (union _FP_UNION_S): Use it. * soft-fp/double.h (DFtype): Define. (union _FP_UNION_D): Use it. * soft-fp/extended.h (XFtype): Define. (union _FP_UNION_E): Use it. * soft-fp/quad.h (TFtype): Define. (union _FP_UNION_Q): Use it. * soft-fp/soft-fp.h: Add _LIBC conditionals. (SI_BITS, DI_BITS): Define. * soft-fp/op-common.h (_FP_DECL): Add __attribute__((unused)) for X##_c. (_FP_CMP_EQ): Use parentheses for && inside ||. (_FP_TO_INT): Use statement expressions in conditional controlling constant shift. (_FP_FROM_INT): Likewise. Take unsigned type as argument. * soft-fp/op-2.h (_FP_FRAC_SLL_2, _FP_FRAC_SRL_2, _FP_FRAC_SRST_2, _FP_FRAC_SRS_2, _FP_FRAC_ASSEMBLE_2): Use statement expressions in conditional controlling possibly constant shift. (_FP_FRAC_SRST_2, _FP_FRAC_SRS_2): Avoid left shift by exactly _FP_W_TYPE_SIZE. (_FP_FRAC_GT_2, _FP_FRAC_GE_2): Use parentheses for && inside ||. * soft-fp/op-4.h (_FP_FRAC_SRST_4): Avoid left shift by exactly _FP_W_TYPE_SIZE. (__FP_FRAC_ADD_3, __FP_FRAC_ADD_4, __FP_FRAC_SUB_3, __FP_FRAC_SUB_4): Use _FP_W_TYPE for carry flags. * soft-fp/op-8.h (_FP_FRAC_SRS_8): Avoid left shift by exactly _FP_W_TYPE_SIZE. * soft-fp/floatdidf.c: Pass unsigned type and macro for type size. * 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/fixdfdi.c: Pass macro for type size. * 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. * sysdeps/alpha/soft-fp/ots_cvtqux.c: Pass unsigned type. * sysdeps/alpha/soft-fp/ots_cvtqx.c: Likewise. * sysdeps/powerpc/soft-fp/q_itoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_lltoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_ulltoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_utoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Likewise. * soft-fp/adddf3.c: Use typedefs for argument and return types. * 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/eqdf2.c: Likewise. * soft-fp/eqsf2.c: Likewise. * soft-fp/eqtf2.c: Likewise. * soft-fp/extenddftf2.c: 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/sqrtdf2.c: Likewise. * soft-fp/sqrtsf2.c: Likewise. * soft-fp/sqrttf2.c: 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. 2006-02-09 Joseph S. Myers <joseph@codesourcery.com> * soft-fp/op-common.h (_FP_UNPACK_SEMIRAW): Define. (_FP_OVERFLOW_SEMIRAW): Likewise. (_FP_CHECK_SIGNAN_SEMIRAW): Likewise. (_FP_CHOOSENAN_SEMIRAW): Likewise. (_FP_EXP_NORMAL): Likewise. (_FP_PACK_SEMIRAW): Likewise. (_FP_ADD_INTERNAL): Rewrite to operate on semi-raw value. (_FP_SUB): Likewise. (_FP_TO_INT): Rewrite to operate on raw values. Don't set INVALID exception for conversions where most negative representable integer is correct truncated value, but do set INEXACT for such conversions where appropriate. Don't always left-shift for converting to a wider integer. (_FP_FROM_INT): Rewrite to yield raw value. Correct shift for integers with one more bits than (mantissa + guard) bits for the floating point format. Don't use __FP_FRAC_SRS_1 for shifting integers that may be wider than _FP_W_TYPE_SIZE. (FP_CONV): Don't define. (FP_EXTEND): Define. (FP_TRUNC): Likewise. * soft-fp/op-1.h (_FP_FRAC_SRST_1, __FP_FRAC_SRST_1): Define. (_FP_FRAC_CONV_1_1): Don't define. (_FP_FRAC_COPY_1_1): Define. * soft-fp/op-2.h (_FP_FRAC_SRST_2): Define. (_FP_FRAC_CONV_1_2, _FP_FRAC_CONV_2_1): Don't define. (_FP_FRAC_COPY_1_2, _FP_FRAC_COPY_2_1): Define. * soft-fp/op-4.h (_FP_FRAC_SRST_4): Define. (_FP_FRAC_SRS_4): Define based on _FP_FRAC_SRST_4. (_FP_FRAC_CONV_1_4, _FP_FRAC_CONV_2_4): Don't define. (_FP_FRAC_COPY_1_4, _FP_FRAC_COPY_2_4): Define. (_FP_FRAC_CONV_4_1, _FP_FRAC_CONV_4_2): Don't define. (_FP_FRAC_COPY_4_1, _FP_FRAC_COPY_4_2): Define. * soft-fp/single.h (_FP_FRACTBITS_S): Define. (_FP_FRACXBITS_S): Define in terms of _FP_FRACXBITS_S. (_FP_WFRACXBITS_S): Likewise. (_FP_QNANBIT_SH_S, _FP_IMPLBIT_SH_S): Define. (FP_UNPACK_SEMIRAW_S, FP_UNPACK_SEMIRAW_SP): Define. (FP_PACK_SEMIRAW_S, FP_PACK_SEMIRAW_SP): Define. * soft-fp/double.h (_FP_QNANBIT_SH_D, _FP_IMPLBIT_SH_D): Define. (FP_UNPACK_SEMIRAW_D, FP_UNPACK_SEMIRAW_D): Define (FP_PACK_SEMIRAW_D, FP_PACK_SEMIRAW_DP): Define. * soft-fp/extended.h (_FP_QNANBIT_SH_E, _FP_IMPLBIT_SH_E): Define. (FP_UNPACK_EP): Correct typo. (FP_UNPACK_SEMIRAW_E, FP_UNPACK_SEMIRAW_EP): Define. (FP_PACK_SEMIRAW_E, FP_PACK_SEMIRAW_EP): Define. * soft-fp/quad.h (_FP_QNANBIT_SH_Q, _FP_IMPLBIT_SH_Q): Define. (FP_UNPACK_SEMIRAW_Q, FP_UNPACK_SEMIRAW_QP): Define. (FP_PACK_SEMIRAW_Q, FP_PACK_SEMIRAW_QP): Define. * soft-fp/fixdfdi.c: Use unsigned type for result of conversion. * 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. * sysdeps/alpha/soft-fp/ots_cvtxq.c: Likewise. * sysdeps/alpha/soft-fp/ots_nintxq.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoi.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoll.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoi.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise. * soft-fp/adddf3.c: Update for changed soft-fp interfaces. * soft-fp/addsf3.c: Likewise. * soft-fp/addtf3.c: Likewise. * soft-fp/extenddftf2.c: 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/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. * sysdeps/alpha/soft-fp/ots_add.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtqux.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtqx.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvttx.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtxq.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtxt.c: Likewise. * sysdeps/alpha/soft-fp/ots_nintxq.c: Likewise. * sysdeps/alpha/soft-fp/ots_sub.c: Likewise. * sysdeps/powerpc/soft-fp/q_add.c: Likewise. * sysdeps/powerpc/soft-fp/q_dtoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_itoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_lltoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtod.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoi.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoll.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtos.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtou.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoull.c: Likewise. * sysdeps/powerpc/soft-fp/q_stoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_sub.c: Likewise. * sysdeps/powerpc/soft-fp/q_ulltoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_utoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_add.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_dtoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtod.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoi.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtos.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtou.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoull.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_stoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_sub.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_add.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_dtoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtod.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtos.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_stoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_sub.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Likewise.
2006-02-25 02:29:59 +01:00
#ifdef _LIBC
2013-10-12 16:15:30 +02:00
# include <sfp-machine.h>
#elif defined __KERNEL__
2015-03-07 01:59:56 +01:00
/* The Linux kernel uses asm/ names for architecture-specific
files. */
# include <asm/sfp-machine.h>
* sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.c: Moved to ... * sysdeps/sparc/dl-procinfo.c: ... here, new file. * sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h: Moved to ... * sysdeps/sparc/dl-procinfo.h: ... here, new file. (HWCAP_IMPORTANT): Include HWCAP_SPARC_V9 when [__WORDSIZE__ != 64]. * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.c: File removed. * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h: File removed. 2006-02-18 Joseph S. Myers <joseph@codesourcery.com> * soft-fp/single.h (SFtype): Define. (union _FP_UNION_S): Use it. * soft-fp/double.h (DFtype): Define. (union _FP_UNION_D): Use it. * soft-fp/extended.h (XFtype): Define. (union _FP_UNION_E): Use it. * soft-fp/quad.h (TFtype): Define. (union _FP_UNION_Q): Use it. * soft-fp/soft-fp.h: Add _LIBC conditionals. (SI_BITS, DI_BITS): Define. * soft-fp/op-common.h (_FP_DECL): Add __attribute__((unused)) for X##_c. (_FP_CMP_EQ): Use parentheses for && inside ||. (_FP_TO_INT): Use statement expressions in conditional controlling constant shift. (_FP_FROM_INT): Likewise. Take unsigned type as argument. * soft-fp/op-2.h (_FP_FRAC_SLL_2, _FP_FRAC_SRL_2, _FP_FRAC_SRST_2, _FP_FRAC_SRS_2, _FP_FRAC_ASSEMBLE_2): Use statement expressions in conditional controlling possibly constant shift. (_FP_FRAC_SRST_2, _FP_FRAC_SRS_2): Avoid left shift by exactly _FP_W_TYPE_SIZE. (_FP_FRAC_GT_2, _FP_FRAC_GE_2): Use parentheses for && inside ||. * soft-fp/op-4.h (_FP_FRAC_SRST_4): Avoid left shift by exactly _FP_W_TYPE_SIZE. (__FP_FRAC_ADD_3, __FP_FRAC_ADD_4, __FP_FRAC_SUB_3, __FP_FRAC_SUB_4): Use _FP_W_TYPE for carry flags. * soft-fp/op-8.h (_FP_FRAC_SRS_8): Avoid left shift by exactly _FP_W_TYPE_SIZE. * soft-fp/floatdidf.c: Pass unsigned type and macro for type size. * 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/fixdfdi.c: Pass macro for type size. * 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. * sysdeps/alpha/soft-fp/ots_cvtqux.c: Pass unsigned type. * sysdeps/alpha/soft-fp/ots_cvtqx.c: Likewise. * sysdeps/powerpc/soft-fp/q_itoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_lltoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_ulltoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_utoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Likewise. * soft-fp/adddf3.c: Use typedefs for argument and return types. * 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/eqdf2.c: Likewise. * soft-fp/eqsf2.c: Likewise. * soft-fp/eqtf2.c: Likewise. * soft-fp/extenddftf2.c: 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/sqrtdf2.c: Likewise. * soft-fp/sqrtsf2.c: Likewise. * soft-fp/sqrttf2.c: 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. 2006-02-09 Joseph S. Myers <joseph@codesourcery.com> * soft-fp/op-common.h (_FP_UNPACK_SEMIRAW): Define. (_FP_OVERFLOW_SEMIRAW): Likewise. (_FP_CHECK_SIGNAN_SEMIRAW): Likewise. (_FP_CHOOSENAN_SEMIRAW): Likewise. (_FP_EXP_NORMAL): Likewise. (_FP_PACK_SEMIRAW): Likewise. (_FP_ADD_INTERNAL): Rewrite to operate on semi-raw value. (_FP_SUB): Likewise. (_FP_TO_INT): Rewrite to operate on raw values. Don't set INVALID exception for conversions where most negative representable integer is correct truncated value, but do set INEXACT for such conversions where appropriate. Don't always left-shift for converting to a wider integer. (_FP_FROM_INT): Rewrite to yield raw value. Correct shift for integers with one more bits than (mantissa + guard) bits for the floating point format. Don't use __FP_FRAC_SRS_1 for shifting integers that may be wider than _FP_W_TYPE_SIZE. (FP_CONV): Don't define. (FP_EXTEND): Define. (FP_TRUNC): Likewise. * soft-fp/op-1.h (_FP_FRAC_SRST_1, __FP_FRAC_SRST_1): Define. (_FP_FRAC_CONV_1_1): Don't define. (_FP_FRAC_COPY_1_1): Define. * soft-fp/op-2.h (_FP_FRAC_SRST_2): Define. (_FP_FRAC_CONV_1_2, _FP_FRAC_CONV_2_1): Don't define. (_FP_FRAC_COPY_1_2, _FP_FRAC_COPY_2_1): Define. * soft-fp/op-4.h (_FP_FRAC_SRST_4): Define. (_FP_FRAC_SRS_4): Define based on _FP_FRAC_SRST_4. (_FP_FRAC_CONV_1_4, _FP_FRAC_CONV_2_4): Don't define. (_FP_FRAC_COPY_1_4, _FP_FRAC_COPY_2_4): Define. (_FP_FRAC_CONV_4_1, _FP_FRAC_CONV_4_2): Don't define. (_FP_FRAC_COPY_4_1, _FP_FRAC_COPY_4_2): Define. * soft-fp/single.h (_FP_FRACTBITS_S): Define. (_FP_FRACXBITS_S): Define in terms of _FP_FRACXBITS_S. (_FP_WFRACXBITS_S): Likewise. (_FP_QNANBIT_SH_S, _FP_IMPLBIT_SH_S): Define. (FP_UNPACK_SEMIRAW_S, FP_UNPACK_SEMIRAW_SP): Define. (FP_PACK_SEMIRAW_S, FP_PACK_SEMIRAW_SP): Define. * soft-fp/double.h (_FP_QNANBIT_SH_D, _FP_IMPLBIT_SH_D): Define. (FP_UNPACK_SEMIRAW_D, FP_UNPACK_SEMIRAW_D): Define (FP_PACK_SEMIRAW_D, FP_PACK_SEMIRAW_DP): Define. * soft-fp/extended.h (_FP_QNANBIT_SH_E, _FP_IMPLBIT_SH_E): Define. (FP_UNPACK_EP): Correct typo. (FP_UNPACK_SEMIRAW_E, FP_UNPACK_SEMIRAW_EP): Define. (FP_PACK_SEMIRAW_E, FP_PACK_SEMIRAW_EP): Define. * soft-fp/quad.h (_FP_QNANBIT_SH_Q, _FP_IMPLBIT_SH_Q): Define. (FP_UNPACK_SEMIRAW_Q, FP_UNPACK_SEMIRAW_QP): Define. (FP_PACK_SEMIRAW_Q, FP_PACK_SEMIRAW_QP): Define. * soft-fp/fixdfdi.c: Use unsigned type for result of conversion. * 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. * sysdeps/alpha/soft-fp/ots_cvtxq.c: Likewise. * sysdeps/alpha/soft-fp/ots_nintxq.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoi.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoll.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoi.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise. * soft-fp/adddf3.c: Update for changed soft-fp interfaces. * soft-fp/addsf3.c: Likewise. * soft-fp/addtf3.c: Likewise. * soft-fp/extenddftf2.c: 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/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. * sysdeps/alpha/soft-fp/ots_add.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtqux.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtqx.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvttx.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtxq.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtxt.c: Likewise. * sysdeps/alpha/soft-fp/ots_nintxq.c: Likewise. * sysdeps/alpha/soft-fp/ots_sub.c: Likewise. * sysdeps/powerpc/soft-fp/q_add.c: Likewise. * sysdeps/powerpc/soft-fp/q_dtoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_itoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_lltoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtod.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoi.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoll.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtos.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtou.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoull.c: Likewise. * sysdeps/powerpc/soft-fp/q_stoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_sub.c: Likewise. * sysdeps/powerpc/soft-fp/q_ulltoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_utoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_add.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_dtoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtod.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoi.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtos.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtou.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoull.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_stoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_sub.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_add.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_dtoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtod.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtos.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_stoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_sub.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Likewise.
2006-02-25 02:29:59 +01:00
#else
2013-10-12 16:15:30 +02:00
# include "sfp-machine.h"
* sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.c: Moved to ... * sysdeps/sparc/dl-procinfo.c: ... here, new file. * sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h: Moved to ... * sysdeps/sparc/dl-procinfo.h: ... here, new file. (HWCAP_IMPORTANT): Include HWCAP_SPARC_V9 when [__WORDSIZE__ != 64]. * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.c: File removed. * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h: File removed. 2006-02-18 Joseph S. Myers <joseph@codesourcery.com> * soft-fp/single.h (SFtype): Define. (union _FP_UNION_S): Use it. * soft-fp/double.h (DFtype): Define. (union _FP_UNION_D): Use it. * soft-fp/extended.h (XFtype): Define. (union _FP_UNION_E): Use it. * soft-fp/quad.h (TFtype): Define. (union _FP_UNION_Q): Use it. * soft-fp/soft-fp.h: Add _LIBC conditionals. (SI_BITS, DI_BITS): Define. * soft-fp/op-common.h (_FP_DECL): Add __attribute__((unused)) for X##_c. (_FP_CMP_EQ): Use parentheses for && inside ||. (_FP_TO_INT): Use statement expressions in conditional controlling constant shift. (_FP_FROM_INT): Likewise. Take unsigned type as argument. * soft-fp/op-2.h (_FP_FRAC_SLL_2, _FP_FRAC_SRL_2, _FP_FRAC_SRST_2, _FP_FRAC_SRS_2, _FP_FRAC_ASSEMBLE_2): Use statement expressions in conditional controlling possibly constant shift. (_FP_FRAC_SRST_2, _FP_FRAC_SRS_2): Avoid left shift by exactly _FP_W_TYPE_SIZE. (_FP_FRAC_GT_2, _FP_FRAC_GE_2): Use parentheses for && inside ||. * soft-fp/op-4.h (_FP_FRAC_SRST_4): Avoid left shift by exactly _FP_W_TYPE_SIZE. (__FP_FRAC_ADD_3, __FP_FRAC_ADD_4, __FP_FRAC_SUB_3, __FP_FRAC_SUB_4): Use _FP_W_TYPE for carry flags. * soft-fp/op-8.h (_FP_FRAC_SRS_8): Avoid left shift by exactly _FP_W_TYPE_SIZE. * soft-fp/floatdidf.c: Pass unsigned type and macro for type size. * 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/fixdfdi.c: Pass macro for type size. * 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. * sysdeps/alpha/soft-fp/ots_cvtqux.c: Pass unsigned type. * sysdeps/alpha/soft-fp/ots_cvtqx.c: Likewise. * sysdeps/powerpc/soft-fp/q_itoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_lltoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_ulltoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_utoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Likewise. * soft-fp/adddf3.c: Use typedefs for argument and return types. * 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/eqdf2.c: Likewise. * soft-fp/eqsf2.c: Likewise. * soft-fp/eqtf2.c: Likewise. * soft-fp/extenddftf2.c: 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/sqrtdf2.c: Likewise. * soft-fp/sqrtsf2.c: Likewise. * soft-fp/sqrttf2.c: 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. 2006-02-09 Joseph S. Myers <joseph@codesourcery.com> * soft-fp/op-common.h (_FP_UNPACK_SEMIRAW): Define. (_FP_OVERFLOW_SEMIRAW): Likewise. (_FP_CHECK_SIGNAN_SEMIRAW): Likewise. (_FP_CHOOSENAN_SEMIRAW): Likewise. (_FP_EXP_NORMAL): Likewise. (_FP_PACK_SEMIRAW): Likewise. (_FP_ADD_INTERNAL): Rewrite to operate on semi-raw value. (_FP_SUB): Likewise. (_FP_TO_INT): Rewrite to operate on raw values. Don't set INVALID exception for conversions where most negative representable integer is correct truncated value, but do set INEXACT for such conversions where appropriate. Don't always left-shift for converting to a wider integer. (_FP_FROM_INT): Rewrite to yield raw value. Correct shift for integers with one more bits than (mantissa + guard) bits for the floating point format. Don't use __FP_FRAC_SRS_1 for shifting integers that may be wider than _FP_W_TYPE_SIZE. (FP_CONV): Don't define. (FP_EXTEND): Define. (FP_TRUNC): Likewise. * soft-fp/op-1.h (_FP_FRAC_SRST_1, __FP_FRAC_SRST_1): Define. (_FP_FRAC_CONV_1_1): Don't define. (_FP_FRAC_COPY_1_1): Define. * soft-fp/op-2.h (_FP_FRAC_SRST_2): Define. (_FP_FRAC_CONV_1_2, _FP_FRAC_CONV_2_1): Don't define. (_FP_FRAC_COPY_1_2, _FP_FRAC_COPY_2_1): Define. * soft-fp/op-4.h (_FP_FRAC_SRST_4): Define. (_FP_FRAC_SRS_4): Define based on _FP_FRAC_SRST_4. (_FP_FRAC_CONV_1_4, _FP_FRAC_CONV_2_4): Don't define. (_FP_FRAC_COPY_1_4, _FP_FRAC_COPY_2_4): Define. (_FP_FRAC_CONV_4_1, _FP_FRAC_CONV_4_2): Don't define. (_FP_FRAC_COPY_4_1, _FP_FRAC_COPY_4_2): Define. * soft-fp/single.h (_FP_FRACTBITS_S): Define. (_FP_FRACXBITS_S): Define in terms of _FP_FRACXBITS_S. (_FP_WFRACXBITS_S): Likewise. (_FP_QNANBIT_SH_S, _FP_IMPLBIT_SH_S): Define. (FP_UNPACK_SEMIRAW_S, FP_UNPACK_SEMIRAW_SP): Define. (FP_PACK_SEMIRAW_S, FP_PACK_SEMIRAW_SP): Define. * soft-fp/double.h (_FP_QNANBIT_SH_D, _FP_IMPLBIT_SH_D): Define. (FP_UNPACK_SEMIRAW_D, FP_UNPACK_SEMIRAW_D): Define (FP_PACK_SEMIRAW_D, FP_PACK_SEMIRAW_DP): Define. * soft-fp/extended.h (_FP_QNANBIT_SH_E, _FP_IMPLBIT_SH_E): Define. (FP_UNPACK_EP): Correct typo. (FP_UNPACK_SEMIRAW_E, FP_UNPACK_SEMIRAW_EP): Define. (FP_PACK_SEMIRAW_E, FP_PACK_SEMIRAW_EP): Define. * soft-fp/quad.h (_FP_QNANBIT_SH_Q, _FP_IMPLBIT_SH_Q): Define. (FP_UNPACK_SEMIRAW_Q, FP_UNPACK_SEMIRAW_QP): Define. (FP_PACK_SEMIRAW_Q, FP_PACK_SEMIRAW_QP): Define. * soft-fp/fixdfdi.c: Use unsigned type for result of conversion. * 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. * sysdeps/alpha/soft-fp/ots_cvtxq.c: Likewise. * sysdeps/alpha/soft-fp/ots_nintxq.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoi.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoll.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoi.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise. * soft-fp/adddf3.c: Update for changed soft-fp interfaces. * soft-fp/addsf3.c: Likewise. * soft-fp/addtf3.c: Likewise. * soft-fp/extenddftf2.c: 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/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. * sysdeps/alpha/soft-fp/ots_add.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtqux.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtqx.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvttx.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtxq.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtxt.c: Likewise. * sysdeps/alpha/soft-fp/ots_nintxq.c: Likewise. * sysdeps/alpha/soft-fp/ots_sub.c: Likewise. * sysdeps/powerpc/soft-fp/q_add.c: Likewise. * sysdeps/powerpc/soft-fp/q_dtoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_itoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_lltoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtod.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoi.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoll.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtos.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtou.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoull.c: Likewise. * sysdeps/powerpc/soft-fp/q_stoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_sub.c: Likewise. * sysdeps/powerpc/soft-fp/q_ulltoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_utoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_add.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_dtoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtod.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoi.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtos.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtou.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoull.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_stoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_sub.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_add.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_dtoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtod.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtos.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_stoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_sub.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Likewise.
2006-02-25 02:29:59 +01:00
#endif
/* Allow sfp-machine to have its own byte order definitions. */
#ifndef __BYTE_ORDER
2013-10-12 16:15:30 +02:00
# ifdef _LIBC
# include <endian.h>
# else
# error "endianness not defined by sfp-machine.h"
# endif
#endif
/* For unreachable default cases in switch statements over bitwise OR
of FP_CLS_* values. */
#if (defined __GNUC__ \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)))
# define _FP_UNREACHABLE __builtin_unreachable ()
#else
# define _FP_UNREACHABLE abort ()
#endif
soft-fp: Define and use _FP_STATIC_ASSERT. This patch makes soft-fp use static assertions in place of conditional calls to abort, in places where there are checks for conditions (on the types for which a macro is used) that the code is not prepared to handle. The fallback definition of _FP_STATIC_ASSERT (for kernel use only, as only relevant to compilers not supported for building glibc) is as in misc/sys/cdefs.h. This means that soft-fp only ever calls abort for _FP_UNREACHABLE calls in builds with GCC versions before 4.5. Thus, there is no need for an abort declaration or <stdlib.h> include, since the kernel code handles defining abort as a macro itself - and so this avoids any need for an __KERNEL__ condition on the abort declaration to avoid it breaking with the kernel's macro definition. That is, this patch is intended to make glibc's soft-fp code suitable for kernel use with no kernel-local changes to the soft-fp code needed at all. Tested for powerpc-nofpu that installed stripped shared libraries are unchanged by the patch. One explicit <stdlib.h> include had to be added to a file that was relying on the include from soft-fp.h. * soft-fp/soft-fp.h (_FP_STATIC_ASSERT): New macro. [_LIBC]: Do not include <stdlib.h>. [!_LIBC] (abort): Remove declaration. * soft-fp/op-2.h (_FP_MUL_MEAT_2_120_240_double): Use _FP_STATIC_ASSERT instead of conditionally calling abort. * soft-fp/op-common.h (_FP_FROM_INT): Likewise. (_FP_EXTEND_CNAN): Likewise. (FP_TRUNC): Likewise. (__FP_CLZ): Likewise. * sysdeps/powerpc/nofpu/flt-rounds.c: Include <stdlib.h>.
2015-03-12 19:43:21 +01:00
#if ((defined __GNUC__ \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) \
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L))
# define _FP_STATIC_ASSERT(expr, msg) \
_Static_assert ((expr), msg)
#else
# define _FP_STATIC_ASSERT(expr, msg) \
extern int (*__Static_assert_function (void)) \
[!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
#endif
/* In the Linux kernel, some architectures have a single function that
uses different kinds of unpacking and packing depending on the
instruction being emulated, meaning it is not readily visible to
the compiler that variables from _FP_DECL and _FP_FRAC_DECL_*
macros are only used in cases where they were initialized. */
#ifdef __KERNEL__
# define _FP_ZERO_INIT = 0
#else
# define _FP_ZERO_INIT
#endif
#define _FP_WORKBITS 3
2013-10-16 03:22:21 +02:00
#define _FP_WORK_LSB ((_FP_W_TYPE) 1 << 3)
#define _FP_WORK_ROUND ((_FP_W_TYPE) 1 << 2)
#define _FP_WORK_GUARD ((_FP_W_TYPE) 1 << 1)
#define _FP_WORK_STICKY ((_FP_W_TYPE) 1 << 0)
#ifndef FP_RND_NEAREST
# define FP_RND_NEAREST 0
# define FP_RND_ZERO 1
# define FP_RND_PINF 2
# define FP_RND_MINF 3
#endif
#ifndef FP_ROUNDMODE
# define FP_ROUNDMODE FP_RND_NEAREST
#endif
/* By default don't care about exceptions. */
#ifndef FP_EX_INVALID
2013-10-12 16:15:30 +02:00
# define FP_EX_INVALID 0
#endif
#ifndef FP_EX_OVERFLOW
2013-10-12 16:15:30 +02:00
# define FP_EX_OVERFLOW 0
#endif
#ifndef FP_EX_UNDERFLOW
2013-10-12 16:15:30 +02:00
# define FP_EX_UNDERFLOW 0
#endif
#ifndef FP_EX_DIVZERO
2013-10-12 16:15:30 +02:00
# define FP_EX_DIVZERO 0
#endif
#ifndef FP_EX_INEXACT
2013-10-12 16:15:30 +02:00
# define FP_EX_INEXACT 0
#endif
#ifndef FP_EX_DENORM
2013-10-12 16:15:30 +02:00
# define FP_EX_DENORM 0
#endif
soft-fp: Support more precise "invalid" exceptions. As previously discussed <https://sourceware.org/ml/libc-alpha/2013-10/msg00345.html>, it would be desirable to be able to use the same version of the soft-fp code in the Linux kernel as well as in glibc and libgcc (instead of an old version in the kernel that's missing ten years of bug fixes, performance improvements and new features), and to that end it is useful to add to glibc's copy features in the kernel's copy, even when they are not directly useful in glibc. To that end, this patch adds one of those features: support for more precise "invalid" exceptions describing the particular kind of invalid operation. These are relevant for powerpc emulation, and are also as described in IEEE 754-2008 as sub-exceptions. The set of sub-exceptions here is the union of those supported on powerpc and those from IEEE 754-2008 (the former adds a distinction between 0/0 and Inf/Inf; the latter adds a distinction between Inf*0 from multiplication and the same from fma). This includes sub-exceptions for sqrt, conversions to integer and comparisons that are not supported in the kernel; I see no obvious reason for these being missing from the kernel support, given that they are supported on powerpc so accurate powerpc emulation should generate them. Tested for powerpc-nofpu that the disassembly of installed shared libraries is unchanged by this patch. * soft-fp/soft-fp.h (FP_EX_INVALID_SNAN): New macro. (FP_EX_INVALID_IMZ): Likewise. (FP_EX_INVALID_IMZ_FMA): Likewise. (FP_EX_INVALID_ISI): Likewise. (FP_EX_INVALID_ZDZ): Likewise. (FP_EX_INVALID_IDI): Likewise. (FP_EX_INVALID_SQRT): Likewise. (FP_EX_INVALID_CVI): Likewise. (FP_EX_INVALID_VC): Likewise. * soft-fp/op-common.h (_FP_UNPACK_CANONICAL): Specify more precise "invalid" exceptions. (_FP_CHECK_SIGNAN_SEMIRAW): Likewise. (_FP_ADD_INTERNAL): Likewise. (_FP_MUL): Likewise. (_FP_FMA): Likewise. (_FP_DIV): Likewise. (_FP_CMP_CHECK_NAN): Likewise. (_FP_SQRT): Likewise. (_FP_TO_INT): Likewise. (FP_EXTEND): Likewise.
2014-10-09 16:59:23 +02:00
/* Sub-exceptions of "invalid". */
/* Signaling NaN operand. */
#ifndef FP_EX_INVALID_SNAN
# define FP_EX_INVALID_SNAN 0
#endif
/* Inf * 0. */
#ifndef FP_EX_INVALID_IMZ
# define FP_EX_INVALID_IMZ 0
#endif
/* fma (Inf, 0, c). */
#ifndef FP_EX_INVALID_IMZ_FMA
# define FP_EX_INVALID_IMZ_FMA 0
#endif
/* Inf - Inf. */
#ifndef FP_EX_INVALID_ISI
# define FP_EX_INVALID_ISI 0
#endif
/* 0 / 0. */
#ifndef FP_EX_INVALID_ZDZ
# define FP_EX_INVALID_ZDZ 0
#endif
/* Inf / Inf. */
#ifndef FP_EX_INVALID_IDI
# define FP_EX_INVALID_IDI 0
#endif
/* sqrt (negative). */
#ifndef FP_EX_INVALID_SQRT
# define FP_EX_INVALID_SQRT 0
#endif
/* Invalid conversion to integer. */
#ifndef FP_EX_INVALID_CVI
# define FP_EX_INVALID_CVI 0
#endif
/* Invalid comparison. */
#ifndef FP_EX_INVALID_VC
# define FP_EX_INVALID_VC 0
#endif
/* _FP_STRUCT_LAYOUT may be defined as an attribute to determine the
struct layout variant used for structures where bit-fields are used
to access specific parts of binary floating-point numbers. This is
required for systems where the default ABI uses struct layout with
differences in how consecutive bit-fields are laid out from the
default expected by soft-fp. */
#ifndef _FP_STRUCT_LAYOUT
2013-10-12 16:15:30 +02:00
# define _FP_STRUCT_LAYOUT
#endif
#ifdef _FP_DECL_EX
2013-10-12 16:15:30 +02:00
# define FP_DECL_EX \
int _fex = 0; \
_FP_DECL_EX
#else
2013-10-12 16:15:30 +02:00
# define FP_DECL_EX int _fex = 0
#endif
/* Initialize any machine-specific state used in FP_ROUNDMODE,
FP_TRAPPING_EXCEPTIONS or FP_HANDLE_EXCEPTIONS. */
#ifndef FP_INIT_ROUNDMODE
2013-10-12 16:15:30 +02:00
# define FP_INIT_ROUNDMODE do {} while (0)
#endif
soft-fp: Make extensions of subnormals from XFmode to TFmode signal underflow if traps enabled. This patch fixes a soft-fp corner case I previously noted in <https://sourceware.org/ml/libc-alpha/2013-10/msg00349.html>: when trapping on underflow is enabled, extensions of subnormals from XFmode to TFmode need to signal underflow because the result is tiny (but exact, so the underflow flag is not raised unless trapping is enabled). To avoid any excess initialization or tests for other cases of floating-point extensions, a new FP_INIT_TRAPPING_EXCEPTIONS is added that does the initialization required for this particular case (more than FP_INIT_EXCEPTIONS, less than FP_INIT_ROUNDMODE, in general), and FP_NO_EXACT_UNDERFLOW is added to stub out FP_TRAPPING_EXCEPTIONS tests for those cases of extensions where the test would be dead code, to avoid any uninitialized variable warnings. As the relevant case only applies in libgcc, not to any use of soft-fp in glibc, there is no bug report in Bugzilla and no non-default definitions of FP_INIT_TRAPPING_EXCEPTIONS are added by the patch. A testcase will be added to GCC as part of an update of soft-fp in libgcc once this patch is in libc. Tested for powerpc-nofpu that the disassembly of installed shared libraries is unchanged by this patch. Bootstrapped GCC with updated soft-fp with no regressions on x86_64-unknown-linux-gnu and verified that a test of the relevant case passes where it failed before. * soft-fp/op-common.h (FP_EXTEND): When a subnormal input produces a subnormal result, set the underflow exception if trapping on underflow is enabled. * soft-fp/soft-fp.h (FP_INIT_TRAPPING_EXCEPTIONS): New macro. (FP_INIT_EXCEPTIONS): Default to FP_INIT_TRAPPING_EXCEPTIONS. [FP_NO_EXACT_UNDERFLOW] (FP_TRAPPING_EXCEPTIONS): Undefine and redefine to 0. * soft-fp/extenddftf2.c (FP_NO_EXACT_UNDERFLOW): Define. * soft-fp/extendsfdf2.c (FP_NO_EXACT_UNDERFLOW): Likewise. * soft-fp/extendsftf2.c (FP_NO_EXACT_UNDERFLOW): Likewise. * soft-fp/extendxftf2.c (__extendxftf2): Use FP_INIT_TRAPPING_EXCEPTIONS instead of FP_INIT_ROUNDMODE.
2014-10-09 03:00:41 +02:00
/* Initialize any machine-specific state used in
FP_TRAPPING_EXCEPTIONS or FP_HANDLE_EXCEPTIONS. */
#ifndef FP_INIT_TRAPPING_EXCEPTIONS
# define FP_INIT_TRAPPING_EXCEPTIONS FP_INIT_ROUNDMODE
#endif
/* Initialize any machine-specific state used in
FP_HANDLE_EXCEPTIONS. */
#ifndef FP_INIT_EXCEPTIONS
soft-fp: Make extensions of subnormals from XFmode to TFmode signal underflow if traps enabled. This patch fixes a soft-fp corner case I previously noted in <https://sourceware.org/ml/libc-alpha/2013-10/msg00349.html>: when trapping on underflow is enabled, extensions of subnormals from XFmode to TFmode need to signal underflow because the result is tiny (but exact, so the underflow flag is not raised unless trapping is enabled). To avoid any excess initialization or tests for other cases of floating-point extensions, a new FP_INIT_TRAPPING_EXCEPTIONS is added that does the initialization required for this particular case (more than FP_INIT_EXCEPTIONS, less than FP_INIT_ROUNDMODE, in general), and FP_NO_EXACT_UNDERFLOW is added to stub out FP_TRAPPING_EXCEPTIONS tests for those cases of extensions where the test would be dead code, to avoid any uninitialized variable warnings. As the relevant case only applies in libgcc, not to any use of soft-fp in glibc, there is no bug report in Bugzilla and no non-default definitions of FP_INIT_TRAPPING_EXCEPTIONS are added by the patch. A testcase will be added to GCC as part of an update of soft-fp in libgcc once this patch is in libc. Tested for powerpc-nofpu that the disassembly of installed shared libraries is unchanged by this patch. Bootstrapped GCC with updated soft-fp with no regressions on x86_64-unknown-linux-gnu and verified that a test of the relevant case passes where it failed before. * soft-fp/op-common.h (FP_EXTEND): When a subnormal input produces a subnormal result, set the underflow exception if trapping on underflow is enabled. * soft-fp/soft-fp.h (FP_INIT_TRAPPING_EXCEPTIONS): New macro. (FP_INIT_EXCEPTIONS): Default to FP_INIT_TRAPPING_EXCEPTIONS. [FP_NO_EXACT_UNDERFLOW] (FP_TRAPPING_EXCEPTIONS): Undefine and redefine to 0. * soft-fp/extenddftf2.c (FP_NO_EXACT_UNDERFLOW): Define. * soft-fp/extendsfdf2.c (FP_NO_EXACT_UNDERFLOW): Likewise. * soft-fp/extendsftf2.c (FP_NO_EXACT_UNDERFLOW): Likewise. * soft-fp/extendxftf2.c (__extendxftf2): Use FP_INIT_TRAPPING_EXCEPTIONS instead of FP_INIT_ROUNDMODE.
2014-10-09 03:00:41 +02:00
# define FP_INIT_EXCEPTIONS FP_INIT_TRAPPING_EXCEPTIONS
#endif
#ifndef FP_HANDLE_EXCEPTIONS
2013-10-12 16:15:30 +02:00
# define FP_HANDLE_EXCEPTIONS do {} while (0)
#endif
soft-fp: Add FP_DENORM_ZERO. Continuing the addition of soft-fp features used in the Linux kernel, this patch adds soft-fp support for FP_DENORM_ZERO (flushing input subnormal operands to zero of the same sign). There are some differences from the kernel version. In the kernel, the "inexact" exception is set when flushing to zero. This does not appear to match the documented semantics for either of the architectures (alpha and sh) for which the kernel uses FP_DENORM_ZERO, so this patch does not set "inexact" in this case. More operations now use raw or semi-raw unpacking for optimization than did in the ten-year-old soft-fp version in the kernel, so checks of FP_DENORM_ZERO are inserted in those operations. They are also inserted for comparisons (which already used raw unpacking in the old version) as I believe that's the correct thing to do when input subnormals are flushed to zero. They are *not* inserted for _FP_NEG. (If any processors do flush input subnormals to zero for negation, or otherwise vary from the rules implemented when FP_DENORM_ZERO is set, further macros for sfp-machine.h to control this may need to be added.) Although the addition for comparisons will cause FP_EX_DENORM to be set in this case, it still won't be set for comparisons involving subnormals when not flushed to zero. It's quite possible that accurate emulation of processors that have such an exception for subnormal operands will require further changes relating to when FP_EX_DENORM is set (in general, the support for things defined by IEEE should be considered more reliable and mature than the support for things outside the scope of IEEE floating point). Although some processors also have a mode for abrupt underflow - producing zeroes instead of output subnormals - there is no such mode in the kernel's soft-fp, so no such mode is added to glibc's soft-fp (although it could be if someone wanted to emulate such processor support). Tested for powerpc-nofpu that the disassembly of installed shared libraries is unchanged by this patch. * soft-fp/soft-fp.h (FP_DENORM_ZERO): New macro. * soft-fp/op-common.h (_FP_UNPACK_CANONICAL): Check FP_DENORM_ZERO. (_FP_CHECK_FLUSH_ZERO): New macro. (_FP_ADD_INTERNAL): Call _FP_CHECK_FLUSH_ZERO. (_FP_CMP): Likewise. (_FP_CMP_EQ): Likewise. (_FP_TO_INT): Do not set inexact for subnormal arguments if FP_DENORM_ZERO. (FP_EXTEND): Call _FP_CHECK_FLUSH_ZERO. (FP_TRUNC): Likewise.
2014-10-09 03:09:22 +02:00
/* Whether to flush subnormal inputs to zero with the same sign. */
#ifndef FP_DENORM_ZERO
# define FP_DENORM_ZERO 0
#endif
#ifndef FP_INHIBIT_RESULTS
/* By default we write the results always.
sfp-machine may override this and e.g.
check if some exceptions are unmasked
and inhibit it in such a case. */
2013-10-12 16:15:30 +02:00
# define FP_INHIBIT_RESULTS 0
#endif
#define FP_SET_EXCEPTION(ex) \
_fex |= (ex)
#define FP_CUR_EXCEPTIONS \
(_fex)
#ifndef FP_TRAPPING_EXCEPTIONS
2013-10-12 16:15:30 +02:00
# define FP_TRAPPING_EXCEPTIONS 0
#endif
2013-10-12 14:20:12 +02:00
/* A file using soft-fp may define FP_NO_EXCEPTIONS before including
soft-fp.h to indicate that, although a macro used there could raise
exceptions, or do rounding and potentially thereby raise
exceptions, for some arguments, for the particular arguments used
in that file no exceptions or rounding can occur. Such a file
should not itself use macros relating to handling exceptions and
rounding modes; this is only for indirect uses (in particular, in
_FP_FROM_INT and the macros it calls). */
#ifdef FP_NO_EXCEPTIONS
2013-10-12 16:15:30 +02:00
# undef FP_SET_EXCEPTION
# define FP_SET_EXCEPTION(ex) do {} while (0)
2013-10-12 14:20:12 +02:00
2013-10-12 16:15:30 +02:00
# undef FP_CUR_EXCEPTIONS
# define FP_CUR_EXCEPTIONS 0
2013-10-12 14:20:12 +02:00
2013-10-12 16:15:30 +02:00
# undef FP_TRAPPING_EXCEPTIONS
# define FP_TRAPPING_EXCEPTIONS 0
2013-10-12 14:20:12 +02:00
2013-10-12 16:15:30 +02:00
# undef FP_ROUNDMODE
# define FP_ROUNDMODE FP_RND_ZERO
2013-10-12 14:20:12 +02:00
soft-fp: support after-rounding tininess detection. IEEE 754-2008 defines two ways in which tiny results can be detected, "before rounding" (based on the infinite-precision result) and "after rounding" (based on the result when rounded to normal precision as if the exponent range were unbounded). All binary operations on an architecture must use the same choice of how tininess is detected. soft-fp has so far implemented only before-rounding tininess detection. This patch adds support for after-rounding tininess detection. A new macro _FP_TININESS_AFTER_ROUNDING is added that sfp-machine.h must define (soft-fp is meant to be self-contained so the existing tininess.h files aren't used here, though the information going in sfp-machine.h has been taken from them). The soft-fp macros dealing with raising underflow exceptions then handle the cases where the choice matters specially, rounding a copy of the input to the appropriate precision to see if a value that's tiny before rounding isn't tiny after rounding. Tested for mips64 using GCC trunk (which now uses soft-fp on MIPS, so supporting exceptions and rounding modes for long double where not previously supported - this is the immediate motivation for doing this patch now) together with (a) a patch to sysdeps/mips/math-tests.h to enable exceptions / rounding modes tests for long double for GCC 4.9 and later, and (b) corresponding changes applied to libgcc's soft-fp and sfp-machine.h files. In the libgcc context this is also tested on x86_64 (also an after-rounding architecture) with testcases for __float128 that I intend to add to the GCC testsuite when updating soft-fp there. (To be clear: this patch does not fix any glibc bugs that were user-visible in past releases, since after-rounding architectures didn't use soft-fp in any affected case with support for floating-point exceptions - so there is no corresponding Bugzilla bug. Rather, it works together with the GCC changes to use soft-fp on MIPS to allow previously absent long double functionality to work properly, and allows soft-fp to be used in glibc on after-rounding architectures in cases where it couldn't previously be used.) * soft-fp/op-common.h (_FP_DECL): Mark exponent as possibly unused. (_FP_PACK_SEMIRAW): Determine tininess based on rounding shifted value if _FP_TININESS_AFTER_ROUNDING and unrounded value is in subnormal range. (_FP_PACK_CANONICAL): Determine tininess based on rounding to normal precision if _FP_TININESS_AFTER_ROUNDING and unrounded value has largest subnormal exponent. * soft-fp/soft-fp.h [FP_NO_EXCEPTIONS] (_FP_TININESS_AFTER_ROUNDING): Undefine and redefine to 0. * sysdeps/aarch64/soft-fp/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): New macro. * sysdeps/alpha/soft-fp/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): Likewise. * sysdeps/arm/soft-fp/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): Likewise. * sysdeps/mips/mips64/soft-fp/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): Likewise. * sysdeps/mips/soft-fp/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): Likewise. * sysdeps/powerpc/soft-fp/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): Likewise. * sysdeps/sh/soft-fp/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): Likewise. * sysdeps/sparc/sparc32/soft-fp/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): Likewise. * sysdeps/sparc/sparc64/soft-fp/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): Likewise. * sysdeps/tile/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): Likewise.
2014-02-12 19:27:12 +01:00
# undef _FP_TININESS_AFTER_ROUNDING
# define _FP_TININESS_AFTER_ROUNDING 0
2013-10-12 14:20:12 +02:00
#endif
soft-fp: Make extensions of subnormals from XFmode to TFmode signal underflow if traps enabled. This patch fixes a soft-fp corner case I previously noted in <https://sourceware.org/ml/libc-alpha/2013-10/msg00349.html>: when trapping on underflow is enabled, extensions of subnormals from XFmode to TFmode need to signal underflow because the result is tiny (but exact, so the underflow flag is not raised unless trapping is enabled). To avoid any excess initialization or tests for other cases of floating-point extensions, a new FP_INIT_TRAPPING_EXCEPTIONS is added that does the initialization required for this particular case (more than FP_INIT_EXCEPTIONS, less than FP_INIT_ROUNDMODE, in general), and FP_NO_EXACT_UNDERFLOW is added to stub out FP_TRAPPING_EXCEPTIONS tests for those cases of extensions where the test would be dead code, to avoid any uninitialized variable warnings. As the relevant case only applies in libgcc, not to any use of soft-fp in glibc, there is no bug report in Bugzilla and no non-default definitions of FP_INIT_TRAPPING_EXCEPTIONS are added by the patch. A testcase will be added to GCC as part of an update of soft-fp in libgcc once this patch is in libc. Tested for powerpc-nofpu that the disassembly of installed shared libraries is unchanged by this patch. Bootstrapped GCC with updated soft-fp with no regressions on x86_64-unknown-linux-gnu and verified that a test of the relevant case passes where it failed before. * soft-fp/op-common.h (FP_EXTEND): When a subnormal input produces a subnormal result, set the underflow exception if trapping on underflow is enabled. * soft-fp/soft-fp.h (FP_INIT_TRAPPING_EXCEPTIONS): New macro. (FP_INIT_EXCEPTIONS): Default to FP_INIT_TRAPPING_EXCEPTIONS. [FP_NO_EXACT_UNDERFLOW] (FP_TRAPPING_EXCEPTIONS): Undefine and redefine to 0. * soft-fp/extenddftf2.c (FP_NO_EXACT_UNDERFLOW): Define. * soft-fp/extendsfdf2.c (FP_NO_EXACT_UNDERFLOW): Likewise. * soft-fp/extendsftf2.c (FP_NO_EXACT_UNDERFLOW): Likewise. * soft-fp/extendxftf2.c (__extendxftf2): Use FP_INIT_TRAPPING_EXCEPTIONS instead of FP_INIT_ROUNDMODE.
2014-10-09 03:00:41 +02:00
/* A file using soft-fp may define FP_NO_EXACT_UNDERFLOW before
including soft-fp.h to indicate that, although a macro used there
could allow for the case of exact underflow requiring the underflow
exception to be raised if traps are enabled, for the particular
arguments used in that file no exact underflow can occur. */
#ifdef FP_NO_EXACT_UNDERFLOW
# undef FP_TRAPPING_EXCEPTIONS
# define FP_TRAPPING_EXCEPTIONS 0
#endif
#define _FP_ROUND_NEAREST(wc, X) \
do \
{ \
2013-10-16 03:22:21 +02:00
if ((_FP_FRAC_LOW_##wc (X) & 15) != _FP_WORK_ROUND) \
_FP_FRAC_ADDI_##wc (X, _FP_WORK_ROUND); \
} \
while (0)
2013-10-16 03:22:21 +02:00
#define _FP_ROUND_ZERO(wc, X) (void) 0
2013-10-16 03:22:21 +02:00
#define _FP_ROUND_PINF(wc, X) \
do \
{ \
if (!X##_s && (_FP_FRAC_LOW_##wc (X) & 7)) \
_FP_FRAC_ADDI_##wc (X, _FP_WORK_LSB); \
} \
while (0)
#define _FP_ROUND_MINF(wc, X) \
do \
{ \
2013-10-16 03:22:21 +02:00
if (X##_s && (_FP_FRAC_LOW_##wc (X) & 7)) \
_FP_FRAC_ADDI_##wc (X, _FP_WORK_LSB); \
} \
while (0)
#define _FP_ROUND(wc, X) \
do \
{ \
2013-10-16 03:22:21 +02:00
if (_FP_FRAC_LOW_##wc (X) & 7) \
{ \
2013-10-16 03:22:21 +02:00
FP_SET_EXCEPTION (FP_EX_INEXACT); \
switch (FP_ROUNDMODE) \
{ \
case FP_RND_NEAREST: \
2013-10-16 03:22:21 +02:00
_FP_ROUND_NEAREST (wc, X); \
break; \
case FP_RND_ZERO: \
2013-10-16 03:22:21 +02:00
_FP_ROUND_ZERO (wc, X); \
break; \
case FP_RND_PINF: \
2013-10-16 03:22:21 +02:00
_FP_ROUND_PINF (wc, X); \
break; \
case FP_RND_MINF: \
2013-10-16 03:22:21 +02:00
_FP_ROUND_MINF (wc, X); \
break; \
} \
} \
} \
while (0)
#define FP_CLS_NORMAL 0
#define FP_CLS_ZERO 1
#define FP_CLS_INF 2
#define FP_CLS_NAN 3
2013-10-16 03:22:21 +02:00
#define _FP_CLS_COMBINE(x, y) (((x) << 2) | (y))
#include "op-1.h"
#include "op-2.h"
#include "op-4.h"
#include "op-8.h"
#include "op-common.h"
/* Sigh. Silly things longlong.h needs. */
#define UWtype _FP_W_TYPE
#define W_TYPE_SIZE _FP_W_TYPE_SIZE
2013-10-16 03:22:21 +02:00
typedef int QItype __attribute__ ((mode (QI)));
typedef int SItype __attribute__ ((mode (SI)));
typedef int DItype __attribute__ ((mode (DI)));
typedef unsigned int UQItype __attribute__ ((mode (QI)));
typedef unsigned int USItype __attribute__ ((mode (SI)));
typedef unsigned int UDItype __attribute__ ((mode (DI)));
#if _FP_W_TYPE_SIZE == 32
2013-10-16 03:22:21 +02:00
typedef unsigned int UHWtype __attribute__ ((mode (HI)));
#elif _FP_W_TYPE_SIZE == 64
typedef USItype UHWtype;
#endif
#ifndef CMPtype
2013-10-12 16:15:30 +02:00
# define CMPtype int
#endif
2013-10-16 03:22:21 +02:00
#define SI_BITS (__CHAR_BIT__ * (int) sizeof (SItype))
#define DI_BITS (__CHAR_BIT__ * (int) sizeof (DItype))
* sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.c: Moved to ... * sysdeps/sparc/dl-procinfo.c: ... here, new file. * sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h: Moved to ... * sysdeps/sparc/dl-procinfo.h: ... here, new file. (HWCAP_IMPORTANT): Include HWCAP_SPARC_V9 when [__WORDSIZE__ != 64]. * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.c: File removed. * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h: File removed. 2006-02-18 Joseph S. Myers <joseph@codesourcery.com> * soft-fp/single.h (SFtype): Define. (union _FP_UNION_S): Use it. * soft-fp/double.h (DFtype): Define. (union _FP_UNION_D): Use it. * soft-fp/extended.h (XFtype): Define. (union _FP_UNION_E): Use it. * soft-fp/quad.h (TFtype): Define. (union _FP_UNION_Q): Use it. * soft-fp/soft-fp.h: Add _LIBC conditionals. (SI_BITS, DI_BITS): Define. * soft-fp/op-common.h (_FP_DECL): Add __attribute__((unused)) for X##_c. (_FP_CMP_EQ): Use parentheses for && inside ||. (_FP_TO_INT): Use statement expressions in conditional controlling constant shift. (_FP_FROM_INT): Likewise. Take unsigned type as argument. * soft-fp/op-2.h (_FP_FRAC_SLL_2, _FP_FRAC_SRL_2, _FP_FRAC_SRST_2, _FP_FRAC_SRS_2, _FP_FRAC_ASSEMBLE_2): Use statement expressions in conditional controlling possibly constant shift. (_FP_FRAC_SRST_2, _FP_FRAC_SRS_2): Avoid left shift by exactly _FP_W_TYPE_SIZE. (_FP_FRAC_GT_2, _FP_FRAC_GE_2): Use parentheses for && inside ||. * soft-fp/op-4.h (_FP_FRAC_SRST_4): Avoid left shift by exactly _FP_W_TYPE_SIZE. (__FP_FRAC_ADD_3, __FP_FRAC_ADD_4, __FP_FRAC_SUB_3, __FP_FRAC_SUB_4): Use _FP_W_TYPE for carry flags. * soft-fp/op-8.h (_FP_FRAC_SRS_8): Avoid left shift by exactly _FP_W_TYPE_SIZE. * soft-fp/floatdidf.c: Pass unsigned type and macro for type size. * 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/fixdfdi.c: Pass macro for type size. * 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. * sysdeps/alpha/soft-fp/ots_cvtqux.c: Pass unsigned type. * sysdeps/alpha/soft-fp/ots_cvtqx.c: Likewise. * sysdeps/powerpc/soft-fp/q_itoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_lltoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_ulltoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_utoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Likewise. * soft-fp/adddf3.c: Use typedefs for argument and return types. * 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/eqdf2.c: Likewise. * soft-fp/eqsf2.c: Likewise. * soft-fp/eqtf2.c: Likewise. * soft-fp/extenddftf2.c: 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/sqrtdf2.c: Likewise. * soft-fp/sqrtsf2.c: Likewise. * soft-fp/sqrttf2.c: 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. 2006-02-09 Joseph S. Myers <joseph@codesourcery.com> * soft-fp/op-common.h (_FP_UNPACK_SEMIRAW): Define. (_FP_OVERFLOW_SEMIRAW): Likewise. (_FP_CHECK_SIGNAN_SEMIRAW): Likewise. (_FP_CHOOSENAN_SEMIRAW): Likewise. (_FP_EXP_NORMAL): Likewise. (_FP_PACK_SEMIRAW): Likewise. (_FP_ADD_INTERNAL): Rewrite to operate on semi-raw value. (_FP_SUB): Likewise. (_FP_TO_INT): Rewrite to operate on raw values. Don't set INVALID exception for conversions where most negative representable integer is correct truncated value, but do set INEXACT for such conversions where appropriate. Don't always left-shift for converting to a wider integer. (_FP_FROM_INT): Rewrite to yield raw value. Correct shift for integers with one more bits than (mantissa + guard) bits for the floating point format. Don't use __FP_FRAC_SRS_1 for shifting integers that may be wider than _FP_W_TYPE_SIZE. (FP_CONV): Don't define. (FP_EXTEND): Define. (FP_TRUNC): Likewise. * soft-fp/op-1.h (_FP_FRAC_SRST_1, __FP_FRAC_SRST_1): Define. (_FP_FRAC_CONV_1_1): Don't define. (_FP_FRAC_COPY_1_1): Define. * soft-fp/op-2.h (_FP_FRAC_SRST_2): Define. (_FP_FRAC_CONV_1_2, _FP_FRAC_CONV_2_1): Don't define. (_FP_FRAC_COPY_1_2, _FP_FRAC_COPY_2_1): Define. * soft-fp/op-4.h (_FP_FRAC_SRST_4): Define. (_FP_FRAC_SRS_4): Define based on _FP_FRAC_SRST_4. (_FP_FRAC_CONV_1_4, _FP_FRAC_CONV_2_4): Don't define. (_FP_FRAC_COPY_1_4, _FP_FRAC_COPY_2_4): Define. (_FP_FRAC_CONV_4_1, _FP_FRAC_CONV_4_2): Don't define. (_FP_FRAC_COPY_4_1, _FP_FRAC_COPY_4_2): Define. * soft-fp/single.h (_FP_FRACTBITS_S): Define. (_FP_FRACXBITS_S): Define in terms of _FP_FRACXBITS_S. (_FP_WFRACXBITS_S): Likewise. (_FP_QNANBIT_SH_S, _FP_IMPLBIT_SH_S): Define. (FP_UNPACK_SEMIRAW_S, FP_UNPACK_SEMIRAW_SP): Define. (FP_PACK_SEMIRAW_S, FP_PACK_SEMIRAW_SP): Define. * soft-fp/double.h (_FP_QNANBIT_SH_D, _FP_IMPLBIT_SH_D): Define. (FP_UNPACK_SEMIRAW_D, FP_UNPACK_SEMIRAW_D): Define (FP_PACK_SEMIRAW_D, FP_PACK_SEMIRAW_DP): Define. * soft-fp/extended.h (_FP_QNANBIT_SH_E, _FP_IMPLBIT_SH_E): Define. (FP_UNPACK_EP): Correct typo. (FP_UNPACK_SEMIRAW_E, FP_UNPACK_SEMIRAW_EP): Define. (FP_PACK_SEMIRAW_E, FP_PACK_SEMIRAW_EP): Define. * soft-fp/quad.h (_FP_QNANBIT_SH_Q, _FP_IMPLBIT_SH_Q): Define. (FP_UNPACK_SEMIRAW_Q, FP_UNPACK_SEMIRAW_QP): Define. (FP_PACK_SEMIRAW_Q, FP_PACK_SEMIRAW_QP): Define. * soft-fp/fixdfdi.c: Use unsigned type for result of conversion. * 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. * sysdeps/alpha/soft-fp/ots_cvtxq.c: Likewise. * sysdeps/alpha/soft-fp/ots_nintxq.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoi.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoll.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoi.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise. * soft-fp/adddf3.c: Update for changed soft-fp interfaces. * soft-fp/addsf3.c: Likewise. * soft-fp/addtf3.c: Likewise. * soft-fp/extenddftf2.c: 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/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. * sysdeps/alpha/soft-fp/ots_add.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtqux.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtqx.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvttx.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtxq.c: Likewise. * sysdeps/alpha/soft-fp/ots_cvtxt.c: Likewise. * sysdeps/alpha/soft-fp/ots_nintxq.c: Likewise. * sysdeps/alpha/soft-fp/ots_sub.c: Likewise. * sysdeps/powerpc/soft-fp/q_add.c: Likewise. * sysdeps/powerpc/soft-fp/q_dtoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_itoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_lltoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtod.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoi.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoll.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtos.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtou.c: Likewise. * sysdeps/powerpc/soft-fp/q_qtoull.c: Likewise. * sysdeps/powerpc/soft-fp/q_stoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_sub.c: Likewise. * sysdeps/powerpc/soft-fp/q_ulltoq.c: Likewise. * sysdeps/powerpc/soft-fp/q_utoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_add.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_dtoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtod.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoi.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtos.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtou.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_qtoull.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_stoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_sub.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Likewise. * sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_add.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_dtoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtod.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtos.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_stoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_sub.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Likewise.
2006-02-25 02:29:59 +01:00
#ifndef umul_ppmm
2013-10-12 16:15:30 +02:00
# ifdef _LIBC
# include <stdlib/longlong.h>
# else
# include "longlong.h"
# endif
#endif
#endif /* !SOFT_FP_H */