Introduce new CORJIT_FLAGS type
authorBruce Forstall <brucefo@microsoft.com>
Wed, 26 Oct 2016 22:52:06 +0000 (15:52 -0700)
committerBruce Forstall <brucefo@microsoft.com>
Thu, 27 Oct 2016 19:08:20 +0000 (12:08 -0700)
commite85ecd6938db86e6933f9ab981cd9532757e349a
tree0763173aea3d67f278b1a61b1ae762f305f3b0ae
parent091980aa853ff8e78bdf117d96aa3543b0e8470b
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.

Commit migrated from https://github.com/dotnet/coreclr/commit/e72536c32676b412cfead025b577d4e8c18d1c2f
66 files changed:
src/coreclr/src/ToolBox/superpmi/superpmi-shared/icorjitcompilerimpl.h
src/coreclr/src/ToolBox/superpmi/superpmi-shared/icorjitinfoimpl.h
src/coreclr/src/ToolBox/superpmi/superpmi-shared/methodcontext.cpp
src/coreclr/src/ToolBox/superpmi/superpmi-shim-collector/icorjitcompiler.cpp
src/coreclr/src/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp
src/coreclr/src/ToolBox/superpmi/superpmi-shim-counter/icorjitcompiler.cpp
src/coreclr/src/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp
src/coreclr/src/ToolBox/superpmi/superpmi-shim-simple/icorjitcompiler.cpp
src/coreclr/src/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp
src/coreclr/src/ToolBox/superpmi/superpmi/icorjitinfo.cpp
src/coreclr/src/inc/corcompile.h
src/coreclr/src/inc/corinfo.h
src/coreclr/src/inc/corjit.h
src/coreclr/src/inc/zapper.h
src/coreclr/src/jit/codegencommon.cpp [changed mode: 0755->0644]
src/coreclr/src/jit/codegenlegacy.cpp
src/coreclr/src/jit/compiler.cpp
src/coreclr/src/jit/compiler.h
src/coreclr/src/jit/compiler.hpp
src/coreclr/src/jit/ee_il_dll.cpp [changed mode: 0755->0644]
src/coreclr/src/jit/ee_il_dll.hpp
src/coreclr/src/jit/emit.cpp
src/coreclr/src/jit/flowgraph.cpp
src/coreclr/src/jit/gentree.cpp
src/coreclr/src/jit/importer.cpp
src/coreclr/src/jit/inline.cpp
src/coreclr/src/jit/inline.h
src/coreclr/src/jit/instr.cpp
src/coreclr/src/jit/jit.h
src/coreclr/src/jit/jitee.h [new file with mode: 0644]
src/coreclr/src/jit/lower.cpp
src/coreclr/src/jit/simdcodegenxarch.cpp
src/coreclr/src/jit/target.h
src/coreclr/src/vm/ceeload.cpp
src/coreclr/src/vm/cgensys.h
src/coreclr/src/vm/codeman.cpp
src/coreclr/src/vm/codeman.h
src/coreclr/src/vm/commethodrental.cpp
src/coreclr/src/vm/compile.cpp
src/coreclr/src/vm/compile.h
src/coreclr/src/vm/dllimport.cpp
src/coreclr/src/vm/dllimportcallback.cpp
src/coreclr/src/vm/i386/cgenx86.cpp
src/coreclr/src/vm/ilstubcache.cpp
src/coreclr/src/vm/ilstubresolver.cpp
src/coreclr/src/vm/ilstubresolver.h
src/coreclr/src/vm/interpreter.cpp
src/coreclr/src/vm/jitinterface.cpp
src/coreclr/src/vm/jitinterface.h
src/coreclr/src/vm/method.cpp
src/coreclr/src/vm/method.hpp
src/coreclr/src/vm/methodtablebuilder.cpp
src/coreclr/src/vm/multicorejitplayer.cpp
src/coreclr/src/vm/prestub.cpp
src/coreclr/src/vm/rejit.cpp
src/coreclr/src/vm/stacksampler.cpp
src/coreclr/src/vm/stacksampler.h
src/coreclr/src/vm/stubgen.cpp
src/coreclr/src/vm/stubgen.h
src/coreclr/src/vm/util.cpp
src/coreclr/src/zap/zapimage.cpp
src/coreclr/src/zap/zapimage.h
src/coreclr/src/zap/zapinfo.cpp
src/coreclr/src/zap/zapinfo.h
src/coreclr/src/zap/zapmetadata.cpp
src/coreclr/src/zap/zapper.cpp