Tell the compiler that rdtscp clobbers %ecx.

This commit is contained in:
markj 2018-06-09 18:31:19 +00:00
parent d06e21760c
commit e402a8384b
2 changed files with 2 additions and 2 deletions

View File

@ -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));
}

View File

@ -373,7 +373,7 @@ rdtscp(void)
{
uint64_t rv;
__asm __volatile("rdtscp" : "=A" (rv));
__asm __volatile("rdtscp" : "=A" (rv) : : "ecx");
return (rv);
}