summaryrefslogtreecommitdiff
path: root/src/jit/stackfp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/jit/stackfp.cpp')
-rw-r--r--src/jit/stackfp.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/jit/stackfp.cpp b/src/jit/stackfp.cpp
index f975822740..43c463039e 100644
--- a/src/jit/stackfp.cpp
+++ b/src/jit/stackfp.cpp
@@ -1406,8 +1406,6 @@ void CodeGen::genCodeForTreeStackFP_Asg(GenTreePtr tree)
assert(!varDsc->lvTracked || compiler->opts.MinOpts() || !(op1NonCom->gtFlags & GTF_VAR_DEATH));
#endif
-#ifdef DEBUGGING_SUPPORT
-
/* For non-debuggable code, every definition of a lcl-var has
* to be checked to see if we need to open a new scope for it.
*/
@@ -1416,7 +1414,6 @@ void CodeGen::genCodeForTreeStackFP_Asg(GenTreePtr tree)
{
siCheckVarScope(op1NonCom->gtLclVarCommon.gtLclNum, op1NonCom->gtLclVar.gtLclILoffs);
}
-#endif
}
assert(op2);
@@ -2827,7 +2824,7 @@ void CodeGen::genCondJumpFltStackFP(GenTreePtr cond, BasicBlock* jumpTrue, Basic
BasicBlock* CodeGen::genTransitionBlockStackFP(FlatFPStateX87* pState, BasicBlock* pFrom, BasicBlock* pTarget)
{
// Fast paths where a transition block is not necessary
- if (pTarget->bbFPStateX87 && FlatFPStateX87::AreEqual(pState, pTarget->bbFPStateX87) || pState->IsEmpty())
+ if ((pTarget->bbFPStateX87 && FlatFPStateX87::AreEqual(pState, pTarget->bbFPStateX87)) || pState->IsEmpty())
{
return pTarget;
}
@@ -4143,8 +4140,26 @@ void Compiler::raEnregisterVarsPostPassStackFP()
{
raSetRegLclBirthDeath(tree, lastlife, false);
}
+
+ // Model implicit use (& hence last use) of frame list root at pinvokes.
+ if (tree->gtOper == GT_CALL)
+ {
+ GenTreeCall* call = tree->AsCall();
+ if (call->IsUnmanaged() && !opts.ShouldUsePInvokeHelpers())
+ {
+ LclVarDsc* frameVarDsc = &lvaTable[info.compLvFrameListRoot];
+
+ if (frameVarDsc->lvTracked && ((call->gtCallMoreFlags & GTF_CALL_M_FRAME_VAR_DEATH) != 0))
+ {
+ // Frame var dies here
+ unsigned varIndex = frameVarDsc->lvVarIndex;
+ VarSetOps::RemoveElemD(this, lastlife, varIndex);
+ }
+ }
+ }
}
}
+
assert(VarSetOps::Equal(this, lastlife, block->bbLiveOut));
}
compCurBB = NULL;