From: Pat Gavlin Date: Wed, 26 Apr 2017 23:01:52 +0000 (-0700) Subject: Remove support for the x86 compat JIT from .NET Core. X-Git-Tag: submit/tizen/20210909.063632~11030^2~7064^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be85750aff9da2e38b163f0a4c67f5ef837ecf76;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Remove support for the x86 compat JIT from .NET Core. These changes remove support for the x86 compat JIT from the build, the runtime, and the various perf/test scripts. Fixes dotnet/coreclr#10733, dotnet/coreclr#10734. Commit migrated from https://github.com/dotnet/coreclr/commit/abd76724643106cfdbd7b6ae80f1551a6d6db511 --- diff --git a/docs/coreclr/project-docs/clr-configuration-knobs.md b/docs/coreclr/project-docs/clr-configuration-knobs.md index 63f094b..3787666 100644 --- a/docs/coreclr/project-docs/clr-configuration-knobs.md +++ b/docs/coreclr/project-docs/clr-configuration-knobs.md @@ -303,9 +303,6 @@ Name | Description | Type | Class | Default Value | Flags `StackSamplingNumMethods` | Number of evolving methods to track as hot and JIT them in the background at a given point of execution. | DWORD | UNSUPPORTED | 32 | `AltJitNgen` | Enables AltJit for NGEN and selectively limits it to the specified methods. | STRING | INTERNAL | | REGUTIL_default `JitNoCMOV` | | DWORD | INTERNAL | 0 | REGUTIL_default -`UseRyuJIT` | Set to 1 by .NET 4.6 installer to indicate RyuJIT should be used, not JIT64. | DWORD | INTERNAL | 0 | IgnoreEnv / IgnoreHKCU / IgnoreConfigFiles -`useLegacyJit` | Set to 1 to do all JITing with compatjit.dll. Only applicable to x64. | DWORD | EXTERNAL | 0 | -`DisableNativeImageLoadList` | Refuse to load native images corresponding to one of the assemblies on this semicolon-delimited list of assembly names. | STRING | EXTERNAL | | REGUTIL_default `JitValNumCSE` | Enables ValNum CSE for the specified methods | STRING | INTERNAL | | REGUTIL_default `JitLexicalCSE` | Enables Lexical CSE for the specified methods | STRING | INTERNAL | | REGUTIL_default `JitNoCSE` | | DWORD | INTERNAL | 0 | REGUTIL_default diff --git a/src/coreclr/build.cmd b/src/coreclr/build.cmd index 715c6c2..495df27 100644 --- a/src/coreclr/build.cmd +++ b/src/coreclr/build.cmd @@ -75,7 +75,6 @@ set __BuildArchArm64=0 set __BuildTypeDebug=0 set __BuildTypeChecked=0 set __BuildTypeRelease=0 -set __BuildJit32=0 set __BuildStandaloneGC="-DFEATURE_STANDALONE_GC=0" set __PgoInstrument=0 @@ -142,11 +141,9 @@ if /i "%1" == "skiptests" (set __BuildTests=0&set processedArgs=!proce if /i "%1" == "skipbuildpackages" (set __BuildPackages=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "skiprestoreoptdata" (set __RestoreOptData=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "usenmakemakefiles" (set __NMakeMakefiles=1&set __ConfigureOnly=1&set __BuildNative=1&set __BuildNativeCoreLib=0&set __BuildCoreLib=0&set __BuildTests=0&set __BuildPackages=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) -if /i "%1" == "buildjit32" (set __BuildJit32=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "pgoinstrument" (set __PgoInstrument=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "ibcinstrument" (set __IbcTuning=/Tuning&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "toolset_dir" (set __ToolsetDir=%2&set __PassThroughArgs=%__PassThroughArgs% %2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop) -if /i "%1" == "compatjitcrossgen" (set __CompatJitCrossgen=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "buildstandalonegc" (set __BuildStandaloneGC="-DFEATURE_STANDALONE_GC=1"&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) @REM The following can be deleted once the CI system that passes it is updated to not pass it. @@ -318,7 +315,7 @@ if %__BuildNative% EQU 1 ( pushd "%__IntermediatesDir%" set __ExtraCmakeArgs=!___SDKVersion! "-DCLR_CMAKE_TARGET_OS=%__BuildOs%" "-DCLR_CMAKE_PACKAGES_DIR=%__PackagesDir%" "-DCLR_CMAKE_PGO_INSTRUMENT=%__PgoInstrument%" "-DCLR_CMAKE_OPTDATA_VERSION=%__PgoOptDataVersion%" - call "%__SourceDir%\pal\tools\gen-buildsys-win.bat" "%__ProjectDir%" %__VSVersion% %__BuildArch% "-DBUILD_JIT32=%__BuildJit32%" %__BuildStandaloneGC% !__ExtraCmakeArgs! + call "%__SourceDir%\pal\tools\gen-buildsys-win.bat" "%__ProjectDir%" %__VSVersion% %__BuildArch% %__BuildStandaloneGC% !__ExtraCmakeArgs! @if defined _echo @echo on popd :SkipConfigure @@ -430,10 +427,6 @@ if %__BuildCoreLib% EQU 1 ( set __nugetBuildArgs=-buildNugetPackage=true ) - set PackageCompatJit= - if "%__BuildJit32%" == "1" ( - set PackageCompatJit=1 - ) @call %__ProjectDir%\run.cmd build -Project=%__ProjectDir%\build.proj -MsBuildLog=!__MsbuildLog! -MsBuildWrn=!__MsbuildWrn! -MsBuildErr=!__MsbuildErr! !__nugetBuildArgs! %__RunArgs% !__ExtraBuildArgs! %__UnprocessedBuildArgs% if not !errorlevel! == 0 ( echo %__MsgPrefix%Error: System.Private.CoreLib build failed. Refer to the build log files for details: @@ -450,10 +443,6 @@ set PATH=%PATH%;%WinDir%\Microsoft.Net\Framework64\V4.0.30319;%WinDir%\Microsoft if %__BuildNativeCoreLib% EQU 1 ( echo %__MsgPrefix%Generating native image of System.Private.CoreLib for %__BuildOS%.%__BuildArch%.%__BuildType% - if "%__CompatJitCrossgen%"=="1" ( - set COMPlus_UseWindowsX86CoreLegacyJit=1 - ) - echo "%__CrossgenExe%" %__IbcTuning% /Platform_Assemblies_Paths "%__BinDir%"\IL /out "%__BinDir%\System.Private.CoreLib.dll" "%__BinDir%\IL\System.Private.CoreLib.dll" "%__CrossgenExe%" %__IbcTuning% /Platform_Assemblies_Paths "%__BinDir%"\IL /out "%__BinDir%\System.Private.CoreLib.dll" "%__BinDir%\IL\System.Private.CoreLib.dll" > "%__CrossGenCoreLibLog%" 2>&1 if NOT !errorlevel! == 0 ( @@ -469,10 +458,6 @@ if %__BuildNativeCoreLib% EQU 1 ( type %__CrossGenCoreLibLog% goto CrossgenFailure ) - - if "%__CompatJitCrossgen%"=="1" ( - set COMPlus_UseWindowsX86CoreLegacyJit= - ) ) if %__BuildPackages% EQU 1 ( diff --git a/src/coreclr/buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json b/src/coreclr/buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json index 9b24cc2..9ca177e 100644 --- a/src/coreclr/buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json +++ b/src/coreclr/buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json @@ -39,78 +39,6 @@ }, { "enabled": true, - "continueOnError": true, - "alwaysRun": false, - "displayName": "Run rd", - "timeoutInMinutes": 0, - "task": { - "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "filename": "rd", - "arguments": "/S /Q jit32", - "workingFolder": "src", - "failOnStandardError": "false" - } - }, - { - "enabled": true, - "continueOnError": false, - "alwaysRun": false, - "displayName": "Run md", - "timeoutInMinutes": 0, - "task": { - "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "filename": "md", - "arguments": "jit32", - "workingFolder": "src", - "failOnStandardError": "false" - } - }, - { - "enabled": true, - "continueOnError": false, - "alwaysRun": false, - "displayName": "Run git", - "timeoutInMinutes": 0, - "task": { - "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "filename": "git", - "arguments": "clone -b $(Jit32Branch) $(Jit32Repo) jit32", - "workingFolder": "src", - "failOnStandardError": "false" - } - }, - { - "enabled": true, - "continueOnError": true, - "alwaysRun": false, - "displayName": "Run rd", - "timeoutInMinutes": 0, - "task": { - "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "filename": "rd", - "arguments": "/S /Q jit32\\.git", - "workingFolder": "src", - "failOnStandardError": "false" - } - }, - { - "enabled": true, "continueOnError": false, "alwaysRun": false, "displayName": "Run clean.cmd", @@ -158,7 +86,7 @@ }, "inputs": { "filename": "build.cmd", - "arguments": "$(Architecture) $(PB_BuildType) skiptests skipbuildpackages buildjit32 -OfficialBuildId=$(OfficialBuildId) -skiprestore -Priority=$(Priority) $(portableBuild) -- /p:\"ConfigurationGroup=Release\"", + "arguments": "$(Architecture) $(PB_BuildType) skiptests skipbuildpackages -OfficialBuildId=$(OfficialBuildId) -skiprestore -Priority=$(Priority) $(portableBuild) -- /p:\"ConfigurationGroup=Release\"", "workingFolder": "", "failOnStandardError": "false" } @@ -203,7 +131,7 @@ }, "inputs": { "filename": "build-packages.cmd", - "arguments": "-BuildArch=$(Architecture) -BuildType=$(PB_BuildType) $(portableBuild) -ExtraParameters=/p:PackageCompatJit=1", + "arguments": "-BuildArch=$(Architecture) -BuildType=$(PB_BuildType) $(portableBuild)", "workingFolder": "", "failOnStandardError": "false" } diff --git a/src/coreclr/clrdefinitions.cmake b/src/coreclr/clrdefinitions.cmake index 838be56..c2493f0 100644 --- a/src/coreclr/clrdefinitions.cmake +++ b/src/coreclr/clrdefinitions.cmake @@ -1,9 +1,3 @@ -if(WIN32 AND CLR_CMAKE_TARGET_ARCH_I386 AND BUILD_JIT32) - set(CLR_BUILD_JIT32 1) -else() - set(CLR_BUILD_JIT32 0) -endif() - include(clrfeatures.cmake) if (CLR_CMAKE_TARGET_ARCH_AMD64) diff --git a/src/coreclr/perf.groovy b/src/coreclr/perf.groovy index 5a88ff1..1eb115d 100644 --- a/src/coreclr/perf.groovy +++ b/src/coreclr/perf.groovy @@ -27,19 +27,8 @@ def static getOSGroup(def os) { // Setup perflab tests runs [true, false].each { isPR -> ['Windows_NT'].each { os -> - ['x64', 'x86', 'x86jit32'].each { arch -> + ['x64', 'x86'].each { arch -> def architecture = arch - def testEnv = '' - - if (arch == 'x86jit32') - { - architecture = 'x86' - testEnv = '-testEnv %WORKSPACE%\\tests\\x86\\compatjit_x86_testenv.cmd' - } - else if (arch == 'x86') - { - testEnv = '-testEnv %WORKSPACE%\\tests\\x86\\ryujit_x86_testenv.cmd' - } def newJob = job(Utilities.getFullJobName(project, "perf_perflab_${os}_${arch}", isPR)) { // Set the label. @@ -76,17 +65,10 @@ def static getOSGroup(def os) { batchFile("py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\machinedata.py\"") batchFile("set __TestIntermediateDir=int&&build.cmd ${configuration} ${architecture}") - if (arch == 'x86jit32') - { - // Download package and copy compatjit into Core_Root - batchFile("C:\\Tools\\nuget.exe install runtime.win7-${architecture}.Microsoft.NETCore.Jit -Source https://dotnet.myget.org/F/dotnet-core -OutputDirectory \"%WORKSPACE%\" -Prerelease -ExcludeVersion\n" + - "xcopy \"%WORKSPACE%\\runtime.win7-x86.Microsoft.NETCore.Jit\\runtimes\\win7-x86\\native\\compatjit.dll\" \"%WORKSPACE%\\bin\\Product\\${os}.${architecture}.${configuration}\" /Y") - } - batchFile("tests\\runtest.cmd ${configuration} ${architecture} GenerateLayoutOnly") - batchFile("tests\\scripts\\run-xunit-perf.cmd -arch ${arch} -configuration ${configuration} ${testEnv} -testBinLoc bin\\tests\\${os}.${architecture}.${configuration}\\performance\\perflab\\Perflab -library -uploadToBenchview \"%WORKSPACE%\\Microsoft.Benchview.JSONFormat\\tools\" -runtype ${runType}") - batchFile("tests\\scripts\\run-xunit-perf.cmd -arch ${arch} -configuration ${configuration} ${testEnv} -testBinLoc bin\\tests\\${os}.${architecture}.${configuration}\\Jit\\Performance\\CodeQuality -uploadToBenchview \"%WORKSPACE%\\Microsoft.Benchview.JSONFormat\\tools\" -runtype ${runType}") + batchFile("tests\\scripts\\run-xunit-perf.cmd -arch ${arch} -configuration ${configuration} -testBinLoc bin\\tests\\${os}.${architecture}.${configuration}\\performance\\perflab\\Perflab -library -uploadToBenchview \"%WORKSPACE%\\Microsoft.Benchview.JSONFormat\\tools\" -runtype ${runType}") + batchFile("tests\\scripts\\run-xunit-perf.cmd -arch ${arch} -configuration ${configuration} -testBinLoc bin\\tests\\${os}.${architecture}.${configuration}\\Jit\\Performance\\CodeQuality -uploadToBenchview \"%WORKSPACE%\\Microsoft.Benchview.JSONFormat\\tools\" -runtype ${runType}") } } @@ -126,14 +108,9 @@ def static getOSGroup(def os) { // Setup throughput perflab tests runs [true, false].each { isPR -> ['Windows_NT'].each { os -> - ['x64', 'x86', 'x86jit32'].each { arch -> + ['x64', 'x86'].each { arch -> def architecture = arch - if (arch == 'x86jit32') - { - architecture = 'x86' - } - def newJob = job(Utilities.getFullJobName(project, "perf_throughput_perflab_${os}_${arch}", isPR)) { // Set the label. label('windows_clr_perf') @@ -171,12 +148,6 @@ def static getOSGroup(def os) { batchFile("py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\machinedata.py\"") batchFile("set __TestIntermediateDir=int&&build.cmd ${configuration} ${architecture} skiptests") batchFile("tests\\runtest.cmd ${configuration} ${architecture} GenerateLayoutOnly") - if (arch == 'x86jit32') - { - // Download package and copy compatjit into Core_Root - batchFile("C:\\Tools\\nuget.exe install runtime.win7-${architecture}.Microsoft.NETCore.Jit -Source https://dotnet.myget.org/F/dotnet-core -OutputDirectory \"%WORKSPACE%\" -Prerelease -ExcludeVersion\n" + - "xcopy \"%WORKSPACE%\\runtime.win7-x86.Microsoft.NETCore.Jit\\runtimes\\win7-x86\\native\\compatjit.dll\" \"%WORKSPACE%\\bin\\Product\\${os}.${architecture}.${configuration}\" /Y") - } batchFile("py -u tests\\scripts\\run-throughput-perf.py -arch ${arch} -os ${os} -configuration ${configuration} -clr_root \"%WORKSPACE%\" -assembly_root \"%WORKSPACE%\\Microsoft.BenchView.ThroughputBenchmarks.${architecture}.${os}\\lib\" -benchview_path \"%WORKSPACE%\\Microsoft.Benchview.JSONFormat\\tools\" -run_type ${runType}") } } diff --git a/src/coreclr/src/.nuget/Microsoft.NETCore.Jit/runtime.Windows_NT.Microsoft.NETCore.Jit.props b/src/coreclr/src/.nuget/Microsoft.NETCore.Jit/runtime.Windows_NT.Microsoft.NETCore.Jit.props index c45358d..f31b152 100644 --- a/src/coreclr/src/.nuget/Microsoft.NETCore.Jit/runtime.Windows_NT.Microsoft.NETCore.Jit.props +++ b/src/coreclr/src/.nuget/Microsoft.NETCore.Jit/runtime.Windows_NT.Microsoft.NETCore.Jit.props @@ -2,7 +2,6 @@ - diff --git a/src/coreclr/src/CMakeLists.txt b/src/coreclr/src/CMakeLists.txt index 9598d0c..b761b6a 100644 --- a/src/coreclr/src/CMakeLists.txt +++ b/src/coreclr/src/CMakeLists.txt @@ -149,11 +149,6 @@ add_subdirectory(utilcode) add_subdirectory(gcinfo) add_subdirectory(coreclr) add_subdirectory(jit) - -if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/jit32") - add_subdirectory(jit32) -endif() - add_subdirectory(gc) add_subdirectory(vm) add_subdirectory(md) diff --git a/src/coreclr/src/inc/clrconfigvalues.h b/src/coreclr/src/inc/clrconfigvalues.h index a0c2456..c4722bc 100644 --- a/src/coreclr/src/inc/clrconfigvalues.h +++ b/src/coreclr/src/inc/clrconfigvalues.h @@ -460,20 +460,6 @@ RETAIL_CONFIG_STRING_INFO_EX(INTERNAL_AltJitNgen, W("AltJitNgen"), "Enables AltJ #endif // defined(ALLOW_SXS_JIT_NGEN) CONFIG_DWORD_INFO_EX(INTERNAL_JitNoCMOV, W("JitNoCMOV"), 0, "", CLRConfig::REGUTIL_default) -#if defined(_TARGET_AMD64_) -// UseRyuJIT is only looked up in HKLM in the registry, not in config files or environment variables. It should only be set by the .NET 4.6 (and later version) installers, -// not by users. See the "RyuJIT Compatibility Fallback Design Specification.docx" document for details. -RETAIL_CONFIG_DWORD_INFO_EX(INTERNAL_UseRyuJit, W("UseRyuJIT"), 0, "Set to 1 by .NET 4.6 installer to indicate RyuJIT should be used, not JIT64.", CLRConfig::IgnoreEnv | CLRConfig::IgnoreHKCU | CLRConfig::IgnoreConfigFiles) -RETAIL_CONFIG_DWORD_INFO(EXTERNAL_UseLegacyJit, W("useLegacyJit"), 0, "Set to 1 to do all JITing with compatjit.dll. Only applicable to x64.") -RETAIL_CONFIG_STRING_INFO_EX(EXTERNAL_DisableNativeImageLoadList, W("DisableNativeImageLoadList"), "Refuse to load native images corresponding to one of the assemblies on this semicolon-delimited list of assembly names.", CLRConfig::REGUTIL_default) -#endif - -#if defined(_TARGET_X86_) -RETAIL_CONFIG_DWORD_INFO(EXTERNAL_UseWindowsX86CoreLegacyJit, W("UseWindowsX86CoreLegacyJit"), 0, "Set to 1 to do all JITing with compatjit.dll. Only applicable to Windows x86 .NET Core.") -#endif - -RETAIL_CONFIG_DWORD_INFO(EXTERNAL_RequireLegacyJit, W("RequireLegacyJit"), 0, "Set to 1 to require the use of legacy JIT (via COMPlus_useLegacyJit=1 or COMPlus_UseWindowsX86CoreLegacyJit=1).") - CONFIG_STRING_INFO_EX(INTERNAL_JitValNumCSE, W("JitValNumCSE"), "Enables ValNum CSE for the specified methods", CLRConfig::REGUTIL_default) CONFIG_STRING_INFO_EX(INTERNAL_JitLexicalCSE, W("JitLexicalCSE"), "Enables Lexical CSE for the specified methods", CLRConfig::REGUTIL_default) CONFIG_DWORD_INFO_EX(INTERNAL_JitNoCSE, W("JitNoCSE"), 0, "", CLRConfig::REGUTIL_default) diff --git a/src/coreclr/src/vm/codeman.cpp b/src/coreclr/src/vm/codeman.cpp index a30e70e..d934b82 100644 --- a/src/coreclr/src/vm/codeman.cpp +++ b/src/coreclr/src/vm/codeman.cpp @@ -1219,7 +1219,6 @@ EEJitManager::EEJitManager() #if defined(_TARGET_X86_) || defined(_TARGET_AMD64_) m_JITCompilerOther = NULL; #endif - m_fLegacyJitUsed = FALSE; #ifdef ALLOW_SXS_JIT m_alternateJit = NULL; @@ -1371,8 +1370,8 @@ void EEJitManager::SetCpuInfo() enum JIT_LOAD_JIT_ID { JIT_LOAD_MAIN = 500, // The "main" JIT. Normally, this is named "clrjit.dll". Start at a number that is somewhat uncommon (i.e., not zero or 1) to help distinguish from garbage, in process dumps. - JIT_LOAD_LEGACY, // The "legacy" JIT. Normally, this is named "compatjit.dll". This applies to AMD64 on Windows desktop, or x86 on Windows .NET Core. - JIT_LOAD_ALTJIT // An "altjit". By default, named "protojit.dll". Used both internally, as well as externally for JIT CTP builds. + // 501 is JIT_LOAD_LEGACY on some platforms; please do not reuse this value. + JIT_LOAD_ALTJIT = 502 // An "altjit". By default, named "protojit.dll". Used both internally, as well as externally for JIT CTP builds. }; enum JIT_LOAD_STATUS @@ -1628,80 +1627,6 @@ BOOL EEJitManager::LoadJIT() // Set as a courtesy to code:CorCompileGetRuntimeDll s_ngenCompilerDll = m_JITCompiler; - -#if defined(_TARGET_X86_) - // If COMPlus_UseLegacyJit=1, then we fall back to compatjit.dll. - // - // This fallback mechanism was introduced for Visual Studio "14" Preview, when JIT64 (the legacy JIT) was replaced with - // RyuJIT. It was desired to provide a fallback mechanism in case comptibility problems (or other bugs) - // were discovered by customers. Setting this COMPLUS variable to 1 does not affect NGEN: existing NGEN images continue - // to be used, and all subsequent NGEN compilations continue to use the new JIT. - // - // If this is a compilation process, then we don't allow specifying a fallback JIT. This is a case where, when NGEN'ing, - // we sometimes need to JIT some things (such as when we are NGEN'ing mscorlib). In that case, we want to use exactly - // the same JIT as NGEN uses. And NGEN doesn't follow the COMPlus_UseLegacyJit=1 switch -- it always uses clrjit.dll. - // - // Note that we always load and initialize the default JIT. This is to handle cases where obfuscators rely on - // LoadLibrary("clrjit.dll") returning the module handle of the JIT, and then they call GetProcAddress("getJit") to get - // the EE-JIT interface. They also do this without also calling sxsJitStartup()! - // - // In addition, for reasons related to servicing, we only use RyuJIT when the registry value UseRyuJIT (type DWORD), under - // key HKLM\SOFTWARE\Microsoft\.NETFramework, is set to 1. Otherwise, we fall back to JIT64. Note that if this value - // is set, we also must use JIT64 for all NGEN compilations as well. - // - // See the document "RyuJIT Compatibility Fallback Specification.docx" for details. - // - // For .NET Core 1.2, RyuJIT for x86 is the primary jit (clrjit.dll) and JIT32 for x86 is the fallback, legacy JIT (compatjit.dll). - // Thus, the COMPlus_useLegacyJit=1 mechanism has been enabled for x86 CoreCLR. This scenario does not have the UseRyuJIT - // registry key, nor the AppX binder mode. - - bool fUseRyuJit = true; - - if ((!IsCompilationProcess() || !fUseRyuJit) && // Use RyuJIT for all NGEN, unless we're falling back to JIT64 for everything. - (newJitCompiler != nullptr)) // the main JIT must successfully load before we try loading the fallback JIT - { - BOOL fUsingCompatJit = FALSE; - - if (!fUseRyuJit) - { - fUsingCompatJit = TRUE; - } - - if (!fUsingCompatJit) - { - DWORD useLegacyJit = Configuration::GetKnobBooleanValue(W("System.JIT.UseWindowsX86CoreLegacyJit"), CLRConfig::EXTERNAL_UseWindowsX86CoreLegacyJit); - if (useLegacyJit == 1) - { - fUsingCompatJit = TRUE; - } - } - - - if (fUsingCompatJit) - { - // Now, load the compat jit and initialize it. - - LPCWSTR pwzJitName = MAKEDLLNAME_W(W("compatjit")); - - // Note: if the compatjit fails to load, we ignore it, and continue to use the main JIT for - // everything. You can imagine a policy where if the user requests the compatjit, and we fail - // to load it, that we fail noisily. We don't do that currently. - ICorJitCompiler* fallbackICorJitCompiler; - g_JitLoadData.jld_id = JIT_LOAD_LEGACY; - LoadAndInitializeJIT(pwzJitName, &m_JITCompilerOther, &fallbackICorJitCompiler, &g_JitLoadData); - if (fallbackICorJitCompiler != nullptr) - { - // Tell the main JIT to fall back to the "fallback" JIT compiler, in case some - // obfuscator tries to directly call the main JIT's getJit() function. - newJitCompiler->setRealJit(fallbackICorJitCompiler); - - // Now, the compat JIT will be used. - m_fLegacyJitUsed = TRUE; - } - } - } -#endif // (defined(_TARGET_AMD64_) && !defined(CROSSGEN_COMPILE)) || (defined(_TARGET_X86_) ) - #endif // !FEATURE_MERGE_JIT_AND_ENGINE #ifdef ALLOW_SXS_JIT diff --git a/src/coreclr/src/vm/codeman.h b/src/coreclr/src/vm/codeman.h index 9d7ed4d..cca5f5e 100644 --- a/src/coreclr/src/vm/codeman.h +++ b/src/coreclr/src/vm/codeman.h @@ -1201,12 +1201,6 @@ public: HINSTANCE m_JITCompilerOther; // Stores the handle of the legacy JIT, if one is loaded. #endif - // TRUE if the legacy/compat JIT was loaded successfully and will be used. - // This is available in all builds so if COMPlus_RequireLegacyJit=1 is set in a test, - // the test will fail in any build where the legacy JIT is not loaded, even if legacy - // fallback is not available in that build. This prevents unexpected silent successes. - BOOL m_fLegacyJitUsed; - #ifdef ALLOW_SXS_JIT //put these at the end so that we don't mess up the offsets in the DAC. ICorJitCompiler * m_alternateJit; diff --git a/src/coreclr/src/vm/eeconfig.cpp b/src/coreclr/src/vm/eeconfig.cpp index 812d1df..81f3957 100644 --- a/src/coreclr/src/vm/eeconfig.cpp +++ b/src/coreclr/src/vm/eeconfig.cpp @@ -327,10 +327,6 @@ HRESULT EEConfig::Init() iRequireZaps = REQUIRE_ZAPS_NONE; -#ifdef _TARGET_AMD64_ - pDisableNativeImageLoadList = NULL; -#endif - // new loader behavior switches m_fDeveloperInstallation = false; @@ -489,11 +485,6 @@ HRESULT EEConfig::Cleanup() delete pForbidZapsExcludeList; #endif -#ifdef _TARGET_AMD64_ - if (pDisableNativeImageLoadList) - delete pDisableNativeImageLoadList; -#endif - #ifdef FEATURE_COMINTEROP if (pszLogCCWRefCountChange) delete [] pszLogCCWRefCountChange; @@ -996,16 +987,6 @@ HRESULT EEConfig::sync() } #endif -#ifdef _TARGET_AMD64_ - if (!IsCompilationProcess()) - { - NewArrayHolder wszDisableNativeImageLoadList; - IfFailRet(CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_DisableNativeImageLoadList, &wszDisableNativeImageLoadList)); - if (wszDisableNativeImageLoadList) - pDisableNativeImageLoadList = new AssemblyNamesList(wszDisableNativeImageLoadList); - } -#endif - #ifdef FEATURE_LOADER_OPTIMIZATION dwSharePolicy = GetConfigDWORD_DontUse_(CLRConfig::EXTERNAL_LoaderOptimization, dwSharePolicy); #endif @@ -1455,18 +1436,6 @@ bool EEConfig::ExcludeReadyToRun(LPCUTF8 assemblyName) const return false; } -#ifdef _TARGET_AMD64_ -bool EEConfig::DisableNativeImageLoad(LPCUTF8 assemblyName) const -{ - LIMITED_METHOD_CONTRACT; - - if (pDisableNativeImageLoadList != NULL && pDisableNativeImageLoadList->IsInList(assemblyName)) - return true; - - return false; -} -#endif - /**************************************************************/ #ifdef _DEBUG /**************************************************************/ diff --git a/src/coreclr/src/vm/eeconfig.h b/src/coreclr/src/vm/eeconfig.h index e97385e..ae23f74 100644 --- a/src/coreclr/src/vm/eeconfig.h +++ b/src/coreclr/src/vm/eeconfig.h @@ -758,11 +758,6 @@ public: bool ForbidZap(LPCUTF8 assemblyName) const; #endif bool ExcludeReadyToRun(LPCUTF8 assemblyName) const; - -#ifdef _TARGET_AMD64_ - bool DisableNativeImageLoad(LPCUTF8 assemblyName) const; - bool IsDisableNativeImageLoadListNonEmpty() const { LIMITED_METHOD_CONTRACT; return (pDisableNativeImageLoadList != NULL); } -#endif LPCWSTR ZapSet() const { LIMITED_METHOD_CONTRACT; return pZapSet; } @@ -1122,16 +1117,6 @@ private: //---------------------------------------------------------------- AssemblyNamesList * pForbidZapsExcludeList; #endif -#ifdef _TARGET_AMD64_ - // Assemblies for which we will not load a native image. This is from the COMPlus_DisableNativeImageLoadList - // variable / reg key. It performs the same function as the config file key "" (except - // that is it just a list of assembly names, which the config file key can specify full assembly identities). - // This was added to support COMPlus_UseLegacyJit, to support the rollout of RyuJIT to replace JIT64, where - // the user can cause the CLR to fall back to JIT64 for JITting but not for NGEN. This allows the user to - // force JITting for a specified list of NGEN assemblies. - AssemblyNamesList * pDisableNativeImageLoadList; -#endif - LPCWSTR pZapSet; bool fNgenBindOptimizeNonGac; diff --git a/src/coreclr/src/vm/jitinterface.cpp b/src/coreclr/src/vm/jitinterface.cpp index 5ef7700..da803ba 100644 --- a/src/coreclr/src/vm/jitinterface.cpp +++ b/src/coreclr/src/vm/jitinterface.cpp @@ -12614,13 +12614,6 @@ PCODE UnsafeJitFunction(MethodDesc* ftn, COR_ILMETHOD_DECODER* ILHeader, CORJIT_ EEPOLICY_HANDLE_FATAL_ERROR_WITH_MESSAGE(COR_E_EXECUTIONENGINE, W("Failed to load JIT compiler")); #endif // ALLOW_SXS_JIT } - - // If no compatjit wasn't used, but the user (normally a test case) requires that one is used, then fail. - // This is analogous to ZapRequire. - if (!jitMgr->m_fLegacyJitUsed && (CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_RequireLegacyJit) == 1)) - { - EEPOLICY_HANDLE_FATAL_ERROR_WITH_MESSAGE(COR_E_EXECUTIONENGINE, W("Failed to use legacy JIT compiler with RequireLegacyJit set")); - } #endif // CROSSGEN_COMPILE #ifdef _DEBUG diff --git a/src/coreclr/tests/x86/legacyjit_x86_testenv.cmd b/src/coreclr/tests/protononjit_testenv.cmd similarity index 94% rename from src/coreclr/tests/x86/legacyjit_x86_testenv.cmd rename to src/coreclr/tests/protononjit_testenv.cmd index 41da4cf..bba0b67 100644 --- a/src/coreclr/tests/x86/legacyjit_x86_testenv.cmd +++ b/src/coreclr/tests/protononjit_testenv.cmd @@ -1,12 +1,12 @@ @REM ------------------------------------------------------------------------- @REM -@REM This script provides x86 LEGACY_BACKEND JIT test environment settings +@REM This script provides test environment settings for prototype/cross-targeting JITs. @REM @REM ------------------------------------------------------------------------- set COMPLUS_AltJit=* set COMPLUS_AltJitNgen=* -set COMPLUS_AltJitName=legacyjit.dll +set COMPLUS_AltJitName=protononjit.dll set COMPLUS_NoGuiOnAssert=1 set COMPLUS_AltJitAssertOnNYI=1 diff --git a/src/coreclr/tests/scripts/run-throughput-perf.py b/src/coreclr/tests/scripts/run-throughput-perf.py index ee6e4a3..cc1e151 100644 --- a/src/coreclr/tests/scripts/run-throughput-perf.py +++ b/src/coreclr/tests/scripts/run-throughput-perf.py @@ -53,7 +53,6 @@ jit_list = { 'Windows_NT': { 'x64': 'clrjit.dll', 'x86': 'clrjit.dll', - 'x86jit32': 'compatjit.dll' }, 'Linux': { 'x64': 'libclrjit.so' @@ -126,7 +125,7 @@ def validate_args(args): if not helper(arg): raise Exception('Argument: %s is not valid.' % (arg)) - valid_archs = {'Windows_NT': ['x86', 'x64', 'x86jit32'], 'Linux': ['x64']} + valid_archs = {'Windows_NT': ['x86', 'x64'], 'Linux': ['x64']} valid_build_types = ['Release'] valid_run_types = ['rolling', 'private'] valid_os = ['Windows_NT', 'Ubuntu14.04'] @@ -281,9 +280,6 @@ def main(args): architecture, operating_system, os_group, build_type, run_type, clr_root, assembly_root, benchview_path = validate_args(args) arch = architecture - if architecture == 'x86jit32': - arch = 'x86' - current_dir = os.getcwd() jit = jit_list[os_group][architecture] crossgen = 'crossgen' diff --git a/src/coreclr/tests/scripts/run-xunit-perf.cmd b/src/coreclr/tests/scripts/run-xunit-perf.cmd index 7895b3f..80f8544 100644 --- a/src/coreclr/tests/scripts/run-xunit-perf.cmd +++ b/src/coreclr/tests/scripts/run-xunit-perf.cmd @@ -173,11 +173,7 @@ rem **************************************************************************** rem **************************************************************************** rem Sets the test architecture. rem **************************************************************************** - IF /I [%TEST_ARCHITECTURE%] == [x86jit32] ( - set TEST_ARCH=x86 - ) ELSE ( - set TEST_ARCH=%TEST_ARCHITECTURE% - ) + set TEST_ARCH=%TEST_ARCHITECTURE% exit /b 0 :verify_core_overlay @@ -320,14 +316,4 @@ rem **************************************************************************** rem **************************************************************************** rem Skip known failures rem **************************************************************************** - IF /I [%TEST_ARCHITECTURE%] == [x86jit32] ( - IF /I "%~1" == "CscBench" ( - rem https://github.com/dotnet/coreclr/issues/11088 - exit /b 1 - ) - IF /I "%~1" == "SciMark2" ( - rem https://github.com/dotnet/coreclr/issues/11089 - exit /b 1 - ) - ) exit /b 0 diff --git a/src/coreclr/tests/x86/compatjit_x86_testenv.cmd b/src/coreclr/tests/x86/compatjit_x86_testenv.cmd deleted file mode 100644 index d245370..0000000 --- a/src/coreclr/tests/x86/compatjit_x86_testenv.cmd +++ /dev/null @@ -1,8 +0,0 @@ -@REM ------------------------------------------------------------------------- -@REM -@REM This script provides x86 compatjit test environment settings -@REM -@REM ------------------------------------------------------------------------- - -@REM Use compatjit.dll, not clrjit.dll. -set COMPlus_UseWindowsX86CoreLegacyJit=1 diff --git a/src/coreclr/tests/x86/ryujit_x86_testenv.cmd b/src/coreclr/tests/x86/ryujit_x86_testenv.cmd deleted file mode 100644 index 97e7ab8..0000000 --- a/src/coreclr/tests/x86/ryujit_x86_testenv.cmd +++ /dev/null @@ -1,5 +0,0 @@ -@REM This is no longer needed, except the CI system, during the conversion of RyuJIT/x86 -@REM to the default, still looks for it for the old "ryujit" tasks. Leave it here, and the -@REM "ryujit" tasks will just run the default JIT (now RyuJIT). -@REM -@REM After the .NET CI is updated, this can be deleted. diff --git a/src/coreclr/tests/x86_jit32_issues.targets b/src/coreclr/tests/x86_jit32_issues.targets deleted file mode 100644 index 7a6983d..0000000 --- a/src/coreclr/tests/x86_jit32_issues.targets +++ /dev/null @@ -1,516 +0,0 @@ - - - - - 6717 - - - 6717 - - - 6714 - - - 6714 - - - needs triage - - - 6720 - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - 2414 - - - 2414 - - - 2416 - - - 2416 - - - 2416 - - - 2416 - - - needs triage - - - needs triage - - - 2433 - - - 2433 - - - 2433 - - - 2433 - - - 2434 - - - 2435 - - - 2435 - - - 2451 - - - 2451 - - - 2451 - - - 2451 - - - 2451 - - - 6714 - - - 2441 - - - 2441 - - - 6714 - - - 6714 - - - 2414 - - - 2414 - - - 2414 - - - 6714 - - - 2414 - - - needs triage - - - 3216 - - - needs triage - - - needs triage - - - 3216 - - - needs triage - - - needs triage - - - 3216 - - - needs triage - - - needs triage - - - 3216 - - - needs triage - - - needs triage - - - 2433 - - - 2433 - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - 'GetType() == TI_METHOD' - - - 'GetType() == TI_METHOD' - - - 2444 - - - 2444 - - - 6714 - - - 2435 - - - 2435 - - - 2435 - - - 2435 - - - 4548 - - - 2414 - - - 2414 - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - 'Arg type mismatch: Wanted long (size 8), Got struct (size 4) for call at IL offset 0x16' - - - needs triage - - - x86 JIT doesn't support tail call opt - - - 6714 - - - 6714 - - - 6714 - - - 5430 - - - needs triage - - - 6718 - - - 6714 - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - 6714 - - - needs triage - - - 5286 - - - 5286 - - - 7163 - - - needs triage - - - 6714 - - - needs triage - - - needs triage - - - needs triage - - - 6714 - - - - - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - needs triage - - - times out - - -