fix: correct rdtsc edits

main
Sean McBride 5 years ago
parent bff1245572
commit 055d76e0ae

@ -2,7 +2,7 @@
#define SFRT_UTIL_H #define SFRT_UTIL_H
/** /**
* Get CPU time in cycles using the Intel instruction util__rdtsc * Get CPU time in cycles using the Intel instruction rdtsc
* @return CPU time in cycles * @return CPU time in cycles
**/ **/
static unsigned long long int static unsigned long long int

@ -190,7 +190,7 @@ env_cos(double d)
} }
INLINE unsigned long long INLINE unsigned long long
env_util__rdtsc(void) env_rdtsc(void)
{ {
return util__rdtsc(); return util__rdtsc();
} }

@ -17,7 +17,7 @@ get_time()
unsigned long long int ret = 0; unsigned long long int ret = 0;
unsigned int cycles_lo; unsigned int cycles_lo;
unsigned int cycles_hi; unsigned int cycles_hi;
__asm__ volatile ("util__rdtsc" : "=a" (cycles_lo), "=d" (cycles_hi)); __asm__ volatile ("rdtsc" : "=a" (cycles_lo), "=d" (cycles_hi));
ret = (unsigned long long int)cycles_hi << 32 | cycles_lo; ret = (unsigned long long int)cycles_hi << 32 | cycles_lo;
return ret; return ret;

Loading…
Cancel
Save