mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-21 20:59:09 +00:00
Mingw fixes for ProfileManager.
This commit is contained in:
@ -40,10 +40,16 @@ static UInt32 gCyclesPerMS = 0;
|
|||||||
#pragma warning (push)
|
#pragma warning (push)
|
||||||
#pragma warning (disable : 4035) // disable no return value warning
|
#pragma warning (disable : 4035) // disable no return value warning
|
||||||
|
|
||||||
__forceinline UInt32 GetPentiumCounter()
|
#ifdef _MSC_VER
|
||||||
|
#define forceinline __forceinline
|
||||||
|
#else
|
||||||
|
#define forceinline inline
|
||||||
|
#endif
|
||||||
|
|
||||||
|
forceinline UInt32 GetPentiumCounter()
|
||||||
{
|
{
|
||||||
__asm
|
#ifdef _MSC_VER
|
||||||
{
|
__asm {
|
||||||
xor eax,eax // VC won't realize that eax is modified w/out this
|
xor eax,eax // VC won't realize that eax is modified w/out this
|
||||||
// instruction to modify the val.
|
// instruction to modify the val.
|
||||||
// Problem shows up in release mode builds
|
// Problem shows up in release mode builds
|
||||||
@ -52,6 +58,7 @@ __forceinline UInt32 GetPentiumCounter()
|
|||||||
|
|
||||||
xor edx,edx // so VC gets that edx is modified
|
xor edx,edx // so VC gets that edx is modified
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning (pop)
|
#pragma warning (pop)
|
||||||
|
Reference in New Issue
Block a user