Commit Graph

6 Commits

Author SHA1 Message Date
Dan Gohman
a280fead2a
Move math source files. (#151)
This is split out from the LTO change. It's needed by the LTO build so
that we can easily build these files in non-LTO mode, since they satisfy
calls emitted by LLVM codegen after LTO.
2019-12-20 15:43:31 -08:00
Dan Gohman
cf81683e77
Optimize fmin, fmax, etc. (#120)
Use wasm's builtin min and max operators to implement libc `fmin`,
`fmax, `fminf`, and `fmaxf`, by handling the NaN cases explicitly.

Credit to https://github.com/emscripten-core/emscripten/pull/9689
for spotting this opportunity!
2019-11-20 11:13:45 -08:00
Dan Gohman
7d5074ff66 Add complex builtins for creal and cimag too. 2019-05-15 11:52:56 -07:00
Dan Gohman
16450763eb Use builtin functions rather than portable libm implementations.
For functions like sqrt, fabs, and others, use the builtin functions,
which provide single-instruction implementations, rather than using
musl's portable implementations.
2019-05-15 11:52:56 -07:00
Dan Gohman
c87e877f88 Move abort.c out of libc-bottom-half and into basics. 2019-05-07 11:34:41 -07:00
Dan Gohman
ad03c82d65 Implement reallocarray.
reallocarray is non-standard but present in GLIBC and BSDs.
2019-04-23 15:00:07 -07:00