diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2022-07-26 12:52:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-26 12:52:50 +0200 |
| commit | 6b419c7ca3e3ed5fcb208f87fa352d5860c28adc (patch) | |
| tree | d9e91e6c5891847d07d40b583f6504e06971a91e /Source/UnitTests/Common/x64EmitterTest.cpp | |
| parent | 9d15a1c5a1e6183a0e98165ac093e74ca8e4894e (diff) | |
| parent | 76b4318b88cb952750da158809e68274adbd9493 (diff) | |
Merge pull request #10876 from shuffle2/cpudetect
CPUDetect: improve win/arm64 support
Diffstat (limited to 'Source/UnitTests/Common/x64EmitterTest.cpp')
| -rw-r--r-- | Source/UnitTests/Common/x64EmitterTest.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/Source/UnitTests/Common/x64EmitterTest.cpp b/Source/UnitTests/Common/x64EmitterTest.cpp index 439ac5e9d6..79e5eea8a2 100644 --- a/Source/UnitTests/Common/x64EmitterTest.cpp +++ b/Source/UnitTests/Common/x64EmitterTest.cpp @@ -92,7 +92,31 @@ class x64EmitterTest : public testing::Test protected: void SetUp() override { - memset(&cpu_info, 0x01, sizeof(cpu_info)); + // Ensure settings are constant no matter on which actual hardware the test runs. + // Attempt to maximize complex code coverage. Note that this will miss some paths. + cpu_info.vendor = CPUVendor::Intel; + cpu_info.cpu_id = "GenuineIntel"; + cpu_info.model_name = "Unknown"; + cpu_info.HTT = true; + cpu_info.num_cores = 8; + cpu_info.bSSE3 = true; + cpu_info.bSSSE3 = true; + cpu_info.bSSE4_1 = true; + cpu_info.bSSE4_2 = true; + cpu_info.bLZCNT = true; + cpu_info.bAVX = true; + cpu_info.bBMI1 = true; + cpu_info.bBMI2 = true; + cpu_info.bBMI2FastParallelBitOps = true; + cpu_info.bFMA = true; + cpu_info.bFMA4 = true; + cpu_info.bAES = true; + cpu_info.bMOVBE = true; + cpu_info.bFlushToZero = true; + cpu_info.bAtom = false; + cpu_info.bCRC32 = true; + cpu_info.bSHA1 = true; + cpu_info.bSHA2 = true; emitter.reset(new X64CodeBlock()); emitter->AllocCodeSpace(4096); |
