mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
Fix ogl screenshots for windows.
Fix the macosx build (perhaps). This changes the JitIL timed profiling to using assembly language to obtain the time. It does seem to be faster. Not sure if it will work on macosx, but if it does it has the necessary precision that gettimeofday does not have. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6448 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -162,12 +162,14 @@ ps_adds1
|
||||
#include <intrin.h>
|
||||
#else
|
||||
#include <memory>
|
||||
static inline u64 __rdtsc()
|
||||
#include <stdint.h>
|
||||
static inline uint64_t __rdtsc()
|
||||
{
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
|
||||
|
||||
return (ts.tv_sec * 100000000 + ts.tv_nsec);
|
||||
uint32_t lo, hi;
|
||||
__asm__ __volatile__ ("xorl %%eax,%%eax \n cpuid"
|
||||
::: "%rax", "%rbx", "%rcx", "%rdx");
|
||||
__asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
|
||||
return (uint64_t)hi << 32 | lo;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user