reactos/sdk/lib
Colin Finck bd0a28d1e4 Fix the MSVC version of ldexp filling up the FPU stack and bailing out with #IND after a few calls. Additionally, add it back to libcntpr.
MSVC was previously given a "result" variable to copy the fscale result from st(0). This led to another "fld" FPU stack push at the very end without popping the source value from the FPU stack.
Moreover, this copy isn't even needed: A simple "fstp st(1)" at the end pops an element from the FPU stack while effectively storing the result in st(0), the register used for returning a double value.
This problem didn't affect GCC, as it is only given the "fscale" instruction and does all necessary stack operations itself.

However, looking into the CRT sources, I found many other i386 implementations with inline assembly suffering from the same problem.
Fortunately, they have been replaced by pure assembly implementations a while ago, so it's time to finally remove them.
ldexp would have also been a candidate for a pure assembly implementation, but the required check for NaN and setting errno (verified on Win2003) already outweighs the benefits.
And we cannot just do a NaN check with FUCOMI as this is an i686/pentiumpro instruction while we're still targeting i586/pentium.

I'm also using this opportunity to clean up the ldexp.c header and only put in the remaining contributors as returned by "git blame".

Thanks to NightWolve1975 for reporting the problem! (https://twitter.com/nightwolve1975/status/1099042477531643912)
2019-03-03 16:11:27 +01:00
..
3rdparty [FREETYPE] Handle allocation failures in our stack-saving hacks. CORE-15642 2019-01-28 14:31:49 +01:00
atl [ATL] Add GET_X_LPARAM and GET_Y_LPARAM to atlwin.h 2019-01-15 14:34:53 +02:00
cmlib [CMLIB] Assign a signature to the in-memory HHIVE registry hive structure. CORE-15753 2019-02-17 01:21:37 +01:00
comsupp
conutils
cportlib
cpprt [CPPRT] Implement __std_terminate wrapper for Clang-CL 2019-02-12 19:31:33 +01:00
crt Fix the MSVC version of ldexp filling up the FPU stack and bailing out with #IND after a few calls. Additionally, add it back to libcntpr. 2019-03-03 16:11:27 +01:00
cryptlib
debugsup
delayimp
dmilib
dnslib
drivers [RXCE] Fix leftover 2019-01-03 16:59:45 +01:00
dxguid
epsapi
evtlib
fast486 [REACTOS] Fix misc 64 bit issues (#783) 2019-01-05 10:50:11 +01:00
fslib [VFATLIB] Don't forcibly delete LFN when not in RW mode 2019-02-14 10:13:32 +01:00
gcc_ssp
inflib
ioevent
lsalib
nt
ppcmmu
pseh
rossym
rossym_new
rtl [RTL] Fix GCC build. 2019-02-17 09:59:49 +01:00
runtmchk
scrnsave
skiplist
smlib
strmiids
tdilib
udmihelp
uuid
wdmguid
CMakeLists.txt