The Win32 VM assumes that floating point exceptions are
disabled and will not function properly if FP exceptions are enabled. It relies
on the VC++ startup code for the JAVAI DLL to disable these exceptions
and set other bits in the Machine Status Word (MSW) of the floating point
unit. This assumption is a dangerous one. If an application links to
javai.dll and other DLLs, it is possible that the load order of the DLLs will
be such that another DLL is loaded *AFTER* javai.dll. JAVAI's initialization code will disable floating point exceptions, but another DLL's
initialization code might enable some of them. It turns out that DLLs built
with Borland C++ set the MSW differently (different precision and some
exceptions). Other compilers may make different assumptions (there is
nothing in the Win32 execution model that dictates how these should be
set). So it is quite possible that some DLL will set the MSW to something
incompatible with the VM.
disabled and will not function properly if FP exceptions are enabled. It relies
on the VC++ startup code for the JAVAI DLL to disable these exceptions
and set other bits in the Machine Status Word (MSW) of the floating point
unit. This assumption is a dangerous one. If an application links to
javai.dll and other DLLs, it is possible that the load order of the DLLs will
be such that another DLL is loaded *AFTER* javai.dll. JAVAI's initialization code will disable floating point exceptions, but another DLL's
initialization code might enable some of them. It turns out that DLLs built
with Borland C++ set the MSW differently (different precision and some
exceptions). Other compilers may make different assumptions (there is
nothing in the Win32 execution model that dictates how these should be
set). So it is quite possible that some DLL will set the MSW to something
incompatible with the VM.