bb31125c94
CPUID is part of x86_64 ISA to query CPU features. In order to determine AVX512F ISA extension, EAX and ECX needs to be set to 7 and 0 respectively before invoking `cpuid` instruction. This commit also removes inline assembly for __cpuid in favor of using compiler provided intrinsic functions. Both GCC and clang provides __cpuid like function via __cpuid_count intrinsic. This commit also creates a portable wrapper over compiler intrinsic functions, __cpuid and __cpuidex. `cpuid' provides base level ISA query and `cpuidex` provides extra extension information like AVX512F. These wrappers lean towards MSVC like API. References: CPUID Docs: https://en.wikipedia.org/wiki/CPUID GCC's ``docs" on __cpuid_count: https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config/i386/cpuid.h Clang's docs on __cpuid_count: https://clang.llvm.org/doxygen/cpuid_8h.html MSVC's docs on __cpuid and __cpuidex: https://learn.microsoft.com/en-us/cpp/intrinsics/cpuid-cpuidex |
||
---|---|---|
.. | ||
boost-debug | ||
msvc | ||
MSVCpbd | ||
pbd | ||
test | ||
base_ui.cc | ||
basename.cc | ||
boost_debug.cc | ||
cartesian.cc | ||
ChangeLog | ||
cocoa_open_uri.mm | ||
command.cc | ||
configuration_variable.cc | ||
controllable.cc | ||
convert.cc | ||
COPYING | ||
cpus.cc | ||
crossthread.cc | ||
crossthread.posix.cc | ||
crossthread.win.cc | ||
debug_rt_alloc.c | ||
debug.cc | ||
demangle.cc | ||
downloader.cc | ||
enums.cc | ||
enumwriter.cc | ||
epa.cc | ||
error.cc | ||
event_loop.cc | ||
ffs.cc | ||
file_archive.cc | ||
file_utils.cc | ||
fpu.cc | ||
glib_event_source.cc | ||
id.cc | ||
inflater.cc | ||
libpbd.pc.in | ||
libpbd.spec.in | ||
locale_guard.cc | ||
localtime_r.cc | ||
malign.cc | ||
md5.cc | ||
microseconds.cc | ||
mountpoint.cc | ||
openuri.cc | ||
pathexpand.cc | ||
pbd.cc | ||
pcg_rand.cc | ||
pool.cc | ||
property_list.cc | ||
pthread_utils.cc | ||
reallocpool.cc | ||
receiver.cc | ||
resource.cc | ||
run-tests.sh | ||
search_path.cc | ||
semutils.cc | ||
shortpath.cc | ||
signals.cc | ||
spinlock.cc | ||
stacktrace.cc | ||
stateful_diff_command.cc | ||
stateful.cc | ||
string_convert.cc | ||
strreplace.cc | ||
strsplit.cc | ||
system_exec.cc | ||
textreceiver.cc | ||
timer.cc | ||
timing.cc | ||
tlsf.cc | ||
transmitter.cc | ||
undo.cc | ||
uuid.cc | ||
whitespace.cc | ||
windows_mmcss.cc | ||
windows_special_dirs.cc | ||
windows_timer_utils.cc | ||
wscript | ||
xml++.cc |