diff options
author | richard <none@none> | 2010-01-15 19:15:27 -0800 |
---|---|---|
committer | richard <none@none> | 2010-01-15 19:15:27 -0800 |
commit | 798e33767f89bac520d6598259f003680d64d4da (patch) | |
tree | 7b2aba890be0c6aa0899d599685f3beb22132bf6 /indra/llcommon/llfasttimer.h | |
parent | 9e506e499c5bb993e0e5e4980f999a5ef5132c1c (diff) |
fix for gcc build
Diffstat (limited to 'indra/llcommon/llfasttimer.h')
-rw-r--r-- | indra/llcommon/llfasttimer.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index 15787a7445..cd76bfe709 100644 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -96,6 +96,24 @@ inline U64 get_cpu_clock_count_64() } return ret_val; } +#else +#define LL_INLINE +#endif +
+#if (LL_LINUX || LL_SOLARIS || LL_DARWIN) && (defined(__i386__) || defined(__amd64__))
+inline U32 get_cpu_clock_count_32()
+{
+ U64 x;
+ __asm__ volatile (".byte 0x0f, 0x31": "=A"(x));
+ return (U32)x >> 8;
+}
+
+inline U32 get_cpu_clock_count_64()
+{
+ U64 x;
+ __asm__ volatile (".byte 0x0f, 0x31": "=A"(x));
+ return x >> 8;
+}
#endif #if ( LL_DARWIN && !(defined(__i386__) || defined(__amd64__))) || (LL_SOLARIS && defined(__sparc__)) |