From a7e97daa8681363e06769dcee1e88aefef31b455 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 6 Feb 2021 13:41:53 +0200 Subject: [PATCH] - added detection of a few x86 extended CPU instructions i hope this will make some people a bit happier --- src/common/utility/x86.cpp | 3 +++ src/common/utility/x86.h | 31 ++++++++++++++++++++++++++++--- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/common/utility/x86.cpp b/src/common/utility/x86.cpp index d674ea24d6..2988bbb35e 100644 --- a/src/common/utility/x86.cpp +++ b/src/common/utility/x86.cpp @@ -252,6 +252,9 @@ FString DumpCPUInfo(const CPUInfo *cpu) if (cpu->bSSSE3) out += (" SSSE3"); if (cpu->bSSE41) out += (" SSE4.1"); if (cpu->bSSE42) out += (" SSE4.2"); + if (cpu->bAVX) out += (" AVX"); + if (cpu->bF16C) out += (" F16C"); + if (cpu->bFMA3) out += (" FMA3"); if (cpu->b3DNow) out += (" 3DNow!"); if (cpu->b3DNowPlus) out += (" 3DNow!+"); if (cpu->HyperThreading) out += (" HyperThreading"); diff --git a/src/common/utility/x86.h b/src/common/utility/x86.h index d466d2996a..7a676078ea 100644 --- a/src/common/utility/x86.h +++ b/src/common/utility/x86.h @@ -33,12 +33,37 @@ struct CPUInfo // 92 bytes uint8_t APICID; uint32_t bSSE3:1; - uint32_t DontCare1:8; + uint32_t bPCLMULQDQ:1; + uint32_t bDTES64:1; + uint32_t bMONITOR:1; + uint32_t bDSCPL:1; + uint32_t bVMX:1; + uint32_t bSMX:1; + uint32_t bEST:1; + uint32_t bTM2:1; uint32_t bSSSE3:1; - uint32_t DontCare1a:9; + uint32_t bCNXTID:1; + uint32_t bSDBG:1; + uint32_t bFMA3:1; + uint32_t bCX16:1; + uint32_t bXTPR:1; + uint32_t bPDCM:1; + uint32_t Reverved1:1; + uint32_t bPCID:1; + uint32_t bDCA:1; uint32_t bSSE41:1; uint32_t bSSE42:1; - uint32_t DontCare2a:11; + uint32_t bX2APIC:1; + uint32_t bMOVBE:1; + uint32_t bPOPCNT:1; + uint32_t bTSCDL:1; + uint32_t bAES:1; + uint32_t bXSAVE:1; + uint32_t bOSXSAVE:1; + uint32_t bAVX:1; + uint32_t bF16C:1; + uint32_t bRDRND:1; + uint32_t bHypervisor:1; uint32_t bFPU:1; uint32_t bVME:1;