Changeset View
Changeset View
Standalone View
Standalone View
sys/i386/include/cpufunc.h
Show First 20 Lines • Show All 397 Lines • ▼ Show 20 Lines | |||||
rdtscp(void) | rdtscp(void) | ||||
{ | { | ||||
uint64_t rv; | uint64_t rv; | ||||
__asm __volatile("rdtscp" : "=A" (rv) : : "ecx"); | __asm __volatile("rdtscp" : "=A" (rv) : : "ecx"); | ||||
return (rv); | return (rv); | ||||
} | } | ||||
static __inline uint64_t | |||||
rdtscp_aux(uint32_t *aux) | |||||
{ | |||||
uint64_t rv; | |||||
__asm __volatile("rdtscp" : "=A" (rv), "=c" (*aux)); | |||||
return (rv); | |||||
markj: Why not use the `=A` constraint here like the other intrinsics do? | |||||
} | |||||
static __inline uint32_t | static __inline uint32_t | ||||
rdtsc32(void) | rdtsc32(void) | ||||
{ | { | ||||
uint32_t rv; | uint32_t rv; | ||||
__asm __volatile("rdtsc" : "=a" (rv) : : "edx"); | __asm __volatile("rdtsc" : "=a" (rv) : : "edx"); | ||||
return (rv); | return (rv); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 420 Lines • Show Last 20 Lines |
Why not use the =A constraint here like the other intrinsics do?