diff options
author | Bruce Forstall <brucefo@microsoft.com> | 2016-10-04 15:12:46 -0700 |
---|---|---|
committer | Bruce Forstall <brucefo@microsoft.com> | 2016-10-06 11:43:49 -0700 |
commit | c47362766e24ab4a7195fa1fb851d254c7b84373 (patch) | |
tree | ce2b2230f63b387856c81c026b4dbcef589020bb /src/vm/codeman.h | |
parent | 920bf1330d0148fc5a277d7ea18f4b7c95c89258 (diff) | |
download | coreclr-c47362766e24ab4a7195fa1fb851d254c7b84373.tar.gz coreclr-c47362766e24ab4a7195fa1fb851d254c7b84373.tar.bz2 coreclr-c47362766e24ab4a7195fa1fb851d254c7b84373.zip |
Enable legacy JIT fallback for CoreCLR on Windows x86
This is to support the eventual case where RyuJIT/x86 becomes the default
x86 JIT, but we support fallback to the older, legacy JIT32/x86 (which
will be renamed compatjit.dll). This uses the same mechanism that was
built for .NET 4.6 when RyuJIT/x64 was shipped, and allowed fallback
to JIT64 as compatjit.dll.
However, we use a different configuration name to avoid conflicting
with the .NET 4.6 COMPlus_useLegacy name (and unintentionally causing
users to fall back to JIT64 with their .NET 4.6 apps).
The COMPlus variable is COMPlus_UseWindowsX86CoreLegacyJit=1. For the
dotnet.exe host, you can set `"System.JIT.UseWindowsX86CoreLegacyJit": true`
in the "configProperties" section of the app.runtimeconfig.json file.
There is a new COMPlus_RequireLegacyJit=1 option to aid testing JIT
fallback.
Diffstat (limited to 'src/vm/codeman.h')
-rw-r--r-- | src/vm/codeman.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/vm/codeman.h b/src/vm/codeman.h index aaf1be8bbf..f4e04b8c67 100644 --- a/src/vm/codeman.h +++ b/src/vm/codeman.h @@ -1193,10 +1193,16 @@ public: public: ICorJitCompiler * m_jit; HINSTANCE m_JITCompiler; -#ifdef _TARGET_AMD64_ +#if defined(_TARGET_X86_) || defined(_TARGET_AMD64_) 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; |