mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
remove memory in the clobber list because rdtsp is a serializing instr.
This commit is contained in:
parent
95f51da71f
commit
692920ff93
1 changed files with 1 additions and 10 deletions
|
@ -62,24 +62,15 @@ void reschedule(void);
|
|||
|
||||
static char* buff[M];
|
||||
|
||||
#if 0
|
||||
inline static unsigned long long rdtsc(void)
|
||||
{
|
||||
unsigned long lo, hi;
|
||||
asm volatile ("rdtsc" : "=a"(lo), "=d"(hi) :: "memory");
|
||||
return ((unsigned long long) hi << 32ULL | (unsigned long long) lo);
|
||||
}
|
||||
#else
|
||||
inline static unsigned long long rdtsc(void)
|
||||
{
|
||||
unsigned int lo, hi;
|
||||
unsigned int id;
|
||||
|
||||
asm volatile ("rdtscp" : "=a"(lo), "=c"(id), "=d"(hi) :: "memory");
|
||||
asm volatile ("rdtscp" : "=a"(lo), "=c"(id), "=d"(hi));
|
||||
|
||||
return ((unsigned long long)hi << 32ULL | (unsigned long long)lo);
|
||||
}
|
||||
#endif
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue