[ODE] Denormal Floating Values

Jon Watte hplus-ode at mindcontrol.org
Wed Mar 17 09:20:14 MST 2004


> > Also, setting the floating point control word to use 64-bit registers instead of
> > 80-bit registers will be necessary if you want similar operation across 
> > architectures.

> VC offers a compilerswitch "/Op", that improves the consistency of
> floating point operations .. but didn't improve the results.

That's not what I'm talking about. That option is mostly useless.

You need to use fldcw to load the control word, then twiddle the bits you want twiddled, then use fnstcw to store the changed word back. Note that storing the control word and then immediately doing floating point operation can cause hundreds (!) of cycles of stalling out, just like EMMS, on some CPUs, so only do this once per frame.

Cheers,

			/ h+




More information about the ODE mailing list