Fix build under VC7
This commit is contained in:
parent
9ea1934097
commit
66b18f2dbd
@ -6,8 +6,10 @@
|
||||
#include <nvcore/nvcore.h>
|
||||
|
||||
#if NV_CC_MSVC
|
||||
#if _MSC_VER >= 1400
|
||||
# include <intrin.h> // __rdtsc
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
namespace nv
|
||||
@ -27,6 +29,16 @@ namespace nv
|
||||
};
|
||||
|
||||
#if NV_CC_MSVC
|
||||
#if _MSC_VER < 1400
|
||||
inline uint64 rdtsc()
|
||||
{
|
||||
uint64 t;
|
||||
__asm rdtsc
|
||||
__asm mov DWORD PTR [t], eax
|
||||
__asm mov DWORD PTR [t+4], edx
|
||||
return t;
|
||||
}
|
||||
#else
|
||||
#pragma intrinsic(__rdtsc)
|
||||
|
||||
inline uint64 rdtsc()
|
||||
@ -34,6 +46,7 @@ namespace nv
|
||||
return __rdtsc();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if NV_CC_GNUC
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user