| Commit message (Expand) | Author | Age | Files | Lines |
| * | switch arm, sh, and mips fenv asm from .sub system to .S files | Rich Felker | 2016-01-20 | 12 | -6/+21 |
| * | explicitly assemble all arm asm sources as UAL•••these files are all accepted as legacy arm syntax when producing arm
code, but legacy syntax cannot be used for producing thumb2 with
access to the full ISA. even after switching to UAL, some asm source
files contain instructions which are not valid in thumb mode, so these
will need to be addressed separately.
| Rich Felker | 2015-11-10 | 1 | -0/+1 |
| * | use vfp mnemonics instead of p10 coprocessor ones in armhf fenv asm•••mrc/mcr p10 coprocessor mnemonics are deprecated by some
toolchains.
| Szabolcs Nagy | 2015-11-05 | 1 | -10/+10 |
| * | declare fpu usage to the assembler in arm hard-float asm files•••Some armhf gcc toolchains (built with --with-float=hard but without
--with-fpu=vfp*) do not pass -mfpu=vfp to the assembler and then
binutils rejects the UAL mnemonics for VFP unless there is an .fpu vfp
directive in the asm source.
| Szabolcs Nagy | 2015-10-19 | 1 | -0/+2 |
| * | fix mips fesetround failure to write back resulting mode•••patch by Anand Takale.
| Rich Felker | 2015-10-01 | 1 | -0/+1 |
| * | fix mips fesetenv(FE_DFL_ENV) again•••commit 5fc1487832e16aa2119e735a388d5f36c8c139e2 attempted to fix it,
but neglected the fact that mips has branch delay slots.
| Rich Felker | 2015-04-17 | 1 | -0/+1 |
| * | add aarch64 port•••This adds complete aarch64 target support including bigendian subarch.
Some of the long double math functions are known to be broken otherwise
interfaces should be fully functional, but at this point consider this
port experimental.
Initial work on this port was done by Sireesh Tripurari and Kevin Bortis.
| Szabolcs Nagy | 2015-03-11 | 1 | -0/+67 |
| * | fix FLT_ROUNDS to reflect the current rounding mode•••Implemented as a wrapper around fegetround introducing a new function
to the ABI: __flt_rounds. (fegetround cannot be used directly from float.h)
| Szabolcs Nagy | 2015-03-07 | 1 | -0/+19 |
| * | simplify armhf fesetenv•••armhf fesetenv implementation did a useless read of the fpscr.
| Szabolcs Nagy | 2015-02-08 | 1 | -1/+0 |
| * | fix fesetenv(FE_DFL_ENV) on mips•••mips fesetenv did not handle FE_DFL_ENV, now fcsr is cleared in that
case.
| Szabolcs Nagy | 2015-02-08 | 1 | -1/+3 |
| * | add nofpu subarchs to the sh arch, and properly detect compiler's fpu config | Rich Felker | 2014-02-27 | 2 | -0/+2 |
| * | rename superh port to "sh" for consistency•••linux, gcc, etc. all use "sh" as the name for the superh arch. there
was already some inconsistency internally in musl: the dynamic linker
was searching for "ld-musl-sh.path" as its path file despite its own
name being "ld-musl-superh.so.1". there was some sentiment in both
directions as to how to resolve the inconsistency, but overall "sh"
was favored.
| Rich Felker | 2014-02-27 | 1 | -0/+0 |
| * | add missing sub files for mipsel-sf to use softfloat code•••the build system has no automatic way to know this code applies to
both big (default) and little endian variants, so explicit .sub files
are needed.
| Rich Felker | 2014-02-24 | 1 | -0/+1 |
| * | mips: add mips-sf subarch support (soft-float)•••Userspace emulated floating-point (gcc -msoft-float) is not compatible
with the default mips abi (assumes an FPU or in kernel emulation of it).
Soft vs hard float abi should not be mixed, __mips_soft_float is checked
in musl's configure script and there is no runtime check. The -sf subarch
does not save/restore floating-point registers in setjmp/longjmp and only
provides dummy fenv implementation.
| Szabolcs Nagy | 2014-02-24 | 1 | -0/+1 |
| * | superh port | Bobby Bingham | 2014-02-23 | 1 | -0/+74 |
| * | x32 port (diff against vanilla x86_64) | rofl0r | 2014-02-23 | 1 | -26/+26 |
| * | import vanilla x86_64 code as x32 | rofl0r | 2014-02-23 | 1 | -0/+97 |
| * | fix fesetenv(FE_DFL_ENV) on x86_64 (see previous commit) | Szabolcs Nagy | 2014-02-09 | 1 | -1/+1 |
| * | fix fesetenv(FE_DFL_ENV) on i386•••the default fenv was not set up properly, in particular the
tag word that indicates the contents of the x87 registers was
set to 0 (used) instead of 0xffff (empty)
this could cause random crashes after setting the default fenv
because it corrupted the fpu stack and then any float computation
gives NaN result breaking the program logic (usually after a
float to integer conversion).
| Szabolcs Nagy | 2014-02-09 | 1 | -1/+1 |
| * | fenv: fix i386 fesetround for sse•••i386 fenv code checks __hwcap for sse support, but in fesetround the sse
code was unconditionally jumped over after the test so the sse rounding
mode was never set.
| Szabolcs Nagy | 2013-10-28 | 1 | -1/+1 |
| * | fix invalid instruction mnemonics in powerpc fenv asm•••there is no non-dot version of the andis instruction, but there's no
harm in updating the flags anyway, so just use the dot version.
| Rich Felker | 2013-08-27 | 1 | -3/+3 |
| * | fix fenv exception functions to mask their argument•••fesetround.c is a wrapper to do the arch independent argument
check (on archs where rounding mode is not stored in 2 bits
__fesetround still has to check its arguments)
on powerpc fe*except functions do not accept the extra invalid
flags of its fpscr register
the useless FENV_ACCESS pragma was removed from feupdateenv
| Szabolcs Nagy | 2013-08-18 | 8 | -18/+55 |
| * | optimize x86 feclearexcept: only use save/restore x87 fenv if needed•••the x87 exception summary (ES) and stack fault (SF) flags may be
spuriously cleared by feclearexcept using the fnclex instruction,
but these flags are not observable through libc hence maintaining
their state is not critical.
| Szabolcs Nagy | 2013-08-18 | 2 | -27/+38 |
| * | add sse fenv support on i386 through hwcap•••the sse and x87 rounding modes should be always the same,
the visible exception flags are the bitwise or of the two
fenv states (so it's enough to query the rounding mode or
raise exceptions on one fenv)
| Szabolcs Nagy | 2013-08-18 | 2 | -9/+61 |
| * | fix i386 fesetenv: FE_DFL_ENV is (fenv_t*)-1 not 0 | Szabolcs Nagy | 2013-08-18 | 1 | -2/+2 |
| * | support floating point environment (fenv) on armhf (hard float) subarchs•••patch by nsz. I've tested it on an armhf machine and it seems to be
working correctly.
| Rich Felker | 2013-08-16 | 3 | -0/+62 |
| * | fenv support for ppc, untested•••based on code sent to the mailing list by nsz, with minor changes.
| Rich Felker | 2012-11-18 | 1 | -0/+120 |
| * | fix feholdexcept -- it needs to clear exceptions after saving environment | Rich Felker | 2012-11-18 | 1 | -0/+1 |
| * | fenv: return FE_TONEAREST in dummy fegetround | Szabolcs Nagy | 2012-11-14 | 1 | -1/+1 |
| * | math: use '#pragma STDC FENV_ACCESS ON' when fenv is accessed | Szabolcs Nagy | 2012-11-13 | 1 | -0/+1 |
| * | floating point environment/exceptions support for mips | Rich Felker | 2012-10-18 | 1 | -0/+60 |
| * | try fixing/optimizing x86_64 fenv exception code•••untested; may need followup-fixes.
| Rich Felker | 2012-03-17 | 1 | -18/+23 |
| * | optimize x86 feclearexcept•••if all exception flags will be cleared, we can avoid the expensive
store/reload of the environment and just use the fnclex instruction.
| Rich Felker | 2012-03-17 | 1 | -16/+20 |
| * | fix x86_64 fe[gs]etround, analogous to nsz's x86 changes | Rich Felker | 2012-03-17 | 1 | -8/+9 |
| * | minor 387 fenv optimizations | Rich Felker | 2012-03-17 | 1 | -6/+5 |
| * | fix i386 fegetround and make fesetround faster•••Note that the new fesetround has slightly different semantics:
Storing the floating-point environment with fnstenv makes the
next fldenv (or fldcw) "non-signaling", so unmasked and pending
exceptions does not invoke the exception handler.
(These are rare since exceptions are handled immediately and by
default all exceptions are masked anyway. But if one manually
unmasks an exception in the control word then either sets the
corresponding exception flag in the status word or the execution
of an exception raising floating-point operation gets interrupted
then it may happen).
So the old implementation did not trap in some rare cases
where the new implementation traps.
However POSIX does not specify anything like the x87 exception
handling traps and the fnstenv/fldenv pair is significantly slower
than the fnstcw/fldcw pair (new code is about 5x faster here and
it's dominated by the function call overhead).
| nsz | 2012-03-17 | 1 | -10/+10 |
| * | use type directives for fenv asm functions | Rich Felker | 2011-06-28 | 2 | -0/+14 |
| * | x86_64 fenv support (untested; at least known to build successfully) | Rich Felker | 2011-06-13 | 1 | -0/+88 |
| * | fix fesetround - it was writing to status word instead of control word | Rich Felker | 2011-06-13 | 1 | -3/+8 |
| * | floating point environment, untested•••at present the i386 code does not support sse floating point, which is
not part of the standard i386 abi. while it may be desirable to
support it later, doing so will reduce performance and require some
tricks to probe if sse support is present.
this first commit is i386-only, but it should be trivial to port the
asm to x86_64.
| Rich Felker | 2011-06-12 | 6 | -0/+144 |