diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index 7123e7b8f58a..a0ea1b2f1701 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -391,7 +391,7 @@ rdtscp(void) { uint32_t low, high; - __asm __volatile("rdtscp" : "=a" (low), "=d" (high)); + __asm __volatile("rdtscp" : "=a" (low), "=d" (high) : : "ecx"); return (low | ((uint64_t)high << 32)); } diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index 44ba3ff4c4a3..da9a3e3a0869 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -373,7 +373,7 @@ rdtscp(void) { uint64_t rv; - __asm __volatile("rdtscp" : "=A" (rv)); + __asm __volatile("rdtscp" : "=A" (rv) : : "ecx"); return (rv); }