mirror of
https://github.com/opnsense/src.git
synced 2026-07-05 15:26:58 -04:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Reference in a new issue