Search code examples
windowsdebuggingflagscpu-registersfpu

Tools for seeing fpu registers?


I can use a Debugger like the one included in vc 2015 and attach to a running process, pause it and look at the current values of the Registers. Is there a way to also see the fpu Registers and the flags set by _control87() or _controlfp() ?


Solution

  • Yes, the debugger has a window for that, use Debug > Windows > Registers. Right-click it and tick "Floating point", you'll now see the 8 STx registers and the CTRL register, the one affected by _controlfp().

    Do beware that the FPU doesn't get used much anymore. The C/C++ compiler in VS2015 for example no longer generates FPU instructions and hasn't done so since VS2010. You can add the SSE, SSE2 and AVX registers with that same context menu. And beware that the flags you pass to _controlfp() don't have the same value as the bits in fpu's CTRL and sse's MXCSR register.