summaryrefslogtreecommitdiff
path: root/src/jit/jit.h
diff options
context:
space:
mode:
authorPat Gavlin <pagavlin@microsoft.com>2016-03-07 11:41:19 -0800
committerPat Gavlin <pagavlin@microsoft.com>2016-03-07 11:41:19 -0800
commitcc90f62e4b4f45e6b9b3e9ee2251df32fad9f2f0 (patch)
treeee6abe636390ae3e926ee8bc40273e7b001e03b2 /src/jit/jit.h
parente454121ee731e35de9244596c4a5cd1563d455fe (diff)
downloadcoreclr-cc90f62e4b4f45e6b9b3e9ee2251df32fad9f2f0.tar.gz
coreclr-cc90f62e4b4f45e6b9b3e9ee2251df32fad9f2f0.tar.bz2
coreclr-cc90f62e4b4f45e6b9b3e9ee2251df32fad9f2f0.zip
Reapply change 1578859: Add a new set of APIs for JIT configuration.
SuperPMI has been udpated to accommodate this change, and should no longer crash when run using a JIT built with these changes. [tfs-changeset: 1582144]
Diffstat (limited to 'src/jit/jit.h')
-rw-r--r--src/jit/jit.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/jit/jit.h b/src/jit/jit.h
index 19a4f332d8..bfdb195e28 100644
--- a/src/jit/jit.h
+++ b/src/jit/jit.h
@@ -199,6 +199,18 @@
#define __PLACEMENT_NEW_INLINE // don't bring in the global placement new, it is easy to make a mistake
// with our new(compiler*) pattern.
+#if COR_JIT_EE_VER > 460
+#define NO_CLRCONFIG // Don't bring in the usual CLRConfig infrastructure, since the JIT uses the JIT/EE
+ // interface to retrieve config values.
+
+// This is needed for contract.inl when FEATURE_STACK_PROBE is enabled.
+struct CLRConfig
+{
+ static struct ConfigKey { } EXTERNAL_NO_SO_NOT_MAINLINE;
+ static DWORD GetConfigValue(const ConfigKey& key) { return 0; }
+};
+#endif
+
#include "utilcode.h" // this defines assert as _ASSERTE
#include "host.h" // this redefines assert for the JIT to use assertAbort
#include "utils.h"
@@ -520,8 +532,7 @@ extern JitOptions jitOpts;
template<typename T>
inline T UninitializedWord()
{
- static ConfigDWORD fDefaultFill;
- __int64 word = 0x0101010101010101LL * (fDefaultFill.val(CLRConfig::INTERNAL_JitDefaultFill) & 0xFF);
+ __int64 word = 0x0101010101010101LL * (JitConfig.JitDefaultFill() & 0xFF);
return (T)word;
}