win: math.h: fix fpclassify/signbit/etc - use C instead of broken asm
commit9c52ba48b347998abfe0ef544961bbaf88daee11
authorAvi Halachmi (:avih) <avihpit@yahoo.com>
Sun, 1 Nov 2015 16:47:03 +0000 (1 18:47 +0200)
committerAvi Halachmi (:avih) <avihpit@yahoo.com>
Sat, 7 Nov 2015 20:18:46 +0000 (7 22:18 +0200)
treed3d2f7a4d2a1fbcd401b5e8049fdfd9634611e77
parent6e261a107cf92a62817e81c78b52470d81218e4a
win: math.h: fix fpclassify/signbit/etc - use C instead of broken asm

The asm code cannot currently be used with tcc since tcc doesn't support 't'
constraint.

Use inline C implementation instead, place it win32/include/tcc/tcc_libm.h, and
include it from win32/include/math.h.

Since fpclassify now works, it also fixes few other macros which depend on it.
Implicitly fixed: isfinite, isinf, isnan, isnormal.

The implementations were taken from musl-libc rs-1.0 (MIT license).

musl-libc: http://git.musl-libc.org/cgit/musl/tree/src/math?h=rs-1.0
license:   http://git.musl-libc.org/cgit/musl/tree/COPYRIGHT?h=rs-1.0
win32/include/math.h
win32/include/tcc/tcc_libm.h [new file with mode: 0644]