mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
- The variable the result of rdtsc is placed in also needs to be marked as volatile
to ensure that GCC doesn't optimize the function call away. SVN r1510 (trunk)
This commit is contained in:
parent
e59ee12f2a
commit
366ed7047a
1 changed files with 1 additions and 1 deletions
|
@ -130,7 +130,7 @@ inline volatile unsigned long long rdtsc()
|
|||
if (CPU.bRDTSC)
|
||||
#endif
|
||||
{
|
||||
register unsigned long long tsc asm("eax");
|
||||
register unsigned volatile long long tsc asm("eax");
|
||||
asm volatile ("\trdtsc\n" : : : "eax", "edx");
|
||||
return tsc;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue