about summary refs log tree commit diff
path: root/sysdeps/sh/sh4/bits
Commit message (Collapse)AuthorAgeFilesLines
* Refactor FP_FAST_* into bits/fp-fast.h.Joseph Myers2016-11-291-42/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the refactoring of bits/mathdef.h, this patch moves the FP_FAST_* definitions into a new bits/fp-fast.h header. Currently this is only for FP_FAST_FMA*, but in future it would be the appropriate place for the FP_FAST_* macros from TS 18661-1 as well. The generic bits/mathdef.h header defines these macros based on whether the compiler defines __FP_FAST_*. Most architecture-specific headers, however, fail to do so, meaning that if the architecture (or some particular processors) does in fact have fused operations, and GCC knows to use them inline, the FP_FAST_* macros will still not be defined. By refactoring, this patch causes the generic version (based on __FP_FAST_*) to be used in more cases, and so the macro definitions to be more accurate. Architectures that already defined some or all of these macros other than based on the predefines have their own versions of fp-fast.h, which are arranged so they define FP_FAST_* if either the architecture-specific conditions are true or __FP_FAST_* are defined. After this refactoring, various bits/mathdef.h headers for architectures with long double = double are semantically identical to the generic version. The patch removes those headers that are redundant. (In fact two of the four removed were already redundant before this patch because they did use __FP_FAST_*.) Tested for x86_64 and x86, and compilation-only with build-many-glibcs.py. * bits/fp-fast.h: New file. * sysdeps/aarch64/bits/fp-fast.h: Likewise. * sysdeps/powerpc/bits/fp-fast.h: Likewise. * math/Makefile (headers): Add bits/fp-fast.h. * math/math.h: Include <bits/fp-fast.h>. * bits/mathdef.h (FP_FAST_FMA): Remove. (FP_FAST_FMAF): Likewise. (FP_FAST_FMAL): Likewise. * sysdeps/aarch64/bits/mathdef.h (FP_FAST_FMA): Likewise. (FP_FAST_FMAF): Likewise. * sysdeps/powerpc/bits/mathdef.h (FP_FAST_FMA): Likewise. (FP_FAST_FMAF): Likewise. * sysdeps/x86/bits/mathdef.h (FP_FAST_FMA): Likewise. (FP_FAST_FMAF): Likewise. (FP_FAST_FMAL): Likewise. * sysdeps/arm/bits/mathdef.h: Remove file. * sysdeps/hppa/fpu/bits/mathdef.h: Likewise. * sysdeps/sh/sh4/bits/mathdef.h: Likewise. * sysdeps/tile/bits/mathdef.h: Likewise.
* Refactor float_t, double_t information into bits/flt-eval-method.h.Joseph Myers2016-11-241-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present, definitions of float_t and double_t are split among many bits/mathdef.h headers. For all but three architectures, these types are float and double. Furthermore, if you assume __FLT_EVAL_METHOD__ to be defined, that provides a more generic way of determining the correct values of these typedefs. Defining these typedefs more generally based on __FLT_EVAL_METHOD__ was previously proposed by Paul Eggert in <https://sourceware.org/ml/libc-alpha/2012-02/msg00002.html>. This patch refactors things in the way I proposed in <https://sourceware.org/ml/libc-alpha/2016-11/msg00745.html>. A new header bits/flt-eval-method.h defines a single macro, __GLIBC_FLT_EVAL_METHOD, which is then used by math.h to define float_t and double_t. The default is based on __FLT_EVAL_METHOD__ (although actually a default to 0 would have the same effect for current ports, because ports where values other than 0 or 16 are possible all have their own headers). To avoid changing the existing semantics in any case, including for compilers not defining __FLT_EVAL_METHOD__, architecture-specific files are then added for m68k, s390, x86 which replicate the existing semantics. At least with __FLT_EVAL_METHOD__ values possible with GCC, there should be no change to the choices of float_t and double_t for any supported configuration. Architecture maintainer notes: * m68k: sysdeps/m68k/m680x0/bits/flt-eval-method.h always defines __GLIBC_FLT_EVAL_METHOD to 2 to replicate the existing logic. But actually GCC defines __FLT_EVAL_METHOD__ to 0 if TARGET_68040. It might make sense to make the header prefer to base things on __FLT_EVAL_METHOD__ if defined, like the x86 version, and so make the choices of these types more accurate (with a NEWS entry as for the other changes to these types on particular architectures). * s390: sysdeps/s390/bits/flt-eval-method.h always defines __GLIBC_FLT_EVAL_METHOD to 1 to replicate the existing logic. As previously discussed, it might make sense in coordination with GCC to eliminate the historic mistake, avoid excess precision in the -fexcess-precision=standard case and make the typedefs match (with a NEWS entry, again). Tested for x86-64 and x86. Also did compilation-only testing with build-many-glibcs.py. * bits/flt-eval-method.h: New file. * sysdeps/m68k/m680x0/bits/flt-eval-method.h: Likewise. * sysdeps/s390/bits/flt-eval-method.h: Likewise. * sysdeps/x86/bits/flt-eval-method.h: Likewise. * math/Makefile (headers): Add bits/flt-eval-method.h. * math/math.h: Include <bits/flt-eval-method.h>. [__USE_ISOC99] (float_t): Define based on __GLIBC_FLT_EVAL_METHOD. [__USE_ISOC99] (double_t): Likewise. * bits/mathdef.h (float_t): Remove. (double_t): Likewise. * sysdeps/aarch64/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/alpha/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/arm/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/hppa/fpu/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/ia64/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/m68k/m680x0/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/mips/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/powerpc/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/s390/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/sh/sh4/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/sparc/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/tile/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/x86/bits/mathdef.h (float_t): Likewise. (double_t): Likewise.
* Fix SH4 FP_ILOGB0 (bug 20859).Joseph Myers2016-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | ISO C requires that the value of FP_ILOGB0 must be INT_MIN or -INT_MAX. In sysdeps/sh/sh4/bits/mathdef.h, it's 0x80000001; that is, a positive unsigned value that would be -INT_MAX if converted to int, which is not valid (there's no actual constraint on the type, but whatever the type the integer value must be one of the two permitted, and types other than int don't really make sense). This patch makes the ABI-compatible change to (-0x7fffffff). (The testcase handles positive and negative sign separately to avoid any issues with implicit conversions that could result in e.g. INT_MIN converted to uintmax_t wrongly passing.) Tested (compilation only) with build-many-glibcs.py. [BZ #20859] * sysdeps/sh/sh4/bits/mathdef.h (FP_ILOGB0): Define to (-0x7fffffff) instead of 0x80000001. * math/test-fp-ilogb-constants.c: New file. * math/Makefile (tests): Add test-fp-ilogb-constants.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-041-1/+1
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-021-1/+1
|
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-011-1/+1
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-021-2/+1
|
* Replace FSF snail mail address with URLs.Paul Eggert2012-02-091-3/+2
|
* Always define float_t as float for PowerPC, SH and SPARC.Joseph Myers2012-01-311-14/+2
|
* Remove __STDC__ conditionals from installed headers.Joseph Myers2012-01-261-12/+3
|
* * math/divtc3.c: New file.Roland McGrath2006-02-011-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * math/multc3.c: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/Makefile [$(subdir) = math] (libm-routines): Add multc3, divtc3. * sysdeps/unix/sysv/linux/sparc/sparc32/fpu/Implies: New file. * sysdeps/sparc/sparc32/fpu/s_fabsl.c: Include math.h and math_ldbl_opt.h. (fabsl): Use long_double_symbol instead of weak_alias. * sysdeps/sparc/sparc32/fpu/s_fabs.c: Include math.h and math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (fabsl): Add compat_symbol. 2006-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com> Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/s390/Implies: New file. * sysdeps/unix/sysv/linux/s390/fpu/Implies: New file. * sysdeps/unix/sysv/linux/s390/nldbl-abi.h: New file. * sysdeps/s390/fpu/bits/mathinline.h (signbitl, sqrtl): New inlines. * sysdeps/s390/bits/mathdef.h: New file. * sysdeps/s390/fpu/e_sqrtl.c: New file. * sysdeps/s390/s390-32/bits/wordsize.h (__LONG_DOUBLE_MATH_OPTIONAL, __NO_LONG_DOUBLE_MATH): Define. * sysdeps/s390/s390-64/bits/wordsize.h: Likewise. * sysdeps/s390/Implies: Add ieee754/ldbl-128. * sysdeps/s390/ldbl2mpn.c: File removed. * sysdeps/s390/fpu/libm-test-ulps: Updated. 2006-01-31 Roland McGrath <roland@redhat.com> * sysdeps/alpha/fpu/bits/mathdef.h: Moved to ... * sysdeps/alpha/bits/mathdef.h: ... here. * sysdeps/i386/fpu/bits/mathdef.h: Moved to ... * sysdeps/i386/bits/mathdef.h: ... here. * sysdeps/mips/fpu/bits/mathdef.h: Moved to ... * sysdeps/mips/bits/mathdef.h: ... here. * sysdeps/m68k/fpu/bits/mathdef.h: Moved to ... * sysdeps/m68k/bits/mathdef.h: ... here. * sysdeps/powerpc/fpu/bits/mathdef.h: Moved to ... * sysdeps/powerpc/bits/mathdef.h: ... here. * sysdeps/sparc/fpu/bits/mathdef.h: Moved to ... * sysdeps/sparc/bits/mathdef.h: ... here. * sysdeps/ia64/fpu/bits/mathdef.h: Moved to ... * sysdeps/ia64/bits/mathdef.h: ... here. * sysdeps/sh/sh4/fpu/bits/mathdef.h: Moved to ... * sysdeps/sh/sh4/bits/mathdef.h: ... here. * sysdeps/x86_64/fpu/bits/mathdef.h: Moved to ... * sysdeps/x86_64/bits/mathdef.h: ... here. 2006-01-31 Jakub Jelinek <jakub@redhat.com>
* (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.Ulrich Drepper2004-12-221-69/+0
|
* 2.5-18.1Jakub Jelinek2007-07-121-0/+69
|
* Update.Ulrich Drepper2000-11-081-50/+0
| | | | * sysdeps/sh/sh3/setjmp.S (__sigsetjmp): Skip FPU fields.
* Update.Ulrich Drepper2000-11-071-0/+50
| | | | | | | | 2000-11-07 Kazumoto Kojima <kkojima@rr.iij4u.or.jp> * sysdeps/sh/bits/setjmp.h: Move to... * sysdeps/sh/sh4/bits/setjmp.h: ...here. * sysdeps/sh/sh3/bits/setjmp.h: New file.
* Update.Ulrich Drepper2000-06-131-50/+0
| | | | | | | | 2000-06-12 Ulrich Drepper <drepper@redhat.com> * sysdeps/sh/sh3/bits/setjmp.h: Removed. * sysdeps/sh/sh4/bits/setjmp.h: Moved to... * sysdeps/sh/bits/setjmp.h: ...here. New file.
* Update.Ulrich Drepper2000-06-132-117/+0
| | | | | | | | | * sysdeps/sh/sh3/bsd-_setjmp.S: Move to... * sysdeps/sh/bsd-_setjmp.S: ...here. New file. * sysdeps/sh/sh4/bsd-_setjmp.S: Removed. * sysdeps/sh/sh3/bsd-setjmp.S: Move to... * sysdeps/sh/bsd-setjmp.S: ...here. New file. * sysdeps/sh/sh4/bsd-setjmp.S: Removed.
* Update.Ulrich Drepper2000-06-123-0/+167
2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp> Yutaka Niibe <gniibe@chroot.org> * sysdeps/sh/Dist: New file. * sysdeps/sh/Implies: New file. * sysdeps/sh/gmp-mparam.h: New file. * sysdeps/sh/init-first.c: New file. * sysdeps/sh/machine-gmon.h: New file. * sysdeps/sh/memcpy.S: New file. * sysdeps/sh/memprof.h: New file. * sysdeps/sh/memset.S: New file. * sysdeps/sh/sh3/__longjmp.S: New file. * sysdeps/sh/sh3/bits/endian.h: New file. * sysdeps/sh/sh3/bits/huge_val.h: New file. * sysdeps/sh/sh3/bits/setjmp.h: New file. * sysdeps/sh/sh3/bsd-_setjmp.S: New file. * sysdeps/sh/sh3/bsd-setjmp.S: New file. * sysdeps/sh/sh3/dl-machine.h: New file. * sysdeps/sh/sh3/elf/initfini.c: New file. * sysdeps/sh/sh3/elf/start.S: New file. * sysdeps/sh/sh3/setjmp.S: New file. * sysdeps/sh/sh3/sys/ucontext.h: New file. * sysdeps/sh/sh4/__longjmp.S: New file. * sysdeps/sh/sh4/bits/endian.h: New file. * sysdeps/sh/sh4/bits/huge_val.h: New file. * sysdeps/sh/sh4/bits/setjmp.h: New file. * sysdeps/sh/sh4/bsd-_setjmp.S: New file. * sysdeps/sh/sh4/bsd-setjmp.S: New file. * sysdeps/sh/sh4/dl-machine.h: New file. * sysdeps/sh/sh4/elf/initfini.c: New file. * sysdeps/sh/sh4/elf/start.S: New file. * sysdeps/sh/sh4/fpu/bits/fenv.h: New file. * sysdeps/sh/sh4/fpu/bits/huge_val.h: New file. * sysdeps/sh/sh4/fpu/bits/mathdef.h: New file. * sysdeps/sh/sh4/fpu/fclrexcpt.c: New file. * sysdeps/sh/sh4/fpu/fegetenv.c: New file. * sysdeps/sh/sh4/fpu/fegetround.c: New file. * sysdeps/sh/sh4/fpu/feholdexcpt.c: New file. * sysdeps/sh/sh4/fpu/fesetenv.c: New file. * sysdeps/sh/sh4/fpu/fesetround.c: New file. * sysdeps/sh/sh4/fpu/fpu_control.h: New file. * sysdeps/sh/sh4/fpu/fraiseexcpt.c: New file. * sysdeps/sh/sh4/fpu/fsetexcptflg.c: New file. * sysdeps/sh/sh4/fpu/ftestexcept.c: New file. * sysdeps/sh/sh4/fpu/libm-test-ulps: New file. * sysdeps/sh/sh4/setjmp.S: New file. * sysdeps/sh/sh4/sys/ucontext.h: New file. * sysdeps/sh/strlen.S: New file. * sysdeps/sh/sysdep.h: New file. * sysdeps/unix/sh/sysdep.S: New file. * sysdeps/unix/sh/sysdep.h: New file. * sysdeps/unix/sysv/linux/sh/Dist: New file. * sysdeps/unix/sysv/linux/sh/Makefile: New file. * sysdeps/unix/sysv/linux/sh/Versions: New file. * sysdeps/unix/sysv/linux/sh/bits/mman.h: New file. * sysdeps/unix/sysv/linux/sh/bits/resource.h: New file. * sysdeps/unix/sysv/linux/sh/brk.c: New file. * sysdeps/unix/sysv/linux/sh/chown.c: New file. * sysdeps/unix/sysv/linux/sh/clone.S: New file. * sysdeps/unix/sysv/linux/sh/fchown.c: New file. * sysdeps/unix/sysv/linux/sh/fxstat.c: New file. * sysdeps/unix/sysv/linux/sh/getegid.c: New file. * sysdeps/unix/sysv/linux/sh/geteuid.c: New file. * sysdeps/unix/sysv/linux/sh/getgroups.c: New file. * sysdeps/unix/sysv/linux/sh/getresgid.c: New file. * sysdeps/unix/sysv/linux/sh/getresuid.c: New file. * sysdeps/unix/sysv/linux/sh/getrlimit.c: New file. * sysdeps/unix/sysv/linux/sh/getrlimit64.c: New file. * sysdeps/unix/sysv/linux/sh/getuid.c: New file. * sysdeps/unix/sysv/linux/sh/lchown.c: New file. * sysdeps/unix/sysv/linux/sh/lxstat.c: New file. * sysdeps/unix/sysv/linux/sh/msgctl.c: New file. * sysdeps/unix/sysv/linux/sh/oldgetrlimit64.c: New file. * sysdeps/unix/sysv/linux/sh/pipe.S: New file. * sysdeps/unix/sysv/linux/sh/profil-counter.h: New file. * sysdeps/unix/sysv/linux/sh/semctl.c: New file. * sysdeps/unix/sysv/linux/sh/setegid.c: New file. * sysdeps/unix/sysv/linux/sh/seteuid.c: New file. * sysdeps/unix/sysv/linux/sh/setfsgid.c: New file. * sysdeps/unix/sysv/linux/sh/setfsuid.c: New file. * sysdeps/unix/sysv/linux/sh/setgid.c: New file. * sysdeps/unix/sysv/linux/sh/setgroups.c: New file. * sysdeps/unix/sysv/linux/sh/setregid.c: New file. * sysdeps/unix/sysv/linux/sh/setresgid.c: New file. * sysdeps/unix/sysv/linux/sh/setresuid.c: New file. * sysdeps/unix/sysv/linux/sh/setreuid.c: New file. * sysdeps/unix/sysv/linux/sh/setrlimit.c: New file. * sysdeps/unix/sysv/linux/sh/setuid.c: New file. * sysdeps/unix/sysv/linux/sh/sh3/register-dump.h: New file. * sysdeps/unix/sysv/linux/sh/sh4/register-dump.h: New file. * sysdeps/unix/sysv/linux/sh/shmctl.c: New file. * sysdeps/unix/sysv/linux/sh/sigcontextinfo.h: New file. * sysdeps/unix/sysv/linux/sh/socket.S: New file. * sysdeps/unix/sysv/linux/sh/sys/io.h: New file. * sysdeps/unix/sysv/linux/sh/sys/ucontext.h: New file. * sysdeps/unix/sysv/linux/sh/sys/user.h: New file. * sysdeps/unix/sysv/linux/sh/syscalls.list: New file. * sysdeps/unix/sysv/linux/sh/sysdep.S: New file. * sysdeps/unix/sysv/linux/sh/sysdep.h: New file. * sysdeps/unix/sysv/linux/sh/vfork.S: New file. * sysdeps/unix/sysv/linux/sh/xstat.c: New file.