summaryrefslogtreecommitdiff
path: root/src/inc
diff options
context:
space:
mode:
authorPat Gavlin <pagavlin@microsoft.com>2016-05-19 19:05:53 -0700
committerPat Gavlin <pagavlin@microsoft.com>2016-05-19 19:05:53 -0700
commitaa752704910dd2322be7733f0f648e3733522f42 (patch)
tree3d98bc47c3111d6d5be6bb4b629560c5129f40d5 /src/inc
parentc61b67485a363ee38e9882cc25d3a83f5239db49 (diff)
downloadcoreclr-aa752704910dd2322be7733f0f648e3733522f42.tar.gz
coreclr-aa752704910dd2322be7733f0f648e3733522f42.tar.bz2
coreclr-aa752704910dd2322be7733f0f648e3733522f42.zip
Add some quirk and versioning flags and change some preprocessor symbols into fields of CORINFO_EE_INFO.
The quirk flags--CORJIT_FLG2_JIT32_QUIRKS and CORJIT_FLG2_JIT64_QUIRKS--are passed by the EE to request that the JIT generate appropriately compatible executable code. These flags are only passed on x86/Windows and x64/Desktop/Windows, respectively. Version numbers for GC and EH info have been added to CORINFO_EE_INFO. The EE sets these versions to indicate the formats of the aforementioned data that it supports. CORINFO_PAGE_SIZE and MAX_UNCHECKED_OFFSET_FOR_NULL_OBJECT have been converted to fields on CORINFO_EE_INFO. [tfs-changeset: 1606533]
Diffstat (limited to 'src/inc')
-rw-r--r--src/inc/corinfo.h36
-rw-r--r--src/inc/corjit.h6
2 files changed, 31 insertions, 11 deletions
diff --git a/src/inc/corinfo.h b/src/inc/corinfo.h
index 6ea69bbe87..59b5b0773f 100644
--- a/src/inc/corinfo.h
+++ b/src/inc/corinfo.h
@@ -231,11 +231,11 @@ TODO: Talk about initializing strutures before use
#if COR_JIT_EE_VERSION > 460
// Update this one
-SELECTANY const GUID JITEEVersionIdentifier = { /* 7a6aa61a-78b1-4dfb-9e06-655fb4774d7f */
- 0x7a6aa61a,
- 0x78b1,
- 0x4dfb,
- { 0x9e, 0x6, 0x65, 0x5f, 0xb4, 0x77, 0x4d, 0x7f }
+SELECTANY const GUID JITEEVersionIdentifier = { /* c635d9d7-ab32-4393-8a86-a69e0ee4beae */
+ 0xc635d9d7,
+ 0xab32,
+ 0x4393,
+ { 0x8a, 0x86, 0xa6, 0x9e, 0x0e, 0xe4, 0xbe, 0xae }
};
#else
@@ -1776,6 +1776,13 @@ struct CORINFO_CPU
DWORD dwExtendedFeatures;
};
+enum CORINFO_RUNTIME_ABI
+{
+ CORINFO_DESKTOP_ABI = 0x100,
+ CORINFO_CORECLR_ABI = 0x200,
+ CORINFO_CORERT_ABI = 0x300,
+};
+
// For some highly optimized paths, the JIT must generate code that directly
// manipulates internal EE data structures. The getEEInfo() helper returns
// this structure containing the needed offsets and values.
@@ -1815,6 +1822,16 @@ struct CORINFO_EE_INFO
#if COR_JIT_EE_VERSION > 460
// Reverse PInvoke offsets
unsigned sizeOfReversePInvokeFrame;
+
+ // OS Page size
+ size_t osPageSize;
+
+ // Null object offset
+ size_t maxUncheckedOffsetForNullObject;
+
+ // Target ABI. Combined with target architecture and OS to determine
+ // GC, EH, and unwind styles.
+ CORINFO_RUNTIME_ABI targetAbi;
#endif
CORINFO_OS osType;
@@ -1831,11 +1848,10 @@ enum { LCL_FINALLY_MARK = 0xFC }; // FC = "Finally Call"
* The following is the internal structure of an object that the compiler knows about
* when it generates code
**********************************************************************************/
-#include <pshpack4.h>
-#define CORINFO_PAGE_SIZE 0x1000 // the page size on the machine
+#if COR_JIT_EE_VERSION <= 460
-// <TODO>@TODO: put this in the CORINFO_EE_INFO data structure</TODO>
+#define CORINFO_PAGE_SIZE 0x1000 // the page size on the machine
#ifndef FEATURE_PAL
#define MAX_UNCHECKED_OFFSET_FOR_NULL_OBJECT ((32*1024)-1) // when generating JIT code
@@ -1843,6 +1859,10 @@ enum { LCL_FINALLY_MARK = 0xFC }; // FC = "Finally Call"
#define MAX_UNCHECKED_OFFSET_FOR_NULL_OBJECT ((OS_PAGE_SIZE / 2) - 1)
#endif // !FEATURE_PAL
+#endif // COR_JIT_EE_VERISION <= 460
+
+#include <pshpack4.h>
+
typedef void* CORINFO_MethodPtr; // a generic method pointer
struct CORINFO_Object
diff --git a/src/inc/corjit.h b/src/inc/corjit.h
index 8481d9acda..a091bdb95b 100644
--- a/src/inc/corjit.h
+++ b/src/inc/corjit.h
@@ -114,7 +114,6 @@ enum CorJitFlag
#endif // !defined(_TARGET_X86_) && !defined(_TARGET_AMD64_)
- CORJIT_FLG_CFI_UNWIND = 0x00004000, // Emit CFI unwind info
CORJIT_FLG_MAKEFINALCODE = 0x00008000, // Use the final code generator, i.e., not the interpreter.
CORJIT_FLG_READYTORUN = 0x00010000, // Use version-resilient code generation
@@ -147,13 +146,14 @@ enum CorJitFlag2
#if COR_JIT_EE_VERSION > 460
CORJIT_FLG2_USE_PINVOKE_HELPERS = 0x00000002, // The JIT should use the PINVOKE_{BEGIN,END} helpers instead of emitting inline transitions
CORJIT_FLG2_REVERSE_PINVOKE = 0x00000004, // The JIT should insert REVERSE_PINVOKE_{ENTER,EXIT} helpers into method prolog/epilog
+ CORJIT_FLG2_DESKTOP_QUIRKS = 0x00000008, // The JIT should generate desktop-quirk-compatible code
#endif
};
struct CORJIT_FLAGS
{
- unsigned corJitFlags; // Values are from CorJitFlag
- unsigned corJitFlags2; // Values are from CorJitFlag2
+ unsigned corJitFlags; // Values are from CorJitFlag
+ unsigned corJitFlags2; // Values are from CorJitFlag2
};
/*****************************************************************************