diff options
author | 2009-09-06 23:30:26 +0000 | |
---|---|---|
committer | 2009-09-06 23:30:26 +0000 | |
commit | f60bbef0707457417c73569c6f24851601692248 (patch) | |
tree | 7e8ac34521b14f41d9b4dc7e5afbdb2109dfbe8d /src/emu/eigccx86.h | |
parent | c01df88b6dd6d75bdeb432288336b59404e7c734 (diff) |
Rename osd_profiling_ticks() to get_profile_ticks(). Moved implemention into
inline functions in eminline.h and the ei* functions. [couriersud, Aaron Giles]
Diffstat (limited to 'src/emu/eigccx86.h')
-rw-r--r-- | src/emu/eigccx86.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/emu/eigccx86.h b/src/emu/eigccx86.h index 4be2f3ee474..2d9107c55d8 100644 --- a/src/emu/eigccx86.h +++ b/src/emu/eigccx86.h @@ -644,4 +644,28 @@ _atomic_decrement32(INT32 volatile *ptr) return result - 1; } + + +/*************************************************************************** + INLINE TIMING FUNCTIONS +***************************************************************************/ + +/*------------------------------------------------- + get_profile_ticks - return a tick counter + from the processor that can be used for + profiling. It does not need to run at any + particular rate. +-------------------------------------------------*/ + +#define get_profile_ticks _get_profile_ticks +INLINE INT64 ATTR_UNUSED ATTR_FORCE_INLINE _get_profile_ticks(void) +{ + UINT64 result; + __asm__ __volatile__ ( + "rdtsc" + : "=A" (result) + ); + return (INT64) (result & U64(0x7fffffffffffffff)); +} + #endif /* __EIGCCX86__ */ |