about summary refs log tree commit diff
path: root/soft-fp/op-common.h
Commit message (Collapse)AuthorAgeFilesLines
* * soft-fp/op-common.h (_FP_MUL, _FP_FMA, _FP_DIV): AddJakub Jelinek2017-01-241-0/+5
| | | | /* FALLTHRU */ comments.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-011-1/+1
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-041-1/+1
|
* soft-fp: Fix alpha kernel build problemRichard Henderson2015-05-191-3/+2
| | | | * soft-fp/op-common.h (_FP_FROM_INT): Don't write to R.
* soft-fp: Define and use _FP_STATIC_ASSERT.Joseph Myers2015-03-121-24/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>.
* soft-fp: Add _FP_UNREACHABLE.Joseph Myers2015-03-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | This patch makes soft-fp use a new macro _FP_UNREACHABLE in place of calling abort in unreachable default cases of switch statements. _FP_UNREACHABLE expands to call __builtin_unreachable for GCC 4.5 and later; the fallback to abort is thus only for kernel use. Tested for powerpc-nofpu that installed stripped shared libraries are unchanged by this patch. Also tested with the math/ tests for mips64 (in the case of fma there *was* previously an abort call generated, unlike for the other operations - one switch only deals with a subset of classes for one operand based on what could have been generated in the earlier part of fma, whereas the other switches deal with all combinations of two classes - and this is apparently too complicated for the default case to have been optimized away). * soft-fp/soft-fp.h (_FP_UNREACHABLE): New macro. * soft-fp/op-common.h (_FP_MUL): Use _FP_UNREACHABLE instead of abort. (_FP_FMA): Likewise. (_FP_DIV): Likewise.
* soft-fp: Use multiple-include guards.Joseph Myers2015-03-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | This patch makes soft-fp headers consistently use multiple-include guards, something previously done mainly only in the Linux kernel version. The guard macros aren't the same as those used in the Linux kernel, but there seems to be enough variation in such guards in Linux kernel code that hopefully this version will be acceptable there. Tested for powerpc-nofpu that installed stripped shared libraries are unchanged by this patch. * soft-fp/double.h [SOFT_FP_DOUBLE_H]: New multiple-include guard. * soft-fp/extended.h [SOFT_FP_EXTENDED_H]: Likewise. * soft-fp/op-1.h [SOFT_FP_OP_1_H]: Likewise. * soft-fp/op-2.h [SOFT_FP_OP_2_H]: Likewise. * soft-fp/op-4.h [SOFT_FP_OP_4_H]: Likewise. * soft-fp/op-8.h [SOFT_FP_OP_8_H]: Likewise. * soft-fp/op-common.h [SOFT_FP_OP_COMMON_H]: Likewise. * soft-fp/quad.h [SOFT_FP_QUAD_H]: Likewise. * soft-fp/single.h [SOFT_FP_SINGLE_H]: Likewise. * soft-fp/soft-fp.h (SOFT_FP_H): Define to 1 rather than empty. Add comment on closing #endif.
* soft-fp: Support conditional zero-initialization in declarations.Joseph Myers2015-03-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | 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. The existing copy of soft-fp in the Linux kernel uses zero-initialization to avoid warnings in this case, so while frowned upon as a warning suppression mechanism in code built for glibc it seems appropriate to have such zero-initialization conditional on __KERNEL__. This patch duly adds it, via a macro _FP_ZERO_INIT that expands to empty for non-kernel compilations. Tested for powerpc-nofpu that installed stripped shared libraries are unchanged by this patch. * soft-fp/soft-fp.h (_FP_ZERO_INIT): New macro. Define depending on [__KERNEL__]. * soft-fp/op-1.h (_FP_FRAC_DECL_1): Use _FP_ZERO_INIT. * soft-fp/op-2.h (_FP_FRAC_DECL_2): Likewise. * soft-fp/op-common.h (_FP_DECL): Likewise.
* soft-fp: Adjust call to abort for kernel use.Joseph Myers2015-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | soft-fp calls abort in various cases that the code doesn't handle, all cases that should never actually occur for any supported choice of types. Calling an abort function is not appropriate for kernel use, so the Linux kernel redefines abort as a macro in various ways in the ports using this code, typically to "return 0" or similar. One use of abort in soft-fp is inside a comma expression and doesn't work with such a macro. This patch changes it to use a statement expression. Tested for powerpc-nofpu that installed shared libraries are unchanged by this patch. (There are two classes of aborts: those to make control flow visible to the compiler, in default cases of switches over _FP_CLS_COMBINE, which could reasonably change to __builtin_unreachable for glibc but would still need to handle pre-4.5 compilers for kernel use, and those intended to detect any use of soft-fp for combinations of types the code doesn't know how to handle, which could reasonably become link failures if the calls should always be optimized away. But those are separate possible future enhancements.) * soft-fp/op-common.h (_FP_FROM_INT): Wrap call to abort in expression inside statement expression.
* soft-fp: Fix _FP_FMA when product is zero and third argument is finite (bug ↵Joseph Myers2015-02-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 17932). soft-fp's _FP_FMA fails to set the result's exponent for cases where the result of the multiplication is 0, yielding incorrect (arbitrary, depending on uninitialized values) results for those cases. This affects libm for architectures using soft-fp to implement fma. This patch adds the exponent setting and tests for this case. Tested for ARM soft-float (which uses soft-fp fma), x86_64 and x86 (to verify not introducing new libm test failures there). (This bug showed up in testing my patch to move the Linux kernel to current soft-fp. math/Makefile has "override CFLAGS += -Wno-uninitialized" which would have stopped compiler warnings from showing up this problem, although I wouldn't be surprised if removing that shows spurious warnings from this code, if the compiler fails to follow that various cases where the exponent is uninitialized don't need it initialized because the class is set to a value meaning the uninitialized exponent isn't used.) [BZ #17932] * soft-fp/op-common.h (_FP_FMA): Set exponent of result in case where multiplication results in zero and third argument is finite and nonzero. * math/auto-libm-test-in: Add more tests of fma. * math/auto-libm-test-out: Regenerated.
* soft-fp: Refine FP_EX_DENORM handling for comparisons.Joseph Myers2015-02-061-4/+45
| | | | | | | | | | | | | | | | | | | | | | In <https://sourceware.org/ml/libc-alpha/2014-09/msg00488.html>, I noted that comparisons in soft-fp did not set FP_EX_DENORM unless denormal operands were flushed to zero. This patch fixes soft-fp to check for denormal operands for comparisons and set that exception whenever FP_EX_DENORM is not zero. In particular, for the one architecture for which the Linux kernel defines FP_EX_DENORM (alpha), this corresponds to the existing logic for comparisons and so allows that logic to be replaced by a simple call to FP_CMP_D when soft-fp is updated in the kernel. Tested for powerpc (e500) that installed stripped shared libraries are unchanged by this patch. * soft-fp/op-common.h (_FP_CMP_CHECK_DENORM): New macro. (_FP_CMP_CHECK_FLUSH_ZERO): Likewise. (_FP_CMP): Use_FP_CMP_CHECK_DENORM and _FP_CMP_CHECK_FLUSH_ZERO. (_FP_CMP_EQ): Likewise. (_FP_CMP_UNORD): Use _FP_CMP_CHECK_DENORM.
* soft-fp: Support floating-point extensions without quieting sNaNs.Joseph Myers2015-02-061-4/+10
| | | | | | | | | | | | | | | | | | | | | | | One special case needed in soft-fp to replace the old version in the Linux kernel is extending from a narrower floating-point format to a wider one without quieting signaling NaNs. (This is for arch/powerpc/math-emu/lfs.c, where previously it used the old FP_CONV which didn't do anything special for NaNs, then handled packing specially for NaNs to avoid quieting at packing time, and discarded the exceptions from unpacking.) This patch accordingly refactors FP_EXTEND, creating a separate _FP_EXTEND_CNAN that offers a choice of how NaNs are handled, with FP_EXTEND reimplemented as a wrapper that provides the common case of the IEEE operation that does quiet signaling NaNs and raise exceptions for them. Tested for powerpc (e500) that installed stripped shared libraries are unchanged by this patch. * soft-fp/op-common.h (FP_EXTEND): Rename to _FP_EXTEND_CNAN with extra argument CHECK_NAN. Redefine as wrapper around _FP_EXTEND_CNAN.
* soft-fp: Use __label__ for all labels within macros.Joseph Myers2015-01-221-0/+5
| | | | | | | | | | | | | | | | | | | soft-fp has various macros containing labels and goto statements. Because label names are function-scoped, this is problematic for using the same macro more than once within a function, which some architectures do in the Linux kernel (the soft-fp version there predates the addition of any of these labels and gotos). This patch fixes this by using __label__ to make the labels local to the block with the __label__ declaration. Tested for powerpc-nofpu that installed stripped shared libraries are unchanged by this patch. * soft-fp/op-common.h (_FP_ADD_INTERNAL): Declare labels with __label__. (_FP_FMA): Likewise. (_FP_TO_INT_ROUND): Likewise. (_FP_FROM_INT): Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-021-1/+1
|
* soft-fp: Add _FP_TO_INT_ROUND.Joseph Myers2014-11-041-0/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the series of patches adding soft-fp features from the kernel version of soft-fp to glibc so that glibc's version is able to replace the old fork of soft-fp in the kernel, this patch adds the last major such feature: _FP_TO_INT_ROUND, converting a floating-point number to an integer with rounding according to the current rounding direction (as opposed to truncating towards zero, which _FP_TO_INT does). The general structure of the implementation follows that of _FP_TO_INT, but of course is more complicated. As with glibc's _FP_TO_INT it works with raw input (the kernel versions of these macros predate the conversion of _FP_TO_INT and many other macros to raw or semi-raw input). I have not tried to work out what bugs there might be in the kernel version that this might fix; it's a from-scratch implementation based on _FP_TO_INT. Tested for powerpc (soft-float) that there is no change to the installed shared libraries; also tested with the libm tests with lrint / lrintf / llrint / llrintf made to use _FP_TO_INT_ROUND, to provide some test of the functionality. As we don't have benchmarks for those functions, I haven't actually included the soft-fp versions of them, although I expect them to be faster than the existing code (given that the existing code involves adding and subtracting numbers such as 0x1p52 to achieve the desired rounding, which is not particularly efficient when the underlying floating point is software floating point). 2014-11-04 Joseph Myers <joseph@codesourcery.com> * soft-fp/op-common.h (_FP_TO_INT_ROUND): New macro. * soft-fp/double.h [_FP_W_TYPE_SIZE < 64] (FP_TO_INT_ROUND_D): New macro. [_FP_W_TYPE_SIZE >= 64] (FP_TO_INT_ROUND_D): Likewise. * soft-fp/extended.h [_FP_W_TYPE_SIZE < 64] (FP_TO_INT_ROUND_E): New macro. [_FP_W_TYPE_SIZE >= 64] (FP_TO_INT_ROUND_E): Likewise. * soft-fp/quad.h [_FP_W_TYPE_SIZE < 64] (FP_TO_INT_ROUND_Q): New macro. [_FP_W_TYPE_SIZE >= 64] (FP_TO_INT_ROUND_Q): Likewise. * soft-fp/single.h (FP_TO_INT_ROUND_S): New macro.
* soft-fp: Use parentheses around macro arguments.Joseph Myers2014-10-091-62/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleans up the soft-fp code to use parentheses around macro arguments (where possible; many macro arguments are identifiers used with ## rather than arbitrary expressions, so cannot be put in parentheses). (I'm not aware of any bugs caused by the lack of parentheses, but this is generally good practice. The patch is not exhaustive regarding internal macros where the arguments always come directly from the mantissa of a floating-point number, although probably those should be cleaned up in this regard as well.) Tested for powerpc-nofpu that the installed shared libraries are unchanged by this patch. * soft-fp/double.h [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_D): Use parentheses around macro arguments. [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_DP): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_PACK_RAW_D): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_PACK_RAW_DP): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_D): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_DP): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_D): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_DP): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_PACK_D): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_PACK_DP): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_D): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_DP): Likewise. [_FP_W_TYPE_SIZE < 64] (_FP_SQRT_MEAT_D): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_CMP_D): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_CMP_EQ_D): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_CMP_UNORD_D): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_TO_INT_D): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_FROM_INT_D): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_D): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_DP): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_PACK_RAW_D): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_PACK_RAW_DP): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_D): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_DP): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_D): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_DP): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_PACK_D): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_PACK_DP): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_D): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_DP): Likewise. [_FP_W_TYPE_SIZE >= 64] (_FP_SQRT_MEAT_D): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_CMP_D): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_CMP_EQ_D): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_CMP_UNORD_D): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_TO_INT_D): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_FROM_INT_D): Likewise. * soft-fp/extended.h [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_E): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_EP): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_E): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_EP): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_PACK_E): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_PACK_EP): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_E): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_EP): Likewise. [_FP_W_TYPE_SIZE < 64] (_FP_SQRT_MEAT_E): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_CMP_E): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_CMP_EQ_E): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_CMP_UNORD_E): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_TO_INT_E): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_FROM_INT_E): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_E): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_EP): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_E): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_EP): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_PACK_E): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_PACK_EP): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_E): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_EP): Likewise. [_FP_W_TYPE_SIZE >= 64] (_FP_SQRT_MEAT_E): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_CMP_E): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_CMP_EQ_E): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_CMP_UNORD_E): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_TO_INT_E): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_FROM_INT_E): Likewise. * soft-fp/op-1.h (_FP_FRAC_SRST_1): Likewise. (_FP_FRAC_SRS_1): Likewise. (_FP_FRAC_CLZ_1): Likewise. (_FP_MUL_MEAT_1_imm): Likewise. (_FP_MUL_MEAT_1_wide): Likewise. (_FP_MUL_MEAT_1_hard): Likewise. (_FP_SQRT_MEAT_1): Likewise. (_FP_FRAC_ASSEMBLE_1): Likewise. (_FP_FRAC_DISASSEMBLE_1): Likewise. * soft-fp/op-2.h (_FP_FRAC_CLZ_2): Likewise. (__FP_CLZ_2): Likewise. (_FP_MUL_MEAT_2_wide): Likewise. (_FP_MUL_MEAT_2_wide_3mul): Likewise. (_FP_MUL_MEAT_2_gmp): Likewise. (_FP_MUL_MEAT_2_120_240_double): Likewise. (_FP_SQRT_MEAT_2): Likewise. (_FP_FRAC_ASSEMBLE_2): Likewise. (_FP_FRAC_DISASSEMBLE_2): Likewise. * soft-fp/op-4.h (_FP_FRAC_SRS_4): Likewise. (_FP_FRAC_CLZ_4): Likewise. (_FP_MUL_MEAT_4_wide): Likewise. (_FP_MUL_MEAT_4_gmp): Likewise. (_FP_SQRT_MEAT_4): Likewise. (_FP_FRAC_ASSEMBLE_4): Likewise. (_FP_FRAC_DISASSEMBLE_4): Likewise. * soft-fp/op-common.h (_FP_CMP): Likewise. (_FP_CMP_EQ): Likewise. (_FP_CMP_UNORD): Likewise. (_FP_TO_INT): Likewise. (_FP_FROM_INT): Likewise. [!__FP_CLZ] (__FP_CLZ): Likewise. (_FP_DIV_HELP_imm): Likewise. * soft-fp/quad.h [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_Q): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_QP): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_PACK_RAW_Q): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_PACK_RAW_QP): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_Q): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_QP): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_Q): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_QP): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_PACK_Q): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_PACK_QP): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_Q): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_QP): Likewise. [_FP_W_TYPE_SIZE < 64] (_FP_SQRT_MEAT_Q): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_CMP_Q): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_CMP_EQ_Q): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_CMP_UNORD_Q): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_TO_INT_Q): Likewise. [_FP_W_TYPE_SIZE < 64] (FP_FROM_INT_Q): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_Q): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_QP): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_PACK_RAW_Q): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_PACK_RAW_QP): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_Q): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_QP): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_Q): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_QP): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_PACK_Q): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_PACK_QP): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_Q): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_QP): Likewise. [_FP_W_TYPE_SIZE >= 64] (_FP_SQRT_MEAT_Q): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_CMP_Q): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_CMP_EQ_Q): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_CMP_UNORD_Q): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_TO_INT_Q): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_FROM_INT_Q): Likewise. * soft-fp/single.h (FP_UNPACK_RAW_S): Likewise. (FP_UNPACK_RAW_SP): Likewise. (FP_PACK_RAW_S): Likewise. (FP_PACK_RAW_SP): Likewise. (FP_UNPACK_S): Likewise. (FP_UNPACK_SP): Likewise. (FP_UNPACK_SEMIRAW_S): Likewise. (FP_UNPACK_SEMIRAW_SP): Likewise. (FP_PACK_S): Likewise. (FP_PACK_SP): Likewise. (FP_PACK_SEMIRAW_S): Likewise. (FP_PACK_SEMIRAW_SP): Likewise. (_FP_SQRT_MEAT_S): Likewise. (FP_CMP_S): Likewise. (FP_CMP_EQ_S): Likewise. (FP_CMP_UNORD_S): Likewise. (FP_TO_INT_S): Likewise. (FP_FROM_INT_S): Likewise.
* soft-fp: Support rsigned == 2 in _FP_TO_INT.Joseph Myers2014-10-091-7/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the addition of soft-fp features in the Linux kernel version, this patch adds _FP_TO_INT support for rsigned == 2 (reduce overflowing results modulo 2^rsize to fit in the destination, used for alpha emulation). The kernel version is buggy; it can left shift by a negative amount when right shifting is required in an overflow case (the kernel version also has other bugs fixed long ago in glibc; at least, spurious exceptions converting to the most negative integer). This version avoids that by handling overflow (other than to 0) for rsigned == 2 along with the normal non-overflow case, which already properly determines the direction in which to shift. Tested for powerpc-nofpu. Some functions get slightly bigger and some get slightly smaller, no doubt as a result of the change to where in the macro "inexact" is raised, but I don't think those changes are significant. Also tested for powerpc-nofpu with the relevant __fix* functions changed to use rsigned == 2 (which is after all just as valid as rsigned == 1 in IEEE terms), including verifying the results and exceptions for various cases of conversions. With these seven patches, the one remaining feature to add for the soft-fp code to have all the features of the kernel version is _FP_TO_INT_ROUND. * soft-fp/op-common.h (_FP_TO_INT): Handle rsigned == 2.
* soft-fp: Support more precise "invalid" exceptions.Joseph Myers2014-10-091-81/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* soft-fp: Add FP_DENORM_ZERO.Joseph Myers2014-10-091-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* soft-fp: Fix _FP_TO_INT latent bug in overflow handling.Joseph Myers2014-10-091-2/+7
| | | | | | | | | | | | | | | | | | | | This patch fixes a latent bug in _FP_TO_INT regarding handling of arguments with maximum exponent (infinities and NaNs). If the maximum exponent is below that calculated as an overflow threshold, such values would incorrectly be treated as normal values for the purposes of the conversion. This could not occur for any of the conversions actually occurring in glibc, libgcc or the Linux kernel (the maximum exponent for float is, just, big enough to ensure overflow for unsigned __int128), but would apply if soft-fp were used for IEEE binary16. Appropriate checks are inserted to ensure that the maximum exponent is always treated as an overflowing exponent, and never as a normal one. Tested for powerpc-nofpu that the disassembly of installed shared libraries is unchanged by this patch. * soft-fp/op-common.h (_FP_TO_INT): Ensure maximum exponent is treated as invalid conversion, not as normal exponent.
* soft-fp: Refactor exception handling for comparisons.Joseph Myers2014-10-091-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch refactors how soft-fp comparisons handle setting exceptions for NaN operands, so that exceptions are set through the FP_CMP macros rather than directly in the C files calling them. The _FP_CMP* and FP_CMP* macros gain an extra argument to specify when exceptions should be set, 0 for no exception setting (I'm not sure this is actually needed - at least it's not needed for IEEE operations in glibc / libgcc, but might be relevant in some cases for kernel use), 1 for exceptions only for signaling NaNs and 2 for exceptions for all NaNs. This argument is handled through _FP_CMP_CHECK_NAN, newly called by the _FP_CMP* macros when a NaN is encountered. Calls to these macros are updated, which eliminates all the existing checking and exception setting in soft-fp *.c files in glibc. Tested for powerpc-nofpu. (The __unord* functions have no code changes; the __eq* / __ge* / __le* functions get slightly larger, but I don't think that's significant.) * soft-fp/op-common.h (_FP_CMP_CHECK_NAN): New macro. (_FP_CMP): Add extra argument EX. Call _FP_CMP_CHECK_NAN. (_FP_CMP_EQ): Likewise. (_FP_CMP_UNORD): Likewise. * soft-fp/double.h (FP_CMP_D): Add extra argument EX. (FP_CMP_EQ_D): Likewise. (FP_CMP_UNORD_D): Likewise. * soft-fp/extended.h (FP_CMP_E): Likewise. (FP_CMP_EQ_E): Likewise. (FP_CMP_UNORD_E): Likewise. * soft-fp/quad.h (FP_CMP_Q): Likewise. (FP_CMP_EQ_Q): Likewise. (FP_CMP_UNORD_Q): Likewise. * soft-fp/single.h (FP_CMP_S): Likewise. (FP_CMP_EQ_S): Likewise. (FP_CMP_UNORD_S): Likewise. * soft-fp/eqdf2.c (__eqdf2): Update call to FP_CMP_EQ_D. * soft-fp/eqsf2.c (__eqsf2): Update call to FP_CMP_EQ_S. * soft-fp/eqtf2.c (__eqtf2): Update call to FP_CMP_EQ_Q. * soft-fp/gedf2.c (__gedf2): Update call to FP_CMP_D. * soft-fp/gesf2.c (__gesf2): Update call to FP_CMP_S. * soft-fp/getf2.c (__getf2): Update call to FP_CMP_Q. * soft-fp/ledf2.c (__ledf2): Update call to FP_CMP_D. * soft-fp/lesf2.c (__lesf2): Update call to FP_CMP_S. * soft-fp/letf2.c (__letf2): Update call to FP_CMP_Q. * soft-fp/unorddf2.c (__unorddf2): Update call to FP_CMP_UNORD_D. * soft-fp/unordsf2.c (__unordsf2): Update call to FP_CMP_UNORD_S. * soft-fp/unordtf2.c (__unordtf2): Update call to FP_CMP_UNORD_Q. * sysdeps/alpha/soft-fp/ots_cmpe.c (internal_compare): Update call to FP_CMP_Q. * sysdeps/sparc/sparc32/soft-fp/q_cmp.c (_Q_cmp): Update call to FP_CMP_Q. * sysdeps/sparc/sparc32/soft-fp/q_cmpe.c (_Q_cmpe): Likewise. * sysdeps/sparc/sparc32/soft-fp/q_feq.c (_Q_feq): Update call to FP_CMP_EQ_Q. * sysdeps/sparc/sparc32/soft-fp/q_fge.c (_Q_fge): Update call to FP_CMP_Q. * sysdeps/sparc/sparc32/soft-fp/q_fgt.c (_Q_fgt): Likewise. * sysdeps/sparc/sparc32/soft-fp/q_fle.c (_Q_fle): Likewise. * sysdeps/sparc/sparc32/soft-fp/q_flt.c (_Q_flt): Likewise. * sysdeps/sparc/sparc32/soft-fp/q_fne.c (_Q_fne): Update call to FP_CMP_EQ_Q. * sysdeps/sparc/sparc64/soft-fp/qp_cmp.c (_Qp_cmp): Update call to FP_CMP_Q. * sysdeps/sparc/sparc64/soft-fp/qp_cmpe.c (_Qp_cmpe): Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_feq.c (_Qp_feq): Update call to FP_CMP_EQ_Q. * sysdeps/sparc/sparc64/soft-fp/qp_fge.c (_Qp_fge): Update call to FP_CMP_Q. * sysdeps/sparc/sparc64/soft-fp/qp_fgt.c (_Qp_fgt): Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_fle.c (_Qp_fle): Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_flt.c (_Qp_flt): Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_fne.c (_Qp_fne): Update call to FP_CMP_EQ_Q.
* soft-fp: Make extensions of subnormals from XFmode to TFmode signal ↵Joseph Myers2014-10-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* soft-fp: Fix comment formatting.Joseph Myers2014-09-171-53/+33
| | | | | | | | | | | | | | | | | This patch fixes formatting of comments in soft-fp (in particular, the normal style in glibc does not have a leading '*' on each line, and comments should start with capital letters and end with ". */"). Tested for powerpc-nofpu that the disassembly of installed shared libraries is unchanged by this patch. * soft-fp/extended.h: Fix comment formatting. * 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/soft-fp.h: Likewise.
* soft-fp: Correct _FP_TO_INT formatting.Joseph Myers2014-09-171-5/+7
| | | | | | | | | | This patch corrects some soft-fp formatting that failed to follow the GNU Coding Standards. Tested for powerpc-nofpu that the disassembly of installed shared libraries is unchanged by this patch. * soft-fp/op-common.h (_FP_TO_INT): Correct formatting.
* Rename soft-fp extended.h, op-common.h variables to avoid risk of shadowing.Joseph Myers2014-06-301-174/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In <https://sourceware.org/ml/libc-alpha/2013-06/msg00851.html>, I fixed a bug caused by multiple soft-fp macros using the same variable names, resulting in shadowing when one macro called another that used the same variable name, with an argument involving the variable in the outer macro. The fix was to rename the local variables so their names included the containing macro name, to ensure uniqueness. I noted then that this would make sense more systematically for all variables in any soft-fp macro. Since then, I've used such variable names in new soft-fp macros. This patch now converts existing macros in extended.h and op-common.h to use this convention. (op-[1248].h are intended to be converted separately.) (Name conflicts could arise for label names as well, but because those are function-scope in C any such conflict will give an immediate compile error rather than a subtle bug, so there's no need for preemptive renaming in that case.) Tested for powerpc32 (soft-float) and mips64 that this makes no change to the disassembly of installed shared libraries. * soft-fp/extended.h (FP_UNPACK_RAW_E): Rename local variables to include macro name. (FP_UNPACK_RAW_EP): Likewise. (FP_PACK_RAW_E): Likewise. (FP_PACK_RAW_EP): Likewise. * soft-fp/op-common.h (_FP_UNPACK_CANONICAL): Likewise. (_FP_ISSIGNAN): Likewise. (_FP_ADD_INTERNAL): Likewise. (_FP_FMA): Likewise. (_FP_CMP): Likewise. (_FP_SQRT): Likewise. (_FP_TO_INT): Likewise. (_FP_FROM_INT): Likewise. (FP_EXTEND): Likewise. (_FP_DIV_MEAT_N_loop): Likewise.
* soft-fp: support after-rounding tininess detection.Joseph Myers2014-02-121-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-011-1/+1
|
* soft-fp: make extensions quiet signaling NaNs (bug 16041).Joseph Myers2013-10-171-0/+1
|
* soft-fp: fix horizontal whitespace.Joseph Myers2013-10-161-449/+451
|
* soft-fp: fix vertical whitespace and indentation.Joseph Myers2013-10-151-1389/+1448
|
* soft-fp: fix preprocessor indentation.Joseph Myers2013-10-121-1/+1
|
* soft-fp: fix floating-point to integer unsigned saturation.Joseph Myers2013-10-121-1/+1
|
* soft-fp: fix negation NaN handling (bug 16034).Joseph Myers2013-10-101-3/+1
|
* soft-fp: fix typo in comment.Adam Buchbinder2013-10-091-1/+1
|
* Implement fma in soft-fp.Joseph Myers2013-07-021-0/+211
|
* Fix bad shift in soft-fp (bug 7006).Joseph Myers2013-06-211-2/+3
|
* Fix leading whitespaces.Ondrej Bilka2013-06-061-14/+14
|
* MIPS: soft-fp NaN representation correctionsMaciej W. Rozycki2013-05-161-7/+50
| | | | | | | | [BZ #15442] This adds support for the inverse interpretation of the quiet bit of IEEE 754 floating-point NaN data that some processors use. This includes in particular MIPS architecture processors; the payload used for the canonical qNaN encoding is updated accordingly so as not to interfere with the quiet bit.
* soft-fp: s/sNAN/NAN/ -- no sNaNs are ever produced.Maciej W. Rozycki2013-04-251-1/+1
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-021-1/+1
|
* soft-fp: Fix used without set warning in _FP_MUL and _FP_DIVRichard Henderson2012-12-071-2/+2
| | | | | | | | | | | | | Seen in, e.g. ports/sysdeps/alpha/soft-fp/ots_mul.c. The problem here is we have a switch on the class of X*Y, followed by a switch on the class of R. The exponent field of R really is not set by the first switch for NaN outputs, because we know it's not going to be used. The compiler is not smart enough to see through this. By pulling the exponent computation out of the NORMAL*NORMAL path, we will not be pessimizing the most common case, while still providing an arbitrary value to satisfy the compiler.
* Fix "set but not used" warnings for X##_s in soft-fp.Joseph Myers2012-12-051-2/+4
|
* Fix missing truncation UNDERFLOW.Marcus Shawcroft2012-11-131-14/+11
|
* Fix underflow generation in soft-fp.David S. Miller2012-05-301-3/+10
| | | | | | | | | | | | | * soft-fp/soft-fp.h (FP_CUR_EXCEPTIONS): Define. (FP_TRAPPING_EXCEPTIONS): Provide default implementation. * sysdeps/sparc/sparc32/soft-fp/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): Define. * sysdeps/sparc/sparc64/soft-fp/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): Define. * soft-fp/op-common.h (_FP_PACK_SEMIRAW): Signal underflow for subnormals only when inexact has been signalled or underflow exceptions are enabled. (_FP_PACK_CANONICAL): Likewise.
* Replace FSF snail mail address with URLs.Paul Eggert2012-02-091-3/+2
|
* * soft-fp/op-common.h (FP_TRUNC): Replace raising of FP_EX_INEXACT cvs/fedora-glibc-20070504T0917Jakub Jelinek2007-05-031-5/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with setting the sticky bit. * math/test-misc.c (main): Add more truncation tests. * soft-fp/floatunsidf.c (__floatunsidf): Use DFtype instead of double in the function declaration. * soft-fp/floatundidf.c (__floatundidf): Use DFtype instead of double in the function declaration. * soft-fp/floatunsisf.c (__floatunsisf): Use SFtype instead of float in the function declaration. * soft-fp/floatunsisf.c (__floatunsisf): Use SFtype instead of float in the function declaration. * soft-fp/extended.h (FP_UNPACK_RAW_E): Do not increase X##_e for denormal operands. Do not generate FP_EX_DENORM exception. (FP_UNPACK_RAW_EP): Ditto. (FP_UNPACK_SEMIRAW_E): Use FP_UNPACK_RAW_E instead of undefined _FP_UNPACK_RAW_E. (FP_UNPACK_SEMIRAW_EP): Use FP_UNPACK_RAW_EP instead of undefined _FP_UNPACK_RAW_EP. (FP_PACK_SEMIRAW_E): Use FP_PACK_RAW_E instead of undefined _FP_PACK_RAW_E. (FP_PACK_SEMIRAW_EP): Use FP_PACK_RAW_EP instead of undefined _FP_PACK_RAW_EP. * op-2.h (_FP_FRAC_COPY_2_2): Define as alias to _FP_FRAC_COPY_2. * op-4.h (_FP_FRAC_COPY_2_2): Define as alias to _FP_FRAC_COPY_4. * soft-fp/op-common.h (FP_EXTEND): Do not abort when _FP_EXPBIAS_##dfs == _FP_EXPBIAS_##sfs. Handle denormals for this case. * soft-fp/op-common.h (FP_TRUNC): Ditto. * soft-fp/op-common.h (FP_TRUNC): Replace raising of FP_EX_INEXACT with setting the sticky bit. * math/test-misc.c (main): Add more truncation tests. 2007-04-14 Uros Bizjak <ubizjak@gmail.com> * soft-fp/floatunsidf.c (__floatunsidf): Use DFtype instead of double in the function declaration. * soft-fp/floatundidf.c (__floatundidf): Use DFtype instead of double in the function declaration. * soft-fp/floatunsisf.c (__floatunsisf): Use SFtype instead of float in the function declaration. * soft-fp/floatunsisf.c (__floatunsisf): Use SFtype instead of float in the function declaration. * soft-fp/extended.h (FP_UNPACK_RAW_E): Do not increase X##_e for denormal operands. Do not generate FP_EX_DENORM exception. (FP_UNPACK_RAW_EP): Ditto. (FP_UNPACK_SEMIRAW_E): Use FP_UNPACK_RAW_E instead of undefined _FP_UNPACK_RAW_E. (FP_UNPACK_SEMIRAW_EP): Use FP_UNPACK_RAW_EP instead of undefined _FP_UNPACK_RAW_EP. (FP_PACK_SEMIRAW_E): Use FP_PACK_RAW_E instead of undefined _FP_PACK_RAW_E. (FP_PACK_SEMIRAW_EP): Use FP_PACK_RAW_EP instead of undefined _FP_PACK_RAW_EP. * op-2.h (_FP_FRAC_COPY_2_2): Define as alias to _FP_FRAC_COPY_2. * op-4.h (_FP_FRAC_COPY_2_2): Define as alias to _FP_FRAC_COPY_4. 2007-04-16 Uros Bizjak <ubizjak@gmail.com> Jakub Jelinek <jakub@redhat.com> * soft-fp/op-common.h (FP_EXTEND): Do not abort when _FP_EXPBIAS_##dfs == _FP_EXPBIAS_##sfs. Handle denormals for this case. * soft-fp/op-common.h (FP_TRUNC): Ditto. 2007-05-03 Jakub Jelinek <jakub@redhat.com>
* * math/test-misc.c (main): Add tests for rounding long double Jakub Jelinek2007-05-031-2/+5
| | | | | | | | | | | | | | | | | values close to smallest double denormalized value to double. * soft-fp/op-common.h (FP_TRUNC): Correct off-by-one error in condition for truncating to 0. Set sticky bit for such truncation. 2007-05-03 Jakub Jelinek <jakub@redhat.com> * math/test-misc.c (main): Add tests for rounding long double values close to smallest double denormalized value to double. 2007-04-30 Joseph Myers <joseph@codesourcery.com> * soft-fp/op-common.h (FP_TRUNC): Correct off-by-one error in condition for truncating to 0. Set sticky bit for such truncation.
* [BZ #2749]Jakub Jelinek2007-01-151-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * soft-fp/op-common.h (FP_TRUNC): When truncating a NaN, clear workbits in semi-raw fraction. * math/test-misc.c: Add new tests. * math/basic-test.c: Include test-skeleton.c. (TEST_TRUNC): Define. (truncdfsf_test, trunctfsf_test, trunctfdf_test): New. (main): Rename to ... (do_test): ...this. Run new tests. (TEST_FUNCTION): Define. [BZ #2749] * soft-fp/op-4.h (__FP_FRAC_SUB_3, __FP_FRAC_SUB_4): Correct borrow handling for high words. * soft-fp/op-common.h (_FP_OVERFLOW_SEMIRAW): Always set inexact and overflow for infinity. 2007-01-15 Jakub Jelinek <jakub@redhat.com> * soft-fp/op-common.h (FP_TRUNC): When truncating a NaN, clear workbits in semi-raw fraction. * math/test-misc.c: Add new tests. 2007-01-14 Steven Munroe <sjmunroe@us.ibm.com> * math/basic-test.c: Include test-skeleton.c. (TEST_TRUNC): Define. (truncdfsf_test, trunctfsf_test, trunctfdf_test): New. (main): Rename to ... (do_test): ...this. Run new tests. (TEST_FUNCTION): Define. 2006-10-05 Steven Munroe <sjmunroe@us.ibm.com> Joe Kerian <jkerian@us.us.ibm.com> [BZ #2749] * soft-fp/op-4.h (__FP_FRAC_SUB_3, __FP_FRAC_SUB_4): Correct borrow handling for high words. * soft-fp/op-common.h (_FP_OVERFLOW_SEMIRAW): Always set inexact and overflow for infinity.
* [BZ #2510, BZ #2830, BZ #3137, BZ #3313, BZ #3426, BZ #3465, BZ #3480, BZ ↵Ulrich Drepper2007-01-111-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #3483, BZ #3493, BZ #3514, BZ #3515, BZ #3664, BZ #3673, BZ #3674] 2007-01-11 Jakub Jelinek <jakub@redhat.com> * sysdeps/i386/soft-fp/sfp-machine.h: Remove. * sysdeps/x86_64/soft-fp/sfp-machine.h: Likewise. 2007-01-10 Ulrich Drepper <drepper@redhat.com> * io/fts.c: Make sure fts_cur is always valid after return from fts_read. Patch by Miloslav Trmac <mitr@redhat.com>. 2006-10-27 Richard Sandiford <richard@codesourcery.com> * elf/elf.h (R_MIPS_GLOB_DAT): Define. (R_MIPS_NUM): Bump by 1. 2007-01-03 Jakub Jelinek <jakub@redhat.com> * posix/execvp.c: Include alloca.h. (allocate_scripts_argv): Renamed to... (scripts_argv): ... this. Don't allocate buffer here nor count arguments. (execvp): Use alloca if possible. * posix/Makefile: Add rules to build and run tst-vfork3 test. * posix/tst-vfork3.c: New test. * stdlib/Makefile (tst-strtod3-ENV): Define. 2007-01-02 Ulrich Drepper <drepper@redhat.com> * posix/getconf.c: Update copyright year. * nss/getent.c: Likewise. * iconv/iconvconfig.c: Likewise. * iconv/iconv_prog.c: Likewise. * elf/ldconfig.c: Likewise. * catgets/gencat.c: Likewise. * csu/version.c: Likewise. * elf/ldd.bash.in: Likewise. * elf/sprof.c (print_version): Likewise. * locale/programs/locale.c: Likewise. * locale/programs/localedef.c: Likewise. * nscd/nscd.c (print_version): Likewise. * debug/xtrace.sh: Likewise. * malloc/memusage.sh: Likewise. * malloc/mtrace.pl: Likewise. * debug/catchsegv.sh: Likewise. 2006-12-24 Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c (sYSMALLOc): Remove some unnecessary alignment attempts. 2006-12-23 Ulrich Drepper <drepper@redhat.com> * posix/wordexp.c: Remove some unnecessary tests. 2006-12-20 SUGIOKA Toshinobu <sugioka@itonet.co.jp> * sysdeps/unix/sysv/linux/sh/bits/shm.h: New file. * nss/getXXbyYY_r.c: Include atomic.h. (INTERNAL (REENTRANT_NAME)): Write startp after start_fct, add atomic_write_barrier () in between. 2006-11-28 Jakub Jelinek <jakub@redhat.com> * elf/dl-support.c: Include dl-procinfo.h. * sysdeps/powerpc/dl-procinfo.h (PPC_PLATFORM_POWER4, PPC_PLATFORM_PPC970, PPC_PLATFORM_POWER5, PPC_PLATFORM_POWER5_PLUS, PPC_PLATFORM_POWER6, PPC_PLATFORM_CELL_BE, PPC_PLATFORM_POWER6X): Define. (_dl_string_platform): Use PPC_PLATFORM_* macros instead of hardcoded constants. * sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_platform): Use PPC_PLATFORM_* macros for array designators. 2006-11-11 Steven Munroe <sjmunroe@us.ibm.com> * sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags): Add 3 new cap names to the beginning. (_dl_powerpc_platforms): Add "power6x". * sysdeps/powerpc/dl-procinfo.h (_DL_HWCAP_FIRST): Decrease. (HWCAP_IMPORTANT): Add PPC_FEATURE_HAS_DFP. (_DL_PLATFORMS_COUNT): Increase. (_dl_string_platform): Handle power6x case. * sysdeps/powerpc/sysdep.h (PPC_FEATURE_PA6T, PPC_FEATURE_HAS_DFP, PPC_FEATURE_POWER6_EXT): Define. (PPC_FEATURE_POWER5, PPC_FEATURE_POWER5_PLUS): Correct Comment. [-2^31 .. 2^31) range. * sysdeps/unix/sysv/linux/bits/statvfs.h: Define ST_RELATIME. * sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags): Handle relatime mount option. 2006-12-13 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Include kernel-features.h. 2006-12-11 Ulrich Drepper <drepper@redhat.com> * stdlib/strtod_l.c (____STRTOF_INTERNAL): Parse thousand separators also if no non-zero digits found. * stdlib/Makefile (tests): Add tst-strtod3. [BZ #3664] * stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix test to recognize empty parsed strings. * stdlib/Makefile (tests): Add tst-strtod2. * stdlib/tst-strtod2.c: New file. [BZ #3673] * stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix exp_limit computation. * stdlib/Makefile (tests): Add tst-atof2. * stdlib/tst-atof2.c: New file. [BZ #3674] * stdlib/strtod_l.c (____STRTOF_INTERNAL): Adjust exponent value correctly if removing trailing zero of hex-float. * stdlib/Makefile (tests): Add tst-atof1. * stdlib/tst-atof1.c: New file. * misc/mntent_r.c (__hasmntopt): Check p[optlen] even when p == rest. Start searching for next comma at p rather than rest. * misc/Makefile (tests): Add tst-mntent2. * misc/tst-mntent2.c: New test. 2006-12-08 Ulrich Drepper <drepper@redhat.com> * malloc/memusage.c: Handle realloc with new size of zero and non-NULL pointer correctly. (me): Really write first record twice. (struct entry): Make format bi-arch safe. (dest): Write out more realloc statistics. * malloc/memusagestat.c (struct entry): Make format bi-arch safe. 2006-12-05 Jakub Jelinek <jakub@redhat.com> * nis/nis_subr.c (nis_getnames): Revert last change. 2006-12-03 Kaz Kojima <kkojima@rr.iij4u.or.jp> * sysdeps/unix/sysv/linux/sh/sys/io.h: Removed. 2006-11-30 H.J. Lu <hongjiu.lu@intel.com> * sysdeps/i386/i686/memcmp.S: Use jump table as the base of jump table entries. 2006-11-30 Jan Kratochvil <jan.kratochvil@redhat.com> * sysdeps/unix/sysv/linux/i386/clone.S: Provide CFI for the outermost `clone' function to ensure proper unwinding stop of gdb. * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise. 2006-12-01 Ulrich Drepper <drepper@redhat.com> * nscd/nscd.init: Remove obsolete and commented-out -S option handling. 2006-11-23 Jakub Jelinek <jakub@redhat.com> [BZ #3514] * manual/string.texi (strncmp): Fix pastos from wcscmp description. [BZ #3515] * manual/string.texi (strtok): Remove duplicate paragraph. 2006-12-01 Jan Kratochvil <jan.kratochvil@redhat.com> * sysdeps/unix/sysv/linux/x86_64/sigaction.c: Fix compatibility with libgcc not supporting `rflags' unwinding (register # >= 17). 2006-11-30 Jakub Jelinek <jakub@redhat.com> * sunrpc/svc_run.c (svc_run): Set my_pollfd to new_pollfd if realloc succeeded. 2006-11-29 Daniel Jacobowitz <dan@codesourcery.com> Jakub Jelinek <jakub@redhat.com> Jan Kratochvil <jan.kratochvil@redhat.com> * sysdeps/unix/sysv/linux/x86_64/sigaction.c (restore_rt): Add correct unwind information. * sysdeps/unix/sysv/linux/x86_64/Makefile: Provide symbols for 'restore_rt' even in the 'signal' directory. * sysdeps/unix/sysv/linux/x86_64/ucontext_i.sym: Extend the regs list. malloc crashed. Don't allocate memory unnecessarily in each loop. 2006-10-21 Jakub Jelinek <jakub@redhat.com> * resolv/mapv4v6addr.h (map_v4v6_address): Fix last change. 2006-11-20 Ulrich Drepper <drepper@redhat.com> * resolv/mapv4v6addr.h (map_v4v6_address): Optimize a bit. 2006-11-18 Bruno Haible <bruno@clisp.org> * sysdeps/unix/sysv/linux/i386/getgroups.c (__getgroups): Invoke __sysconf only after having tried to call getgroups32. 2006-11-19 Ulrich Drepper <drepper@redhat.com> * nss/nss_files/files-hosts.c (LINE_PARSER): Support IPv6-style addresses for IPv4 queries if they can be mapped. 2006-11-16 Jakub Jelinek <jakub@redhat.com> * sysdeps/x86_64/fpu/s_copysignf.S (__copysignf): Switch to .text. * sysdeps/x86_64/fpu/s_copysign.S (__copysign): Likewise. (signmask): Add .size directive. (othermask): Add .type directive. 2006-11-14 Ulrich Drepper <drepper@redhat.com> * po/nl.po: Update from translation team. * timezone/zdump.c: Redo fix for BZ #3137. 2006-11-14 Jakub Jelinek <jakub@redhat.com> * nss/nss_files/files-alias.c (get_next_alias): Set line back to first_unused after parsing :include: file. * timezone/africa: Update from tzdata2006o. * timezone/antarctica: Likewise. * timezone/asia: Likewise. * timezone/australasia: Likewise. * timezone/backward: Likewise. * timezone/europe: Likewise. * timezone/iso3166.tab: Likewise. * timezone/northamerica: Likewise. * timezone/southamerica: Likewise. * timezone/zone.tab: Likewise. * time/tzfile.c (__tzfile_read): Extend to handle new file format on machines with 64-bit time_t. * timezone/checktab.awk: Update from tzcode2006o. * timezone/ialloc.c: Likewise. * timezone/private.h: Likewise. * timezone/scheck.c: Likewise. * timezone/tzfile.h: Likewise. * timezone/tzselect.ksh: Likewise. * timezone/zdump.c: Likewise. * timezone/zic.c: Likewise. [BZ #3483] * elf/ldconfig.c (main): Call setlocale and textdomain. Patch mostly by Benno Schulenberg <bensberg@justemail.net>. [BZ #3480] * manual/argp.texi: Fix typos. * manual/charset.texi: Likewise. * manual/errno.texi: Likewise. * manual/filesys.texi: Likewise. * manual/lang.texi: Likewise. * manual/maint.texi: Likewise. * manual/memory.texi: Likewise. * manual/message.texi: Likewise. * manual/resource.texi: Likewise. * manual/search.texi: Likewise. * manual/signal.texi: Likewise. * manual/startup.texi: Likewise. * manual/stdio.texi: Likewise. * manual/sysinfo.texi: Likewise. * manual/syslog.texi: Likewise. * manual/time.texi: Likewise. Patch by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>. [BZ #3465] * sunrpc/clnt_raw.c: Minimal message improvements. * sunrpc/pm_getmaps.c: Likewise. * nis/nss_nisplus/nisplus-publickey.c: Likewise. * nis/nis_print_group_entry.c: Likewise. * locale/programs/repertoire.c: Likewise. * locale/programs/charmap.c: Likewise. * malloc/memusage.sh: Likewise. * elf/dl-deps.c: Likewise. * locale/programs/ld-collate.c: Likewise. * libio/vswprintf.c: Likewise. * malloc/memusagestat.c: Likewise. * sunrpc/auth_unix.c: Likewise. * sunrpc/rpc_main.c: Likewise. * nscd/cache.c: Likewise. * locale/programs/repertoire.c: Unify output messages. * locale/programs/charmap.c: Likewise. * locale/programs/ld-ctype.c: Likewise. * locale/programs/ld-monetary.c: Likewise. * locale/programs/ld-numeric.c: Likewise. * locale/programs/ld-time.c: Likewise. * elf/ldconfig.c: Likewise. * nscd/selinux.c: Likewise. * elf/cache.c: Likewise. Patch mostly by Benno Schulenberg <bensberg@justemail.net>. 2006-11-10 Jakub Jelinek <jakub@redhat.com> * string/strxfrm_l.c (STRXFRM): Fix trailing \1 optimization if N is one bigger than return value. * string/tst-strxfrm2.c (do_test): Also test strxfrm with l1 + 1 and l1 last arguments, if buf is defined, verify the return value equals to strlen (buf) and verify no byte beyond passed length is modified. 2006-11-10 Ulrich Drepper <drepper@redhat.com> * po/sv.po: Update from translation team. * sysdeps/gnu/siglist.c (__old_sys_siglist, __old_sys_sigabbrev): Use __new_sys_siglist instead of _sys_siglist_internal as second macro argument. (_old_sys_siglist): Use declare_symbol_alias macro instead of strong_alias. 2006-11-09 Ulrich Drepper <drepper@redhat.com> [BZ #3493] * posix/unistd.h (sysconf): Remove const attribute. * sysdeps/posix/getaddrinfo.c (getaddrinfo): Fix test for temporary or deprecated addresses. Patch by Sridhar Samudrala <sri@us.ibm.com>. * string/Makefile (tests): Add tst-strxfrm2. * string/tst-strxfrm2.c: New file. 2006-10-09 Jakub Jelinek <jakub@redhat.com> * elf/dl-debug.c (_dl_debug_initialize): Check r->r_map for 0 rather than r->r_brk. * string/strxfrm_l.c (STRXFRM): Do the trailing \1 removal optimization even if needed > n. 2006-11-07 Jakub Jelinek <jakub@redhat.com> * include/libc-symbols.h (declare_symbol): Rename to... (declare_symbol_alias): ... this. Add ORIGINAL argument, imply strong_alias (ORIGINAL, SYMBOL) in asm to make sure it preceedes .size directive. * sysdeps/gnu/errlist-compat.awk: Adjust for declare_symbol_alias changes. * sysdeps/gnu/siglist.c: Likewise. 2006-11-03 Steven Munroe <sjmunroe@us.ibm.com> * sysdeps/powerpc/fpu/bits/mathinline.h [__LIBC_INTERNAL_MATH_INLINES]: Moved to ... * sysdeps/powerpc/fpu/math_private.h: ...here. New file. 2006-11-05 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/i386/sysconf.c (intel_check_word): Update handling of cache descriptor 0x49 for new models. * sysdeps/unix/sysv/linux/x86_64/sysconf.c (intel_check_word): Likewise. 2006-11-02 Ulrich Drepper <drepper@redhat.com> * configure.in: Work around ld --help change and avoid -z relro test completely if the architecture doesn't care about security. 2006-11-01 Ulrich Drepper <drepper@redhat.com> * po/sv.po: Update from translation team. 2006-10-31 Ulrich Drepper <drepper@redhat.com> * stdlib/atexit.c (atexit): Don't mark as hidden when used to generate compatibility version. 2006-10-29 Ulrich Drepper <drepper@redhat.com> * configure.in: Relax -z relro requirement a bit. * po/sv.po: Update from translation team. 2006-10-29 Jakub Jelinek <jakub@redhat.com> * elf/dl-sym.c (do_sym): Use RTLD_SINGLE_THREAD_P. * elf/dl-runtime.c (_dl_fixup, _dl_profile_fixup): Likewise. * elf/dl-close.c (_dl_close_worker): Likewise. * elf/dl-open.c (_dl_open_worker): Likewise. * sysdeps/generic/sysdep-cancel.h (RTLD_SINGLE_THREAD_P): Define. * configure.in: Require assembler support for visibility, compiler support for visibility and aliases, linker support for various -z options. * Makeconfig: Remove conditional code which now is unnecessary. * config.h.in: Likewise. * config.make.in: Likewise. * dlfcn/Makefile: Likewise. * elf/Makefile: Likewise. * elf/dl-load.c: Likewise. * elf/rtld.c: Likewise. * include/libc-symbols.h: Likewise. * include/stdio.h: Likewise. * io/Makefile: Likewise. * io/fstat.c: Likewise. * io/fstat64.c: Likewise. * io/fstatat.c: Likewise. * io/fstatat64.c: Likewise. * io/lstat.c: Likewise. * io/lstat64.c: Likewise. * io/mknod.c: Likewise. * io/mknodat.c: Likewise. * io/stat.c: Likewise. * io/stat64.c: Likewise. * libio/stdio.c: Likewise. * nscd/Makefile: Likewise. * stdlib/Makefile: Likewise. * stdlib/atexit.c: Likewise. * sysdeps/generic/ldsodefs.h: Likewise. * sysdeps/i386/dl-machine.h: Likewise. * sysdeps/i386/sysdep.h: Likewise. * sysdeps/i386/i686/memcmp.S: Likewise. * sysdeps/powerpc/powerpc32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise. * Makerules: USE_TLS support is now default. * tls.make.c: Likewise. * csu/Versions: Likewise. * csu/libc-start.c: Likewise. * csu/libc-tls.c: Likewise. * csu/version.c: Likewise. * dlfcn/dlinfo.c: Likewise. * elf/dl-addr.c: Likewise. * elf/dl-cache.c: Likewise. * elf/dl-close.c: Likewise. * elf/dl-iteratephdr.c: Likewise. * elf/dl-load.c: Likewise. * elf/dl-lookup.c: Likewise. * elf/dl-object.c: Likewise. * elf/dl-open.c: Likewise. * elf/dl-reloc.c: Likewise. * elf/dl-support.c: Likewise. * elf/dl-sym.c: Likewise. * elf/dl-sysdep.c: Likewise. * elf/dl-tls.c: Likewise. * elf/ldconfig.c: Likewise. * elf/rtld.c: Likewise. * elf/tst-tls-dlinfo.c: Likewise. * elf/tst-tls1.c: Likewise. * elf/tst-tls10.h: Likewise. * elf/tst-tls14.c: Likewise. * elf/tst-tls2.c: Likewise. * elf/tst-tls3.c: Likewise. * elf/tst-tls4.c: Likewise. * elf/tst-tls5.c: Likewise. * elf/tst-tls6.c: Likewise. * elf/tst-tls7.c: Likewise. * elf/tst-tls8.c: Likewise. * elf/tst-tls9.c: Likewise. * elf/tst-tlsmod1.c: Likewise. * elf/tst-tlsmod13.c: Likewise. * elf/tst-tlsmod13a.c: Likewise. * elf/tst-tlsmod14a.c: Likewise. * elf/tst-tlsmod2.c: Likewise. * elf/tst-tlsmod3.c: Likewise. * elf/tst-tlsmod4.c: Likewise. * elf/tst-tlsmod5.c: Likewise. * elf/tst-tlsmod6.c: Likewise. * include/errno.h: Likewise. * include/link.h: Likewise. * include/tls.h: Likewise. * locale/global-locale.c: Likewise. * locale/localeinfo.h: Likewise. * malloc/arena.c: Likewise. * malloc/hooks.c: Likewise. * malloc/malloc.c: Likewise. * resolv/Versions: Likewise. * sysdeps/alpha/dl-machine.h: Likewise. * sysdeps/alpha/libc-tls.c: Likewise. * sysdeps/generic/ldsodefs.h: Likewise. * sysdeps/generic/tls.h: Likewise. * sysdeps/i386/dl-machine.h: Likewise. * sysdeps/ia64/dl-machine.h: Likewise. * sysdeps/ia64/libc-tls.c: Likewise. * sysdeps/mach/hurd/fork.c: Likewise. * sysdeps/mach/hurd/i386/tls.h: Likewise. * sysdeps/powerpc/powerpc32/dl-machine.c: Likwise. * sysdeps/powerpc/powerpc32/dl-machine.h: Likewise. * sysdeps/powerpc/powerpc64/dl-machine.h: Likewise. * sysdeps/s390/libc-tls.c: Likewise. * sysdeps/s390/s390-32/dl-machine.h: Likewise. * sysdeps/s390/s390-64/dl-machine.h: Likewise. * sysdeps/sh/dl-machine.h: Likewise. * sysdeps/sparc/sparc32/dl-machine.h: Likewise. * sysdeps/sparc/sparc64/dl-machine.h: Likewise. * sysdeps/x86_64/dl-machine.h: Likewise. [BZ #3426] * stdlib/stdlib.h: Adjust comment for canonicalize_file_name to reality. 2006-10-27 Jakub Jelinek <jakub@redhat.com> * elf/dl-lookup.c (_dl_debug_bindings): Remove unused symbol_scope argument. (_dl_lookup_symbol_x): Adjust caller. * sysdeps/generic/ldsodefs.h (struct link_namespaces): Remove _ns_global_scope. * elf/rtld.c (dl_main): Don't initialize _ns_global_scope. * elf/dl-libc.c: Revert l_scope name changes. * elf/dl-load.c: Likewise. * elf/dl-object.c: Likewise. * elf/rtld.c: Likewise. * elf/dl-close.c (_dl_close): Likewise. * elf/dl-open.c (dl_open_worker): Likewise. If not SINGLE_THREAD_P, always use __rtld_mrlock_{change,done}. Always free old scope list here if not l_scope_mem. * elf/dl-runtime.c (_dl_fixup, _dl_profile_fixup): Revert l_scope name change. Never free scope list here. Just __rtld_mrlock_lock before the lookup and __rtld_mrlock_unlock it after the lookup. * elf/dl-sym.c: Likewise. * include/link.h (struct r_scoperec): Remove. (struct link_map): Replace l_scoperec with l_scope, l_scoperec_mem with l_scope_mem and l_scoperec_lock with l_scope_lock. 2006-10-25 Ulrich Drepper <drepper@redhat.com> * sysdeps/gnu/netinet/tcp.h: Define TCP_CONGESTION. 2006-10-18 Ulrich Drepper <drepper@redhat.com> * configure.in: Disable building profile libraries by default. 2006-10-18 Ulrich Drepper <drepper@redhat.com> * elf/dl-lookup.c (_dl_lookup_symbol_x): Add warning to _dl_lookup_symbol_x code. 2006-10-17 Jakub Jelinek <jakub@redhat.com> * elf/dl-runtime.c: Include sysdep-cancel.h. (_dl_fixup, _dl_profile_fixup): Use __rtld_mrlock_* and scoperec->nusers only if !SINGLE_THREAD_P. Use atomic_* instead of catomic_* macros. * elf/dl-sym.c: Include sysdep-cancel.h. (do_sym): Use __rtld_mrlock_* and scoperec->nusers only if !SINGLE_THREAD_P. Use atomic_* instead of catomic_* macros. * elf/dl-close.c: Include sysdep-cancel.h. (_dl_close): Use __rtld_mrlock_* and scoperec->nusers only if !SINGLE_THREAD_P. Use atomic_* instead of catomic_* macros. * elf/dl-open.c: Include sysdep-cancel.h. (dl_open_worker): Use __rtld_mrlock_* and scoperec->nusers only if !SINGLE_THREAD_P. Use atomic_* instead of catomic_* macros. 2006-10-17 Jakub Jelinek <jakub@redhat.com> [BZ #3313] * malloc/malloc.c (malloc_consolidate): Set maxfb to address of last fastbin rather than end of fastbin array. 2006-10-18 Ulrich Drepper <drepper@redhat.com> * sysdeps/i386/i486/bits/atomic.h (catomic_decrement): Use correct body macro. * sysdeps/x86_64/bits/atomic.h (__arch_c_compare_and_exchange_val_64_acq): Add missing casts. (catomic_decrement): Use correct body macro. 2006-10-17 Jakub Jelinek <jakub@redhat.com> * include/atomic.h: Add a unique prefix to all local variables in macros. * csu/tst-atomic.c (do_test): Test also catomic_* macros. 2006-10-14 Ulrich Drepper <drepper@redhat.com> * resolv/arpa/nameser.h: Document that ns_t_a6 is deprecated. [BZ #3313] * malloc/malloc.c (malloc_consolidate): Don't use get_fast_max to determine highest fast bin to consolidate, always look into all of them. (do_check_malloc_state): Only require for empty bins for large sizes in main arena. * libio/stdio.h: Add more __wur attributes. 2006-11-12 Andreas Jaeger <aj@suse.de> [BZ #2510] * manual/search.texi (Hash Search Function): Clarify. (Array Search Function): Clarify. 2006-11-12 Joseph Myers <joseph@codesourcery.com> [BZ #2830] * math/atest-exp.c (main): Cast hex value to mp_limb_t before shifting. * math/atest-exp2.c (read_mpn_hex): Likewise. * math/atest-sincos.c (main): Likewise. * sysdeps/unix/sysv/linux/syscalls.list: Add epoll_pwait. * sysdeps/unix/sysv/linux/sys/epoll.h: Declare epoll_pwait. * sysdeps/unix/sysv/linux/Versions (libc): Add epoll_pwait for version GLIBC_2.6. * Versions.def: Add GLIBC_2.6 for libc. * sysdeps/i386/i486/bits/atomic.h: Add catomic_* support. 2006-10-11 Jakub Jelinek <jakub@redhat.com> * malloc/malloc.c (_int_malloc): Remove unused any_larger variable. * nis/nis_defaults.c (__nis_default_access): Don't call getenv twice. * nis/nis_subr.c (nis_getnames): Use __secure_getenv instead of getenv. * sysdeps/generic/unsecvars.h: Add NIS_PATH. 2006-10-11 Ulrich Drepper <drepper@redhat.com> * include/atomic.c: Define catomic_* operations. * sysdeps/x86_64/bits/atomic.h: Likewise. Fix a few minor problems. * stdlib/cxa_finalize.c: Use catomic_* operations instead of atomic_*. * malloc/memusage.c: Likewise. * gmon/mcount.c: Likewise. * elf/dl-close.c: Likewise. * elf/dl-open.c: Likewise. * elf/dl-profile.c: Likewise. * elf/dl-sym.c: Likewise. * elf/dl-runtime.c: Likewise. * elf/dl-fptr.c: Likewise. * resolv/res_libc.c: Likewise. 2006-10-10 Roland McGrath <roland@frob.com> * sysdeps/mach/hurd/utimes.c: Use a union to avoid an improper cast. * sysdeps/mach/hurd/futimes.c: Likewise. * sysdeps/mach/hurd/lutimes.c: Likewise. 2006-10-09 Ulrich Drepper <drepper@redhat.com> Jakub Jelinek <jakub@redhat.com> Implement reference counting of scope records. * elf/dl-close.c (_dl_close): Remove all scopes from removed objects from the list in objects which remain. Always allocate new scope record. * elf/dl-open.c (dl_open_worker): When growing array for scopes, don't resize, allocate a new one. * elf/dl-runtime.c: Update reference counters before using a scope array. * elf/dl-sym.c: Likewise. * elf/dl-libc.c: Adjust for l_scope name change. * elf/dl-load.c: Likewise. * elf/dl-object.c: Likewise. * elf/rtld.c: Likewise. * include/link.h: Include <rtld-lowlevel.h>. Define struct r_scoperec. Replace r_scope with pointer to r_scoperec structure. Add l_scoperec_lock. * sysdeps/generic/ldsodefs.h: Include <rtld-lowlevel.h>. * sysdeps/generic/rtld-lowlevel.h: New file. * include/atomic.h: Rename atomic_and to atomic_and_val and atomic_or to atomic_or_val. Define new macros atomic_and and atomic_or which do not return values. * sysdeps/x86_64/bits/atomic.h: Define atomic_and and atomic_or. Various cleanups. * sysdeps/i386/i486/bits/atomic.h: Likewise. * po/sv.po: Update from translation team. 2006-10-07 Ulrich Drepper <drepper@redhat.com> * Versions.def: Add GLIBC_2.6 to libpthread. * include/shlib-compat.h (SHLIB_COMPAT): Expand parameters before use. (versioned_symbol): Likewise. (compat_symbol): Likewise. * po/tr.po: Update from translation team. * nis/Banner: Removed. It's been integral part forever and the author info is incomplete anyway. * libio/Banner: Likewise. 2006-10-06 Ulrich Drepper <drepper@redhat.com> * version.h (VERSION): Bump to 2.5.90 for new development tree.
* .Jakub Jelinek2007-07-311-3/+6
|