x86 tsc: mark %eax as earlyclobber in tscp_get_timecount_low().
i386 codegen insists on preloading tc_priv into register on i386, and this register cannot be %eax because RDTSCP instruction clobbers it before it is used. Reported and tested by: dim MFC after: 6 days Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
148a227bf8
commit
a013e285df
@ -826,7 +826,7 @@ tscp_get_timecount_low(struct timecounter *tc)
|
||||
uint32_t rv;
|
||||
|
||||
__asm __volatile("rdtscp; movl %1, %%ecx; shrd %%cl, %%edx, %0"
|
||||
: "=a" (rv) : "m" (tc->tc_priv) : "ecx", "edx");
|
||||
: "=&a" (rv) : "m" (tc->tc_priv) : "ecx", "edx");
|
||||
return (rv);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user