summaryrefslogtreecommitdiff
path: root/src/inc
diff options
context:
space:
mode:
authorPat Gavlin <pagavlin@microsoft.com>2016-05-16 11:16:07 -0700
committerPat Gavlin <pagavlin@microsoft.com>2016-05-20 13:00:14 -0700
commit0ce37a46023f7242b8d71e5dc62376c7fbae4125 (patch)
treeb303b980c71ac5bb934a4cc6cd12083ca5f18ae4 /src/inc
parente50420e0ceae9f62a874fdef6683092c8159f586 (diff)
downloadcoreclr-0ce37a46023f7242b8d71e5dc62376c7fbae4125.tar.gz
coreclr-0ce37a46023f7242b8d71e5dc62376c7fbae4125.tar.bz2
coreclr-0ce37a46023f7242b8d71e5dc62376c7fbae4125.zip
Remove some preprocessor usage from the JIT interface.
This fixes most of #4912. - The usage of `USE_ASM_GC_WRITE_BARRIERS` has been removed. The type it guarded is now always defined. - The JIT helpers that were guarded by `_TARGET_X86_` are now always defined. - The intrinsic that was guarded by `_WIN64` is now always defined.
Diffstat (limited to 'src/inc')
-rw-r--r--src/inc/corinfo.h21
-rw-r--r--src/inc/corjit.h7
-rw-r--r--src/inc/jithelpers.h14
3 files changed, 25 insertions, 17 deletions
diff --git a/src/inc/corinfo.h b/src/inc/corinfo.h
index 59b5b0773f..fbbc95e05c 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 = { /* c635d9d7-ab32-4393-8a86-a69e0ee4beae */
- 0xc635d9d7,
- 0xab32,
- 0x4393,
- { 0x8a, 0x86, 0xa6, 0x9e, 0x0e, 0xe4, 0xbe, 0xae }
+SELECTANY const GUID JITEEVersionIdentifier = { /* 718c4238-2a85-45de-88ad-9b1fed806547 */
+ 0x718c4238,
+ 0x2a85,
+ 0x45de,
+ { 0x88, 0xad, 0x9b, 0x1f, 0xed, 0x80, 0x65, 0x47 }
};
#else
@@ -659,13 +659,11 @@ enum CorInfoHelpFunc
CORINFO_HELP_EE_PERSONALITY_ROUTINE,// Not real JIT helper. Used in native images.
CORINFO_HELP_EE_PERSONALITY_ROUTINE_FILTER_FUNCLET,// Not real JIT helper. Used in native images to detect filter funclets.
+ // ASSIGN_REF_EAX - CHECKED_ASSIGN_REF_EBP: NOGC_WRITE_BARRIERS JIT helper calls
//
- // Keep platform-specific helpers at the end so that the ids for the platform neutral helpers stay same accross platforms
+ // For unchecked versions EDX is required to point into GC heap.
//
-
-#if defined(_TARGET_X86_) || defined(_HOST_X86_) // _HOST_X86_ is for altjit
- // NOGC_WRITE_BARRIERS JIT helper calls
- // Unchecked versions EDX is required to point into GC heap
+ // NOTE: these helpers are only used for x86.
CORINFO_HELP_ASSIGN_REF_EAX, // EAX holds GC ptr, do a 'mov [EDX], EAX' and inform GC
CORINFO_HELP_ASSIGN_REF_EBX, // EBX holds GC ptr, do a 'mov [EDX], EBX' and inform GC
CORINFO_HELP_ASSIGN_REF_ECX, // ECX holds GC ptr, do a 'mov [EDX], ECX' and inform GC
@@ -679,7 +677,6 @@ enum CorInfoHelpFunc
CORINFO_HELP_CHECKED_ASSIGN_REF_ESI,
CORINFO_HELP_CHECKED_ASSIGN_REF_EDI,
CORINFO_HELP_CHECKED_ASSIGN_REF_EBP,
-#endif
CORINFO_HELP_LOOP_CLONE_CHOICE_ADDR, // Return the reference to a counter to decide to take cloned path in debug stress.
CORINFO_HELP_DEBUG_LOG_LOOP_CLONING, // Print a message that a loop cloning optimization has occurred in debug mode.
@@ -975,9 +972,7 @@ enum CorInfoIntrinsics
CORINFO_INTRINSIC_TypeNEQ,
CORINFO_INTRINSIC_Object_GetType,
CORINFO_INTRINSIC_StubHelpers_GetStubContext,
-#ifdef _WIN64
CORINFO_INTRINSIC_StubHelpers_GetStubContextAddr,
-#endif // _WIN64
CORINFO_INTRINSIC_StubHelpers_GetNDirectTarget,
CORINFO_INTRINSIC_InterlockedAdd32,
CORINFO_INTRINSIC_InterlockedAdd64,
diff --git a/src/inc/corjit.h b/src/inc/corjit.h
index a091bdb95b..e4deabd0e1 100644
--- a/src/inc/corjit.h
+++ b/src/inc/corjit.h
@@ -301,9 +301,9 @@ enum CorJitFuncKind
CORJIT_FUNC_FILTER // a funclet associated with an EH filter
};
-#if !defined(FEATURE_USE_ASM_GC_WRITE_BARRIERS) && defined(FEATURE_COUNT_GC_WRITE_BARRIERS)
-// We have a performance-investigation mode (defined by the FEATURE settings above) in which the
-// JIT adds an argument of this enumeration to checked write barrier calls, to classify them.
+// We have a performance-investigation mode (defined by the FEATURE_USE_ASM_GC_WRITE_BARRIERS and
+// FEATURE_COUNT_GC_WRITE_BARRIER preprocessor symbols) in which the JIT adds an argument of this
+// enumeration to checked write barrier calls in order to classify them.
enum CheckedWriteBarrierKinds {
CWBKind_Unclassified, // Not one of the ones below.
CWBKind_RetBuf, // Store through a return buffer pointer argument.
@@ -311,7 +311,6 @@ enum CheckedWriteBarrierKinds {
CWBKind_OtherByRefLocal, // Store through a by-ref local variable.
CWBKind_AddrOfLocal, // Store through the address of a local (arguably a bug that this happens at all).
};
-#endif
#if COR_JIT_EE_VERSION > 460
diff --git a/src/inc/jithelpers.h b/src/inc/jithelpers.h
index b8521bffc1..7441774c96 100644
--- a/src/inc/jithelpers.h
+++ b/src/inc/jithelpers.h
@@ -358,6 +358,20 @@
JITHELPER(CORINFO_HELP_CHECKED_ASSIGN_REF_ESI, JIT_CheckedWriteBarrierESI, CORINFO_HELP_SIG_NO_ALIGN_STUB)
JITHELPER(CORINFO_HELP_CHECKED_ASSIGN_REF_EDI, JIT_CheckedWriteBarrierEDI, CORINFO_HELP_SIG_NO_ALIGN_STUB)
JITHELPER(CORINFO_HELP_CHECKED_ASSIGN_REF_EBP, JIT_CheckedWriteBarrierEBP, CORINFO_HELP_SIG_NO_ALIGN_STUB)
+#else
+ JITHELPER(CORINFO_HELP_ASSIGN_REF_EAX, NULL, CORINFO_HELP_SIG_UNDEF)
+ JITHELPER(CORINFO_HELP_ASSIGN_REF_EBX, NULL, CORINFO_HELP_SIG_UNDEF)
+ JITHELPER(CORINFO_HELP_ASSIGN_REF_ECX, NULL, CORINFO_HELP_SIG_UNDEF)
+ JITHELPER(CORINFO_HELP_ASSIGN_REF_ESI, NULL, CORINFO_HELP_SIG_UNDEF)
+ JITHELPER(CORINFO_HELP_ASSIGN_REF_EDI, NULL, CORINFO_HELP_SIG_UNDEF)
+ JITHELPER(CORINFO_HELP_ASSIGN_REF_EBP, NULL, CORINFO_HELP_SIG_UNDEF)
+
+ JITHELPER(CORINFO_HELP_CHECKED_ASSIGN_REF_EAX, NULL, CORINFO_HELP_SIG_UNDEF)
+ JITHELPER(CORINFO_HELP_CHECKED_ASSIGN_REF_EBX, NULL, CORINFO_HELP_SIG_UNDEF)
+ JITHELPER(CORINFO_HELP_CHECKED_ASSIGN_REF_ECX, NULL, CORINFO_HELP_SIG_UNDEF)
+ JITHELPER(CORINFO_HELP_CHECKED_ASSIGN_REF_ESI, NULL, CORINFO_HELP_SIG_UNDEF)
+ JITHELPER(CORINFO_HELP_CHECKED_ASSIGN_REF_EDI, NULL, CORINFO_HELP_SIG_UNDEF)
+ JITHELPER(CORINFO_HELP_CHECKED_ASSIGN_REF_EBP, NULL, CORINFO_HELP_SIG_UNDEF)
#endif
JITHELPER(CORINFO_HELP_LOOP_CLONE_CHOICE_ADDR, JIT_LoopCloneChoiceAddr, CORINFO_HELP_SIG_REG_ONLY)