Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit baeeb57

Browse files
committed
Fix build breaks in the CTP JIT.
These breaks were due to unguarded usage of constants that are not present in the CTP JIT/EE interface. [tfs-changeset: 1573367]
1 parent d53cbfb commit baeeb57

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/jit/compiler.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7725,7 +7725,14 @@ public :
77257725

77267726
// true if we should use the PINVOKE_{BEGIN,END} helpers instead of generating
77277727
// PInvoke transitions inline (e.g. when targeting CoreRT).
7728-
inline bool ShouldUsePInvokeHelpers() { return (jitFlags->corJitFlags2 & CORJIT_FLG2_USE_PINVOKE_HELPERS) != 0; }
7728+
inline bool ShouldUsePInvokeHelpers()
7729+
{
7730+
#if COR_JIT_EE_VERSION > 460
7731+
return (jitFlags->corJitFlags2 & CORJIT_FLG2_USE_PINVOKE_HELPERS) != 0;
7732+
#else
7733+
return false;
7734+
#endif
7735+
}
77297736

77307737
// true if we must generate compatible code with Jit64 quirks
77317738
inline bool IsJit64Compat()

src/jit/lower.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2648,6 +2648,7 @@ void Lowering::InsertPInvokeCallProlog(GenTreeCall* call)
26482648

26492649
noway_assert(comp->lvaInlinedPInvokeFrameVar != BAD_VAR_NUM);
26502650

2651+
#if COR_JIT_EE_VERSION > 460
26512652
if (comp->opts.ShouldUsePInvokeHelpers())
26522653
{
26532654
// First argument is the address of the frame variable.
@@ -2661,6 +2662,7 @@ void Lowering::InsertPInvokeCallProlog(GenTreeCall* call)
26612662
comp->fgInsertTreeBeforeAsEmbedded(helperCall, insertBefore, comp->compCurStmt->AsStmt(), currBlock);
26622663
return;
26632664
}
2665+
#endif
26642666

26652667
// emit the following sequence
26662668
//
@@ -2792,6 +2794,7 @@ void Lowering::InsertPInvokeCallProlog(GenTreeCall* call)
27922794
// insert the code that goes after every inlined pinvoke call
27932795
void Lowering::InsertPInvokeCallEpilog(GenTreeCall* call)
27942796
{
2797+
#if COR_JIT_EE_VERSION > 460
27952798
if (comp->opts.ShouldUsePInvokeHelpers())
27962799
{
27972800
noway_assert(comp->lvaInlinedPInvokeFrameVar != BAD_VAR_NUM);
@@ -2808,6 +2811,7 @@ void Lowering::InsertPInvokeCallEpilog(GenTreeCall* call)
28082811
comp->fgInsertTreeAfterAsEmbedded(helperCall, call, comp->compCurStmt->AsStmt(), currBlock);
28092812
return;
28102813
}
2814+
#endif
28112815

28122816
CORINFO_EE_INFO* pInfo = comp->eeGetEEInfo();
28132817
GenTreeStmt* newStmt;

0 commit comments

Comments
 (0)