#pragma once #include <stdint.h> #if defined(__GNUC__) #include <cpuid.h> #elif defined(_MSC_VER) #include <intrin.h> #endif #if CPUINFO_MOCK #include <cpuinfo-mock.h> #endif #include <x86/api.h> #if defined(__GNUC__) || defined(_MSC_VER) static inline struct cpuid_regs cpuid(uint32_t eax) { … } static inline struct cpuid_regs cpuidex(uint32_t eax, uint32_t ecx) { … } #endif static inline uint64_t xgetbv(uint32_t ext_ctrl_reg) { … }