]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Use ifunc to select the barrier instruction for RDTSC.
authorkib <kib@FreeBSD.org>
Thu, 7 Feb 2019 02:56:10 +0000 (02:56 +0000)
committerkib <kib@FreeBSD.org>
Thu, 7 Feb 2019 02:56:10 +0000 (02:56 +0000)
commit37387406493e76b36d7ef77b986894db4416502e
treedf02deea92cdd5b017c054647952c63fbbb87df3
parent47b24738b81eb479e169fe248afda102731a5207
Use ifunc to select the barrier instruction for RDTSC.

This optimizes out runtime switch and removes yet another cpuid from
libc.

Note that this is the first use of ifunc in i386 libc, so
ifunc-capable toolchain is required for building runnable userspace on
i386, same as on amd64.

Discussed with: emaste
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
lib/libc/x86/sys/__vdso_gettc.c