summaryrefslogtreecommitdiff
path: root/src/inc/corcompile.h
diff options
context:
space:
mode:
authorBruce Forstall <brucefo@microsoft.com>2016-10-26 15:52:06 -0700
committerBruce Forstall <brucefo@microsoft.com>2016-10-27 12:08:20 -0700
commite72536c32676b412cfead025b577d4e8c18d1c2f (patch)
tree41c0b6f18262cdacc29070e5fa880c6ba82c1081 /src/inc/corcompile.h
parent675622bb85f3c78de1967a78052d7280a2834611 (diff)
downloadcoreclr-e72536c32676b412cfead025b577d4e8c18d1c2f.tar.gz
coreclr-e72536c32676b412cfead025b577d4e8c18d1c2f.tar.bz2
coreclr-e72536c32676b412cfead025b577d4e8c18d1c2f.zip
Introduce new CORJIT_FLAGS type
The "JIT flags" currently passed between the EE and the JIT have traditionally been bit flags in a 32-bit word. Recently, a second 32-bit word was added to accommodate additional flags, but that set of flags is definitely "2nd class": they are not universally passed, and require using a separate set of bit definitions, and comparing those bits against the proper, 2nd word. This change replaces all uses of bare DWORD or 'unsigned int' types representing flags with CORJIT_FLAGS, which is now an opaque type. All flag names were renamed from CORJIT_FLG_* to CORJIT_FLAG_* to ensure all cases were changed to use the new names, which are also scoped within the CORJIT_FLAGS type itself. Another motivation to do this, besides cleaner code, is to allow enabling the SSE/AVX flags for x86. For x86, we had fewer bits available in the "first word", so would have to either put them in the "second word", which, as stated, was very much 2nd class and not plumbed through many usages, or we could move other bits to the "second word", with the same issues. Neither was a good option. RyuJIT compiles with both COR_JIT_EE_VERSION > 460 and <= 460. I introduced a JitFlags adapter class in jitee.h to handle both JIT flag types. All JIT code uses this JitFlags type, which operates identically to the new CORJIT_FLAGS type. In addition to introducing the new CORJIT_FLAGS type, the SSE/AVX flags are enabled for x86. The JIT-EE interface GUID is changed, as this is a breaking change.
Diffstat (limited to 'src/inc/corcompile.h')
-rw-r--r--src/inc/corcompile.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/inc/corcompile.h b/src/inc/corcompile.h
index 70db9f162b..967a7713aa 100644
--- a/src/inc/corcompile.h
+++ b/src/inc/corcompile.h
@@ -1164,7 +1164,7 @@ enum CorCompileILRegion
class ICorCompilePreloader
{
public:
- typedef void (__stdcall *CORCOMPILE_CompileStubCallback)(LPVOID pContext, CORINFO_METHOD_HANDLE hStub, DWORD dwJitFlags);
+ typedef void (__stdcall *CORCOMPILE_CompileStubCallback)(LPVOID pContext, CORINFO_METHOD_HANDLE hStub, CORJIT_FLAGS jitFlags);
//
// Map methods are available after Serialize() is called
@@ -1849,7 +1849,7 @@ class ICorCompileInfo
// Get the compilation flags that are shared between JIT and NGen
virtual HRESULT GetBaseJitFlags(
IN CORINFO_METHOD_HANDLE hMethod,
- OUT DWORD *pFlags) = 0;
+ OUT CORJIT_FLAGS *pFlags) = 0;
// needed for stubs to obtain the number of bytes to copy into the native image
// return the beginning of the stub and the size to copy (in bytes)
@@ -1887,16 +1887,16 @@ class ICorCompileInfo
/*****************************************************************************/
// This function determines the compile flags to use for a generic intatiation
// since only the open instantiation can be verified.
-// See the comment associated with CORJIT_FLG_SKIP_VERIFICATION for details.
+// See the comment associated with CORJIT_FLAG_SKIP_VERIFICATION for details.
//
// On return:
// if *raiseVerificationException=TRUE, the caller should raise a VerificationException.
// if *unverifiableGenericCode=TRUE, the method is a generic instantiation with
// unverifiable code
-CorJitFlag GetCompileFlagsIfGenericInstantiation(
+CORJIT_FLAGS GetCompileFlagsIfGenericInstantiation(
CORINFO_METHOD_HANDLE method,
- CorJitFlag compileFlags,
+ CORJIT_FLAGS compileFlags,
ICorJitInfo * pCorJitInfo,
BOOL * raiseVerificationException,
BOOL * unverifiableGenericCode);