diff --git a/Scripts/json_config_parse.py b/Scripts/json_config_parse.py index e3bc79558..d31abbd9a 100644 --- a/Scripts/json_config_parse.py +++ b/Scripts/json_config_parse.py @@ -63,8 +63,15 @@ class Mode(Flag) : MODE_64 = 1 class HostFeatures(Flag) : - ANY = 0 - AVX_ONLY = 1 + FEATURE_ANY = 0 + FEATURE_3DNOW = (1 << 0) + FEATURE_SSE4A = (1 << 1) + FEATURE_AVX = (1 << 2) + FEATURE_RAND = (1 << 3) + FEATURE_SHA = (1 << 4) + FEATURE_CLZERO = (1 << 5) + FEATURE_BMI1 = (1 << 6) + FEATURE_BMI2 = (1 << 7) RegStringLookup = { "NONE": Regs.REG_NONE, @@ -128,8 +135,14 @@ ModeStringLookup = { } HostFeaturesLookup = { - "ANY" : HostFeatures.ANY, - "AVX" : HostFeatures.AVX_ONLY, + "3DNOW" : HostFeatures.FEATURE_3DNOW, + "SSE4A" : HostFeatures.FEATURE_SSE4A, + "AVX" : HostFeatures.FEATURE_AVX, + "RAND" : HostFeatures.FEATURE_RAND, + "SHA" : HostFeatures.FEATURE_SHA, + "CLZERO" : HostFeatures.FEATURE_CLZERO, + "BMI1" : HostFeatures.FEATURE_BMI1, + "BMI2" : HostFeatures.FEATURE_BMI2, } def parse_hexstring(s): @@ -152,7 +165,7 @@ def parse_json(json_text, output_file): OptionIgnore = Regs.REG_NONE OptionABI = ABI.ABI_SYSTEMV OptionMode = Mode.MODE_64 - OptionHostFeatures = HostFeatures.ANY + OptionHostFeatures = HostFeatures.FEATURE_ANY OptionStackSize = 4096 OptionEntryPoint = 1 OptionRegData = {} @@ -208,10 +221,15 @@ def parse_json(json_text, output_file): if ("HOSTFEATURES" in json_object): data = json_object["HOSTFEATURES"] - data = data.upper() - if not (data in HostFeaturesLookup): - sys.exit("Invalid host feature") - OptionHostFeatures = HostFeaturesLookup[data] + if not (type(data) is list): + sys.exit("HostFeatures value must be list of features") + + for data_key in data: + data_key = data_key.upper() + if not (data_key in HostFeaturesLookup): + sys.exit("Invalid host feature") + + OptionHostFeatures |= HostFeaturesLookup[data_key] if ("STACKSIZE" in json_object): data = json_object["STACKSIZE"] diff --git a/Source/Tests/HarnessHelpers.h b/Source/Tests/HarnessHelpers.h index 2ea725437..761a2d528 100644 --- a/Source/Tests/HarnessHelpers.h +++ b/Source/Tests/HarnessHelpers.h @@ -374,7 +374,27 @@ namespace FEX::HarnessHelper { } bool Is64BitMode() const { return BaseConfig.OptionMode == 1; } - bool RequiresAVX() const { return BaseConfig.OptionHostFeatures == 1; } + + enum HostFeatures { + FEATURE_ANY = 0, + FEATURE_3DNOW = (1 << 0), + FEATURE_SSE4A = (1 << 1), + FEATURE_AVX = (1 << 2), + FEATURE_RAND = (1 << 3), + FEATURE_SHA = (1 << 4), + FEATURE_CLZERO = (1 << 5), + FEATURE_BMI1 = (1 << 6), + FEATURE_BMI2 = (1 << 7), + }; + + bool Requires3DNow() const { return BaseConfig.OptionHostFeatures & HostFeatures::FEATURE_3DNOW; } + bool RequiresSSE4A() const { return BaseConfig.OptionHostFeatures & HostFeatures::FEATURE_SSE4A; } + bool RequiresAVX() const { return BaseConfig.OptionHostFeatures & HostFeatures::FEATURE_AVX; } + bool RequiresRAND() const { return BaseConfig.OptionHostFeatures & HostFeatures::FEATURE_RAND; } + bool RequiresSHA() const { return BaseConfig.OptionHostFeatures & HostFeatures::FEATURE_SHA; } + bool RequiresCLZERO() const { return BaseConfig.OptionHostFeatures & HostFeatures::FEATURE_CLZERO; } + bool RequiresBMI1() const { return BaseConfig.OptionHostFeatures & HostFeatures::FEATURE_BMI1; } + bool RequiresBMI2() const { return BaseConfig.OptionHostFeatures & HostFeatures::FEATURE_BMI2; } private: FEX_CONFIG_OPT(ConfigDumpGPRs, DUMPGPRS); @@ -506,7 +526,14 @@ namespace FEX::HarnessHelper { } bool Is64BitMode() const { return Config.Is64BitMode(); } - bool RequiresAVX() const { return Config.RequiresAVX(); } + bool Requires3DNow() const { return Config.Requires3DNow(); } + bool RequiresSSE4A() const { return Config.RequiresSSE4A(); } + bool RequiresAVX() const { return Config.RequiresAVX(); } + bool RequiresRAND() const { return Config.RequiresRAND(); } + bool RequiresSHA() const { return Config.RequiresSHA(); } + bool RequiresCLZERO() const { return Config.RequiresCLZERO(); } + bool RequiresBMI1() const { return Config.RequiresBMI1(); } + bool RequiresBMI2() const { return Config.RequiresBMI2(); } private: constexpr static uint64_t STACK_SIZE = FHU::FEX_PAGE_SIZE; diff --git a/Source/Tests/TestHarnessRunner.cpp b/Source/Tests/TestHarnessRunner.cpp index 0239d033e..a6d3a4ecc 100644 --- a/Source/Tests/TestHarnessRunner.cpp +++ b/Source/Tests/TestHarnessRunner.cpp @@ -139,7 +139,7 @@ int main(int argc, char **argv, char **const envp) { FEX_CONFIG_OPT(Core, CORE); std::unique_ptr Allocator; - + if (!Loader.Is64BitMode()) { // Setup our userspace allocator uint32_t KernelVersion = FEX::HLE::SyscallHandler::CalculateHostKernelVersion(); @@ -159,6 +159,32 @@ int main(int argc, char **argv, char **const envp) { bool DidFault = false; bool SupportsAVX = false; FEXCore::Core::CPUState State; + + FEXCore::Context::InitializeStaticTables(Loader.Is64BitMode() ? FEXCore::Context::MODE_64BIT : FEXCore::Context::MODE_32BIT); + + auto CTX = FEXCore::Context::CreateNewContext(); + + FEXCore::Context::InitializeContext(CTX); + + // Skip any tests that the host doesn't support features for + auto HostFeatures = FEXCore::Context::GetHostFeatures(CTX); + SupportsAVX = HostFeatures.SupportsAVX; + + bool TestUnsupported = + (!HostFeatures.Supports3DNow && Loader.Requires3DNow()) || + (!HostFeatures.SupportsSSE4A && Loader.RequiresSSE4A()) || + (!SupportsAVX && Loader.RequiresAVX()) || + (!HostFeatures.SupportsRAND && Loader.RequiresRAND()) || + (!HostFeatures.SupportsSHA && Loader.RequiresSHA()) || + (!HostFeatures.SupportsCLZERO && Loader.RequiresCLZERO()) || + (!HostFeatures.SupportsBMI1 && Loader.RequiresBMI1()) || + (!HostFeatures.SupportsBMI2 && Loader.RequiresBMI2()); + + if (TestUnsupported) { + FEXCore::Context::DestroyContext(CTX); + return 0; + } + if (Core != FEXCore::Config::CONFIG_CUSTOM) { jmp_buf LongJump{}; int LongJumpVal{}; @@ -175,12 +201,6 @@ int main(int argc, char **argv, char **const envp) { }, true); // Run through FEX - FEXCore::Context::InitializeStaticTables(Loader.Is64BitMode() ? FEXCore::Context::MODE_64BIT : FEXCore::Context::MODE_32BIT); - - auto CTX = FEXCore::Context::CreateNewContext(); - - FEXCore::Context::InitializeContext(CTX); - auto SyscallHandler = Loader.Is64BitMode() ? FEX::HLE::x64::CreateHandler(CTX, SignalDelegation.get()) : FEX::HLE::x32::CreateHandler(CTX, SignalDelegation.get(), std::move(Allocator)); @@ -195,14 +215,13 @@ int main(int argc, char **argv, char **const envp) { FEXCore::Context::SetSignalDelegator(CTX, SignalDelegation.get()); FEXCore::Context::SetSyscallHandler(CTX, SyscallHandler.get()); + bool Result1 = FEXCore::Context::InitCore(CTX, Loader.DefaultRIP(), Loader.GetStackPointer()); if (!Result1) { return 1; } - SupportsAVX = FEXCore::Context::GetHostFeatures(CTX).SupportsAVX; - LongJumpVal = setjmp(LongJump); if (!LongJumpVal) { FEXCore::Context::RunUntilExit(CTX); @@ -212,8 +231,6 @@ int main(int argc, char **argv, char **const envp) { FEXCore::Context::GetCPUState(CTX, &State); SyscallHandler.reset(); - FEXCore::Context::DestroyContext(CTX); - FEXCore::Context::ShutdownStaticTables(); } else { // Run as host SupportsAVX = true; @@ -227,12 +244,15 @@ int main(int argc, char **argv, char **const envp) { RunAsHost(SignalDelegation, Loader.DefaultRIP(), Loader.GetStackPointer(), &State); } + FEXCore::Context::DestroyContext(CTX); + FEXCore::Context::ShutdownStaticTables(); + bool Passed = !DidFault && Loader.CompareStates(&State, nullptr, SupportsAVX); LogMan::Msg::IFmt("Faulted? {}", DidFault ? "Yes" : "No"); LogMan::Msg::IFmt("Passed? {}", Passed ? "Yes" : "No"); - + SignalDelegation.reset(); FEXCore::Config::Shutdown(); diff --git a/unittests/ASM/3DNow/0C.asm b/unittests/ASM/3DNow/0C.asm index 6999df3f1..0caee7af7 100644 --- a/unittests/ASM/3DNow/0C.asm +++ b/unittests/ASM/3DNow/0C.asm @@ -5,7 +5,8 @@ "MM1": ["0x43000000c3000000", "0x0"], "MM2": ["0xc700000046fffe00", "0x0"], "MM3": ["0x0", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/0D.asm b/unittests/ASM/3DNow/0D.asm index 0ac480bbb..6bf49715e 100644 --- a/unittests/ASM/3DNow/0D.asm +++ b/unittests/ASM/3DNow/0D.asm @@ -5,7 +5,8 @@ "MM1": ["0x43000000c3000000", "0x0"], "MM2": ["0xbf8000003f800000", "0x0"], "MM3": ["0x0", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/0E.asm b/unittests/ASM/3DNow/0E.asm index af33b31d8..a4a9f75df 100644 --- a/unittests/ASM/3DNow/0E.asm +++ b/unittests/ASM/3DNow/0E.asm @@ -2,7 +2,8 @@ { "RegData": { "RAX": "0xFFFF" - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/1C.asm b/unittests/ASM/3DNow/1C.asm index 3f2a0d0cf..c1ff0750e 100644 --- a/unittests/ASM/3DNow/1C.asm +++ b/unittests/ASM/3DNow/1C.asm @@ -5,7 +5,8 @@ "MM1": ["0x00000080FFFFFF80", "0x0"], "MM2": ["0xFFFF800000007FFF", "0x0"], "MM3": ["0x0", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/1D.asm b/unittests/ASM/3DNow/1D.asm index 1489cf75a..0a1f51c7f 100644 --- a/unittests/ASM/3DNow/1D.asm +++ b/unittests/ASM/3DNow/1D.asm @@ -5,7 +5,8 @@ "MM1": ["0x00000080FFFFFF80", "0x0"], "MM2": ["0xFFFFFFFF00000001", "0x0"], "MM3": ["0x0", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/86.asm b/unittests/ASM/3DNow/86.asm index 0080ba9fb..815ed5315 100644 --- a/unittests/ASM/3DNow/86.asm +++ b/unittests/ASM/3DNow/86.asm @@ -4,7 +4,8 @@ "MM0": ["0x3f800000bf800000", "0x0"], "MM1": ["0x3c000000bc000000", "0x0"], "MM2": ["0xbf8000003f800000", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/87.asm b/unittests/ASM/3DNow/87.asm index dfb00777b..f98fcac39 100644 --- a/unittests/ASM/3DNow/87.asm +++ b/unittests/ASM/3DNow/87.asm @@ -4,7 +4,8 @@ "MM0": ["0x3e8000003f800000", "0x0"], "MM1": ["0x3e4ccccd3f000000", "0x0"], "MM2": ["0x3f8000003eaaaaab", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/8A.asm b/unittests/ASM/3DNow/8A.asm index 031dcb82d..af9caf975 100644 --- a/unittests/ASM/3DNow/8A.asm +++ b/unittests/ASM/3DNow/8A.asm @@ -3,7 +3,8 @@ "RegData": { "MM0": ["0x44000000c0000000", "0x0"], "MM1": ["0x44800000c3800000", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/8E.asm b/unittests/ASM/3DNow/8E.asm index b44826c47..2c14b91b9 100644 --- a/unittests/ASM/3DNow/8E.asm +++ b/unittests/ASM/3DNow/8E.asm @@ -3,7 +3,8 @@ "RegData": { "MM0": ["0x00000000c0000000", "0x0"], "MM1": ["0x00000000c3800000", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/90.asm b/unittests/ASM/3DNow/90.asm index f1b8e9960..f75bb7f66 100644 --- a/unittests/ASM/3DNow/90.asm +++ b/unittests/ASM/3DNow/90.asm @@ -5,7 +5,8 @@ "MM1": ["0xFFFFFFFF00000000", "0x0"], "MM2": ["0xFFFFFFFFFFFFFFFF", "0x0"], "MM3": ["0x00000000FFFFFFFF", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/94.asm b/unittests/ASM/3DNow/94.asm index 4f59fc5b4..f18f94cb4 100644 --- a/unittests/ASM/3DNow/94.asm +++ b/unittests/ASM/3DNow/94.asm @@ -5,7 +5,8 @@ "MM1": "0x3f80000000000000", "MM2": "0x00000000bf800000", "MM3": "0x0" - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/96.asm b/unittests/ASM/3DNow/96.asm index fb91c97ac..0cb31ecb8 100644 --- a/unittests/ASM/3DNow/96.asm +++ b/unittests/ASM/3DNow/96.asm @@ -4,7 +4,8 @@ "MM0": ["0xbf800000bf800000", "0x0"], "MM1": ["0xbc000000bc000000", "0x0"], "MM2": ["0x3f8000003f800000", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/97.asm b/unittests/ASM/3DNow/97.asm index 79b976eb1..6c00647dc 100644 --- a/unittests/ASM/3DNow/97.asm +++ b/unittests/ASM/3DNow/97.asm @@ -4,7 +4,8 @@ "MM0": ["0x3f8000003f800000", "0x0"], "MM1": ["0x3f0000003f000000", "0x0"], "MM2": ["0x3eaaaaab3eaaaaab", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/9A.asm b/unittests/ASM/3DNow/9A.asm index 84ce53ae6..2a2b6b9ee 100644 --- a/unittests/ASM/3DNow/9A.asm +++ b/unittests/ASM/3DNow/9A.asm @@ -3,7 +3,8 @@ "RegData": { "MM0": ["0x43808000c3808000", "0x0"], "MM1": ["0x44200000c4200000", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/9E.asm b/unittests/ASM/3DNow/9E.asm index 55154afac..718c26d5a 100644 --- a/unittests/ASM/3DNow/9E.asm +++ b/unittests/ASM/3DNow/9E.asm @@ -3,7 +3,8 @@ "RegData": { "MM0": ["0xc37f0000437f0000", "0x0"], "MM1": ["0xc3c0000043c00000", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/A0.asm b/unittests/ASM/3DNow/A0.asm index d5ef745e9..427594bb0 100644 --- a/unittests/ASM/3DNow/A0.asm +++ b/unittests/ASM/3DNow/A0.asm @@ -5,7 +5,8 @@ "MM1": ["0xFFFFFFFF00000000", "0x0"], "MM2": ["0xFFFFFFFFFFFFFFFF", "0x0"], "MM3": ["0x00000000FFFFFFFF", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/A4.asm b/unittests/ASM/3DNow/A4.asm index 066d9efac..fbc8dd11b 100644 --- a/unittests/ASM/3DNow/A4.asm +++ b/unittests/ASM/3DNow/A4.asm @@ -5,7 +5,8 @@ "MM1": ["0x3f8000003f800000", "0x0"], "MM2": ["0x00000000bf800000", "0x0"], "MM3": ["0x3f8000003f800000", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/A6.asm b/unittests/ASM/3DNow/A6.asm index 803b06759..6ea1b786c 100644 --- a/unittests/ASM/3DNow/A6.asm +++ b/unittests/ASM/3DNow/A6.asm @@ -3,7 +3,8 @@ "RegData": { "MM0": ["0x9192939481828384", "0x0"], "MM1": ["0xB1B2B3B4A1A2A3A4", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/A7.asm b/unittests/ASM/3DNow/A7.asm index ea8a91b1f..80e403436 100644 --- a/unittests/ASM/3DNow/A7.asm +++ b/unittests/ASM/3DNow/A7.asm @@ -3,7 +3,8 @@ "RegData": { "MM0": ["0x9192939481828384", "0x0"], "MM1": ["0xB1B2B3B4A1A2A3A4", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/AA.asm b/unittests/ASM/3DNow/AA.asm index 32061e010..033b1a9af 100644 --- a/unittests/ASM/3DNow/AA.asm +++ b/unittests/ASM/3DNow/AA.asm @@ -3,7 +3,8 @@ "RegData": { "MM0": ["0xc380800043808000", "0x0"], "MM1": ["0xc420000044200000", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/AE.asm b/unittests/ASM/3DNow/AE.asm index 76bb06584..907f1cfb2 100644 --- a/unittests/ASM/3DNow/AE.asm +++ b/unittests/ASM/3DNow/AE.asm @@ -3,7 +3,8 @@ "RegData": { "MM0": ["0x0", "0x0"], "MM1": ["0x0", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/B0.asm b/unittests/ASM/3DNow/B0.asm index 6adeecabf..caab89237 100644 --- a/unittests/ASM/3DNow/B0.asm +++ b/unittests/ASM/3DNow/B0.asm @@ -5,7 +5,8 @@ "MM1": ["0xFFFFFFFF00000000", "0x0"], "MM2": ["0xFFFFFFFFFFFFFFFF", "0x0"], "MM3": ["0x00000000FFFFFFFF", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/B4.asm b/unittests/ASM/3DNow/B4.asm index 884cba0c2..f74fb1b38 100644 --- a/unittests/ASM/3DNow/B4.asm +++ b/unittests/ASM/3DNow/B4.asm @@ -3,7 +3,8 @@ "RegData": { "MM0": ["0xc3800000c3800000", "0x0"], "MM1": ["0xc7800000c7800000", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/B6.asm b/unittests/ASM/3DNow/B6.asm index a5752b5dd..9dcaec366 100644 --- a/unittests/ASM/3DNow/B6.asm +++ b/unittests/ASM/3DNow/B6.asm @@ -3,7 +3,8 @@ "RegData": { "MM0": ["0x9192939481828384", "0x0"], "MM1": ["0xB1B2B3B4A1A2A3A4", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/B7.asm b/unittests/ASM/3DNow/B7.asm index 63ddfa6bb..97bc57b81 100644 --- a/unittests/ASM/3DNow/B7.asm +++ b/unittests/ASM/3DNow/B7.asm @@ -5,7 +5,8 @@ "MM1": "0x0", "MM2": "0x3fff000100000001", "MM3": "0x0000000200000004" - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/BB.asm b/unittests/ASM/3DNow/BB.asm index 1e27c5672..94b0f36e9 100644 --- a/unittests/ASM/3DNow/BB.asm +++ b/unittests/ASM/3DNow/BB.asm @@ -3,7 +3,8 @@ "RegData": { "MM0": ["0x8182838491929394", "0x0"], "MM1": ["0xA1A2A3A4B1B2B3B4", "0x0"] - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/3DNow/BF.asm b/unittests/ASM/3DNow/BF.asm index 9dd2139ce..7179f1137 100644 --- a/unittests/ASM/3DNow/BF.asm +++ b/unittests/ASM/3DNow/BF.asm @@ -8,9 +8,7 @@ "MM4": "0x1ed68638699d35ca", "MM5": "0x165c42291f28194c" }, - "MemoryRegions": { - "0x100000000": "4096" - } + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/Disabled_Tests_ARMv8.0 b/unittests/ASM/Disabled_Tests_ARMv8.0 index b43681c64..30fd8e183 100644 --- a/unittests/ASM/Disabled_Tests_ARMv8.0 +++ b/unittests/ASM/Disabled_Tests_ARMv8.0 @@ -1,3 +1 @@ -# RNG tests unsupported on this runner -Test_Secondary/09_XX_06.asm -Test_Secondary/09_XX_07.asm +# Nothing here yet diff --git a/unittests/ASM/Disabled_Tests_ARMv8.2 b/unittests/ASM/Disabled_Tests_ARMv8.2 index b43681c64..30fd8e183 100644 --- a/unittests/ASM/Disabled_Tests_ARMv8.2 +++ b/unittests/ASM/Disabled_Tests_ARMv8.2 @@ -1,3 +1 @@ -# RNG tests unsupported on this runner -Test_Secondary/09_XX_06.asm -Test_Secondary/09_XX_07.asm +# Nothing here yet diff --git a/unittests/ASM/Disabled_Tests_ARMv8.4 b/unittests/ASM/Disabled_Tests_ARMv8.4 index b43681c64..30fd8e183 100644 --- a/unittests/ASM/Disabled_Tests_ARMv8.4 +++ b/unittests/ASM/Disabled_Tests_ARMv8.4 @@ -1,3 +1 @@ -# RNG tests unsupported on this runner -Test_Secondary/09_XX_06.asm -Test_Secondary/09_XX_07.asm +# Nothing here yet diff --git a/unittests/ASM/Disabled_Tests_host b/unittests/ASM/Disabled_Tests_host index 82a1b541d..c9ddbbe91 100644 --- a/unittests/ASM/Disabled_Tests_host +++ b/unittests/ASM/Disabled_Tests_host @@ -1,50 +1,10 @@ # Uses thunks Test_TwoByte/0F_3F.asm -# Intel doesn't support SSE4a, Technically neither does FEX -Test_REP/F3_2B.asm -Test_REPNE/F2_2B.asm - -# 3DNow! no longer exists on AMD Zen CPUs -Test_TwoByte/0F_0E.asm - -# Intel doesn't support CLZero, which the CI uses -Test_SecondaryModRM/Reg_7_4.asm -Test_SecondaryModRM/Reg_7_4_2.asm - # Not guaranteed to work in 64bit mode Test_Primary/Primary_8C.asm Test_Primary/Primary_8C_2.asm -# CI runners don't have 3DNow! -Test_3DNow/0C.asm -Test_3DNow/0D.asm -Test_3DNow/0E.asm -Test_3DNow/1C.asm -Test_3DNow/1D.asm -Test_3DNow/86.asm -Test_3DNow/87.asm -Test_3DNow/8A.asm -Test_3DNow/8E.asm -Test_3DNow/90.asm -Test_3DNow/94.asm -Test_3DNow/96.asm -Test_3DNow/97.asm -Test_3DNow/9A.asm -Test_3DNow/9E.asm -Test_3DNow/A0.asm -Test_3DNow/A4.asm -Test_3DNow/A6.asm -Test_3DNow/A7.asm -Test_3DNow/AA.asm -Test_3DNow/AE.asm -Test_3DNow/B0.asm -Test_3DNow/B4.asm -Test_3DNow/B6.asm -Test_3DNow/B7.asm -Test_3DNow/BB.asm -Test_3DNow/BF.asm - # Intel CI doesn't have a new enough kernel to support this Test_Secondary/15_F3_00.asm Test_Secondary/15_F3_01.asm @@ -52,13 +12,3 @@ Test_Secondary/15_F3_02.asm Test_Secondary/15_F3_03.asm Test_Secondary/15_F3_02_2.asm Test_Secondary/15_F3_03_2.asm - -# CI currently doesn't support the x86 SHA extensions -Test_H0F38/sha1msg1.asm -Test_H0F38/sha1msg2.asm -Test_H0F38/sha1nexte.asm -Test_H0F3A/sha1rnds4.asm -Test_H0F38/sha256msg1.asm -Test_H0F38/sha256msg2.asm -Test_H0F38/sha256rnds2.asm - diff --git a/unittests/ASM/Disabled_Tests_x64 b/unittests/ASM/Disabled_Tests_x64 index 36e42b872..30fd8e183 100644 --- a/unittests/ASM/Disabled_Tests_x64 +++ b/unittests/ASM/Disabled_Tests_x64 @@ -1,3 +1 @@ -# Intel doesn't support CLZero, which the CI uses -Test_SecondaryModRM/Reg_7_4.asm -Test_SecondaryModRM/Reg_7_4_2.asm +# Nothing here yet diff --git a/unittests/ASM/H0F38/sha1msg1.asm b/unittests/ASM/H0F38/sha1msg1.asm index f09412929..fc0c88006 100644 --- a/unittests/ASM/H0F38/sha1msg1.asm +++ b/unittests/ASM/H0F38/sha1msg1.asm @@ -3,7 +3,8 @@ "RegData": { "XMM1": ["0x5790A6E435CD1A3E", "0x3CEC3979BF41FAEF"], "XMM2": ["0x6868C3F3AAED56E0", "0xF0FCE9E294E6E6DE"] - } + }, + "HostFeatures": ["SHA"] } %endif diff --git a/unittests/ASM/H0F38/sha1msg2.asm b/unittests/ASM/H0F38/sha1msg2.asm index 7b098b53b..04a072d53 100644 --- a/unittests/ASM/H0F38/sha1msg2.asm +++ b/unittests/ASM/H0F38/sha1msg2.asm @@ -3,7 +3,8 @@ "RegData": { "XMM1": ["0x1B0233CC7FCDBB45", "0x1ECD2142EC058BF8"], "XMM2": ["0x6868C3F3AAED56E0", "0xF0FCE9E294E6E6DE"] - } + }, + "HostFeatures": ["SHA"] } %endif diff --git a/unittests/ASM/H0F38/sha1nexte.asm b/unittests/ASM/H0F38/sha1nexte.asm index a5fb0e92a..b664923ab 100644 --- a/unittests/ASM/H0F38/sha1nexte.asm +++ b/unittests/ASM/H0F38/sha1nexte.asm @@ -3,7 +3,8 @@ "RegData": { "XMM1": ["0x6868C3F3AAED56E0", "0xD7DD078194E6E6DE"], "XMM2": ["0x6868C3F3AAED56E0", "0xF0FCE9E294E6E6DE"] - } + }, + "HostFeatures": ["SHA"] } %endif diff --git a/unittests/ASM/H0F38/sha256msg1.asm b/unittests/ASM/H0F38/sha256msg1.asm index 085a4e942..cceaef59e 100644 --- a/unittests/ASM/H0F38/sha256msg1.asm +++ b/unittests/ASM/H0F38/sha256msg1.asm @@ -3,7 +3,8 @@ "RegData": { "XMM1": ["0x43DEA25DAB8EF585", "0x1D30D1491042EED2"], "XMM2": ["0x6868C3F3AAED56E0", "0xF0FCE9E294E6E6DE"] - } + }, + "HostFeatures": ["SHA"] } %endif diff --git a/unittests/ASM/H0F38/sha256msg2.asm b/unittests/ASM/H0F38/sha256msg2.asm index 1867f6f05..cd34bc36f 100644 --- a/unittests/ASM/H0F38/sha256msg2.asm +++ b/unittests/ASM/H0F38/sha256msg2.asm @@ -3,7 +3,8 @@ "RegData": { "XMM1": ["0x915D686150BD9E36", "0xB499245E9B33D33D"], "XMM2": ["0x6868C3F3AAED56E0", "0xF0FCE9E294E6E6DE"] - } + }, + "HostFeatures": ["SHA"] } %endif diff --git a/unittests/ASM/H0F38/sha256rnds2.asm b/unittests/ASM/H0F38/sha256rnds2.asm index 96fc74751..519c8d162 100644 --- a/unittests/ASM/H0F38/sha256rnds2.asm +++ b/unittests/ASM/H0F38/sha256rnds2.asm @@ -3,7 +3,8 @@ "RegData": { "XMM1": ["0x97D4574EE323773D", "0xA934C32F562D8E88"], "XMM2": ["0x6868C3F3AAED56E0", "0xF0FCE9E294E6E6DE"] - } + }, + "HostFeatures": ["SHA"] } %endif diff --git a/unittests/ASM/H0F3A/sha1rnds4.asm b/unittests/ASM/H0F3A/sha1rnds4.asm index f544a3a44..2c3a4b34e 100644 --- a/unittests/ASM/H0F3A/sha1rnds4.asm +++ b/unittests/ASM/H0F3A/sha1rnds4.asm @@ -6,7 +6,8 @@ "XMM3": ["0xA8B3BD15FA04D6D7", "0xDE761956A1F750B1"], "XMM4": ["0xCFBBDFA4E5E4712D", "0x76AD0D46447127D3"], "XMM5": ["0x9BDCA44510E70C65", "0x4474BFAA2B70A524"] - } + }, + "HostFeatures": ["SHA"] } %endif diff --git a/unittests/ASM/REP/F3_2B.asm b/unittests/ASM/REP/F3_2B.asm index 4ff8b4774..c66e2aa7c 100644 --- a/unittests/ASM/REP/F3_2B.asm +++ b/unittests/ASM/REP/F3_2B.asm @@ -4,9 +4,7 @@ "XMM0": ["0x4142434445464748", "0x5152535455565758"], "XMM1": ["0x0000000045464748", "0x0"] }, - "MemoryRegions": { - "0x100000000": "4096" - } + "HostFeatures": ["SSE4A"] } %endif diff --git a/unittests/ASM/REP/F3_BC.asm b/unittests/ASM/REP/F3_BC.asm index 4b50f830f..d27faf5bf 100644 --- a/unittests/ASM/REP/F3_BC.asm +++ b/unittests/ASM/REP/F3_BC.asm @@ -11,9 +11,7 @@ "R12": "0x20", "R11": "0x10" }, - "MemoryRegions": { - "0x100000000": "4096" - } + "HostFeatures": ["BMI1"] } %endif diff --git a/unittests/ASM/REPNE/F2_2B.asm b/unittests/ASM/REPNE/F2_2B.asm index 50d9ac260..0e681525d 100644 --- a/unittests/ASM/REPNE/F2_2B.asm +++ b/unittests/ASM/REPNE/F2_2B.asm @@ -4,9 +4,7 @@ "XMM0": ["0x4142434445464748", "0x5152535455565758"], "XMM1": ["0x4142434445464748", "0x0"] }, - "MemoryRegions": { - "0x100000000": "4096" - } + "HostFeatures": ["SSE4A"] } %endif diff --git a/unittests/ASM/Secondary/09_XX_06.asm b/unittests/ASM/Secondary/09_XX_06.asm index 772844c7f..a56bd8f83 100644 --- a/unittests/ASM/Secondary/09_XX_06.asm +++ b/unittests/ASM/Secondary/09_XX_06.asm @@ -6,7 +6,8 @@ "RDX": "1", "R9": "1", "R10": "1" - } + }, + "HostFeatures": ["RAND"] } %endif diff --git a/unittests/ASM/Secondary/09_XX_07.asm b/unittests/ASM/Secondary/09_XX_07.asm index 4e8afb0a1..e30b4d87d 100644 --- a/unittests/ASM/Secondary/09_XX_07.asm +++ b/unittests/ASM/Secondary/09_XX_07.asm @@ -6,7 +6,8 @@ "RDX": "1", "R9": "1", "R10": "1" - } + }, + "HostFeatures": ["RAND"] } %endif diff --git a/unittests/ASM/SecondaryModRM/Reg_7_4.asm b/unittests/ASM/SecondaryModRM/Reg_7_4.asm index f342062f5..e4f737cc7 100644 --- a/unittests/ASM/SecondaryModRM/Reg_7_4.asm +++ b/unittests/ASM/SecondaryModRM/Reg_7_4.asm @@ -2,7 +2,8 @@ { "RegData": { "RBX": "0x0" - } + }, + "HostFeatures": ["CLZERO"] } %endif diff --git a/unittests/ASM/SecondaryModRM/Reg_7_4_2.asm b/unittests/ASM/SecondaryModRM/Reg_7_4_2.asm index 990a1b2aa..56dc6ea52 100644 --- a/unittests/ASM/SecondaryModRM/Reg_7_4_2.asm +++ b/unittests/ASM/SecondaryModRM/Reg_7_4_2.asm @@ -4,7 +4,8 @@ "RBX": "0x0", "RCX": "0x000000020A121A20", "RDX": "0x0A121A2000000000" - } + }, + "HostFeatures": ["CLZERO"] } %endif diff --git a/unittests/ASM/TwoByte/0F_0E.asm b/unittests/ASM/TwoByte/0F_0E.asm index a7b143d35..c4019c400 100644 --- a/unittests/ASM/TwoByte/0F_0E.asm +++ b/unittests/ASM/TwoByte/0F_0E.asm @@ -4,7 +4,8 @@ }, "MemoryRegions": { "0x100000000": "4096" - } + }, + "HostFeatures": ["3DNOW"] } %endif diff --git a/unittests/ASM/VEX/andn.asm b/unittests/ASM/VEX/andn.asm index 0622a6f78..ab58a86cf 100644 --- a/unittests/ASM/VEX/andn.asm +++ b/unittests/ASM/VEX/andn.asm @@ -5,7 +5,8 @@ "RBX": "0", "RCX": "0xFFFFFFFF", "RDX": "0" - } + }, + "HostFeatures": ["BMI1"] } %endif @@ -19,4 +20,4 @@ mov rdx, -1 andn ecx, ecx, edx andn edx, edx, ecx -hlt \ No newline at end of file +hlt diff --git a/unittests/ASM/VEX/bextr.asm b/unittests/ASM/VEX/bextr.asm index 5dc7c79f4..cab0b6b5a 100644 --- a/unittests/ASM/VEX/bextr.asm +++ b/unittests/ASM/VEX/bextr.asm @@ -6,7 +6,8 @@ "RSI": "0", "R14": "0x7F", "R15": "0x838" - } + }, + "HostFeatures": ["BMI1"] } %endif @@ -32,4 +33,4 @@ mov rsi, -1 mov rdi, 0 bextr esi, esi, edi -hlt \ No newline at end of file +hlt diff --git a/unittests/ASM/VEX/blsi.asm b/unittests/ASM/VEX/blsi.asm index ccddd8802..fab5c9e3a 100644 --- a/unittests/ASM/VEX/blsi.asm +++ b/unittests/ASM/VEX/blsi.asm @@ -7,7 +7,8 @@ "RDX": "1", "RSI": "0xFF000000", "RDI": "0x01000000" - } + }, + "HostFeatures": ["BMI1"] } %endif @@ -31,4 +32,4 @@ mov rsi, 0xFF000000 mov rdi, 0 blsi edi, esi -hlt \ No newline at end of file +hlt diff --git a/unittests/ASM/VEX/blsmsk.asm b/unittests/ASM/VEX/blsmsk.asm index ee8d2fe9c..76ff0c367 100644 --- a/unittests/ASM/VEX/blsmsk.asm +++ b/unittests/ASM/VEX/blsmsk.asm @@ -7,7 +7,8 @@ "RDX": "1", "RSI": "0xFF000000", "RDI": "0x01FFFFFF" - } + }, + "HostFeatures": ["BMI1"] } %endif @@ -29,4 +30,4 @@ blsmsk edx, edx mov rsi, 0xFF000000 blsmsk edi, esi -hlt \ No newline at end of file +hlt diff --git a/unittests/ASM/VEX/blsr.asm b/unittests/ASM/VEX/blsr.asm index b6aef4b65..9fc51ea74 100644 --- a/unittests/ASM/VEX/blsr.asm +++ b/unittests/ASM/VEX/blsr.asm @@ -7,7 +7,8 @@ "RDX": "10", "RSI": "0xFF000000", "RDI": "0xFE000000" - } + }, + "HostFeatures": ["BMI1"] } %endif @@ -29,4 +30,4 @@ blsr edx, edx mov rsi, 0xFF000000 blsr edi, esi -hlt \ No newline at end of file +hlt diff --git a/unittests/ASM/VEX/bzhi.asm b/unittests/ASM/VEX/bzhi.asm index d3d200c2c..f2cbd01d3 100644 --- a/unittests/ASM/VEX/bzhi.asm +++ b/unittests/ASM/VEX/bzhi.asm @@ -9,7 +9,8 @@ "RDI": "32", "RBP": "0x00000000000003FF", "RSP": "10" - } + }, + "HostFeatures": ["BMI2"] } %endif diff --git a/unittests/ASM/VEX/mulx.asm b/unittests/ASM/VEX/mulx.asm index 1babb7260..c2352d950 100644 --- a/unittests/ASM/VEX/mulx.asm +++ b/unittests/ASM/VEX/mulx.asm @@ -7,7 +7,8 @@ "RDX": "0xFFFFFFFE", "RSI": "1", "RDI": "1" - } + }, + "HostFeatures": ["BMI2"] } %endif @@ -33,4 +34,4 @@ mov esi, -1 mov edx, -1 mulx edx, esi, esi -hlt \ No newline at end of file +hlt diff --git a/unittests/ASM/VEX/pdep.asm b/unittests/ASM/VEX/pdep.asm index cc04ca7ba..d722ebd68 100644 --- a/unittests/ASM/VEX/pdep.asm +++ b/unittests/ASM/VEX/pdep.asm @@ -7,7 +7,8 @@ "RDX": "0x0801256708012567", "RSI": "0xFF00FF00FF00FF00", "RDI": "0x0800010025006700" - } + }, + "HostFeatures": ["BMI2"] } %endif @@ -21,4 +22,4 @@ mov rdx, 0x0801256708012567 mov rsi, 0xFF00FF00FF00FF00 pdep rdi, rdx, rsi -hlt \ No newline at end of file +hlt diff --git a/unittests/ASM/VEX/pext.asm b/unittests/ASM/VEX/pext.asm index a053aa530..68fad8719 100644 --- a/unittests/ASM/VEX/pext.asm +++ b/unittests/ASM/VEX/pext.asm @@ -7,7 +7,8 @@ "RDX": "0x1234567812345678", "RSI": "0xFF00FF00FF00FF00", "RDI": "0x12561256" - } + }, + "HostFeatures": ["BMI2"] } %endif @@ -21,4 +22,4 @@ mov rdx, 0x1234567812345678 mov rsi, 0xFF00FF00FF00FF00 pext rdi, rdx, rsi -hlt \ No newline at end of file +hlt diff --git a/unittests/ASM/VEX/rorx.asm b/unittests/ASM/VEX/rorx.asm index b56876bed..ddb91048d 100644 --- a/unittests/ASM/VEX/rorx.asm +++ b/unittests/ASM/VEX/rorx.asm @@ -7,7 +7,8 @@ "RDX": "0x80000000", "RSI": "0xFF", "RDI": "0xF000000F" - } + }, + "HostFeatures": ["BMI2"] } %endif @@ -35,4 +36,4 @@ rorx edi, esi, 4, ; Test that we mask the rotation amount above the operand size (should leave edi's value alone). rorx edi, edi, 32 -hlt \ No newline at end of file +hlt diff --git a/unittests/ASM/VEX/sarx.asm b/unittests/ASM/VEX/sarx.asm index e8f9e8f0a..2e74cf8cd 100644 --- a/unittests/ASM/VEX/sarx.asm +++ b/unittests/ASM/VEX/sarx.asm @@ -7,7 +7,8 @@ "RDX": "127", "RSI": "63", "RDI": "0x00000000FFFFFFFF" - } + }, + "HostFeatures": ["BMI2"] } %endif @@ -28,4 +29,4 @@ mov edi, 0x80000000 mov esi, 63 sarx edi, edi, esi -hlt \ No newline at end of file +hlt diff --git a/unittests/ASM/VEX/shlx.asm b/unittests/ASM/VEX/shlx.asm index 8aadaba70..67b3b650c 100644 --- a/unittests/ASM/VEX/shlx.asm +++ b/unittests/ASM/VEX/shlx.asm @@ -7,7 +7,8 @@ "RDX": "127", "RSI": "63", "RDI": "0x80000000" - } + }, + "HostFeatures": ["BMI2"] } %endif @@ -28,4 +29,4 @@ mov edi, 1 mov esi, 63 shlx edi, edi, esi -hlt \ No newline at end of file +hlt diff --git a/unittests/ASM/VEX/shrx.asm b/unittests/ASM/VEX/shrx.asm index 7d0784d8c..c1c30cace 100644 --- a/unittests/ASM/VEX/shrx.asm +++ b/unittests/ASM/VEX/shrx.asm @@ -7,7 +7,8 @@ "RDX": "127", "RSI": "63", "RDI": "1" - } + }, + "HostFeatures": ["BMI2"] } %endif @@ -28,4 +29,4 @@ mov edi, 0x80000000 mov esi, 63 shrx edi, edi, esi -hlt \ No newline at end of file +hlt diff --git a/unittests/IR/Correctness/FPRStoreTruncate.ir b/unittests/IR/Correctness/FPRStoreTruncate.ir index 80f138603..74db3e94b 100644 --- a/unittests/IR/Correctness/FPRStoreTruncate.ir +++ b/unittests/IR/Correctness/FPRStoreTruncate.ir @@ -6,7 +6,7 @@ ; "XMM6": ["0x0000000000002120","0x0000000000000000"], ; "XMM7": ["0x0000000000000020","0x0000000000000000"] ; }, -; "HostFeatures": "AVX", +; "HostFeatures": ["AVX"], ; "MemoryRegions": { ; "0x1000000": "4096" ; },