]> git.proxmox.com Git - wasi-libc.git/commit
Optimize `fmin`, `fmax`, etc. (#120)
authorDan Gohman <sunfish@mozilla.com>
Wed, 20 Nov 2019 19:13:45 +0000 (11:13 -0800)
committerGitHub <noreply@github.com>
Wed, 20 Nov 2019 19:13:45 +0000 (11:13 -0800)
commitcf81683e7734978a6c69019eca97398db3aae35b
tree908b70b8e694c0e497a4fcd3133f3f5f5e102e6a
parentdeb8eae4184aaa78f540c1fb848a4a3e500adc8d
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!
Makefile
basics/sources/fmin-fmax.c [new file with mode: 0644]