Skip to content

Commit 550dec6

Browse files
committed
Allow generating the secret stub arg when using P/Invoke helpers
1 parent 51161e2 commit 550dec6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/coreclr/jit/lower.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -5943,13 +5943,6 @@ void Lowering::InsertPInvokeMethodProlog()
59435943
noway_assert(comp->info.compUnmanagedCallCountWithGCTransition);
59445944
noway_assert(comp->lvaInlinedPInvokeFrameVar != BAD_VAR_NUM);
59455945

5946-
if (comp->opts.ShouldUsePInvokeHelpers())
5947-
{
5948-
return;
5949-
}
5950-
5951-
JITDUMP("======= Inserting PInvoke method prolog\n");
5952-
59535946
LIR::Range& firstBlockRange = LIR::AsRange(comp->fgFirstBB);
59545947

59555948
const CORINFO_EE_INFO* pInfo = comp->eeGetEEInfo();
@@ -5972,6 +5965,13 @@ void Lowering::InsertPInvokeMethodProlog()
59725965
DISPTREERANGE(firstBlockRange, store);
59735966
}
59745967

5968+
if (comp->opts.ShouldUsePInvokeHelpers())
5969+
{
5970+
return;
5971+
}
5972+
5973+
JITDUMP("======= Inserting PInvoke method prolog\n");
5974+
59755975
// Call runtime helper to fill in our InlinedCallFrame and push it on the Frame list:
59765976
// TCB = CORINFO_HELP_INIT_PINVOKE_FRAME(&symFrameStart);
59775977
GenTree* frameAddr = comp->gtNewLclVarAddrNode(comp->lvaInlinedPInvokeFrameVar);

0 commit comments

Comments
 (0)