We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6d59b47 + 5b70ae3 commit 3593fadCopy full SHA for 3593fad
opal/include/opal/sys/amd64/timer.h
@@ -61,16 +61,18 @@ opal_sys_timer_get_cycles(void)
61
62
static inline bool opal_sys_timer_is_monotonic (void)
63
{
64
- int32_t cpuid1, cpuid2, tmp;
+ int64_t tmp;
65
+ int32_t cpuid1, cpuid2;
66
const int32_t level = 0x80000007;
67
+
68
/* cpuid clobbers ebx but it must be restored for -fPIC so save
69
* then restore ebx */
- __asm__ volatile ("xchgl %%ebx, %2\n"
70
+ __asm__ volatile ("xchg %%rbx, %2\n"
71
"cpuid\n"
- "xchgl %%ebx, %2\n":
72
+ "xchg %%rbx, %2\n":
73
"=a" (cpuid1), "=d" (cpuid2), "=r" (tmp) :
74
"a" (level) :
- "ecx");
75
+ "ecx", "ebx");
76
/* bit 8 of edx contains the invariant tsc flag */
77
return !!(cpuid2 & (1 << 8));
78
}
0 commit comments