diff options
| author | Shawn Hoffman <godisgovernment@gmail.com> | 2022-07-18 21:45:27 -0700 |
|---|---|---|
| committer | Shawn Hoffman <godisgovernment@gmail.com> | 2022-07-25 21:21:11 -0700 |
| commit | 76b4318b88cb952750da158809e68274adbd9493 (patch) | |
| tree | 2e3faf2776a3f9872460ea352fe63b18c075399c /Source/UnitTests/Common/x64EmitterTest.cpp | |
| parent | e4ff49769c687e892219dab628ad5c7850efa49d (diff) | |
CPUDetect: improve win/arm64 support
read brand_string on macos/arm64
remove unused flags
report family/model info instead of vendor name
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); |
