Go to the source code of this file.
Functions | |
BOOL | IsMathCoprocInstalled () |
Gives a hint to those that need to know things about FPU performance. |
|
Gives a hint to those that need to know things about FPU performance.
Definition at line 213 of file f16spec.cpp. 00214 { 00215 #if defined(__WXMSW__) 00216 // the theoretically proper way to detect an FPU is to delve into the reigstry thus: 00217 // NT entry lives at HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\FloatingPointProcessor\0 00218 // W95 entry lives at HKEY_LOCAL_MACHINE\Enum\Root\*PNP0C01\0000NDP (M7 liable to change) 00219 // W32s is only available by thunking to WinFlags() (ug). 00220 // Instead, we use a tiny bit of .asm, as suggested by Mr-Asm himself, Gavin 00221 00222 WORD RegCR0; 00223 _asm 00224 { 00225 smsw RegCR0 // bit 2 of CR0 is the EM bit, set for emulation 00226 } 00227 00228 return (RegCR0 & 4) ? FALSE : TRUE; 00229 #else 00230 return TRUE; 00231 #endif 00232 }
|