Skip to content

Commit

Permalink
[x86] Force EBP frame for synchronized methods (dotnet#112243)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipnavara authored Feb 7, 2025
1 parent 7465997 commit 15f422d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/coreclr/jit/morph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13961,8 +13961,11 @@ void Compiler::fgSetOptions()
// an EH clause that we delete as statically dead code before we
// get here, leaving no EH clauses left, and thus no requirement
// to use a frame pointer because of EH. But until all the code uses
// the same test, leave info.compXcptnsCount here.
if (info.compXcptnsCount > 0)
// the same test, leave info.compXcptnsCount here. Also test for
// CORINFO_FLG_SYNCH methods which are converted into try-finally
// with Monitor helper calls in funclet ABI and need to be treated
// as methods with EH.
if (info.compXcptnsCount > 0 || (UsesFunclets() && (info.compFlags & CORINFO_FLG_SYNCH)))
{
codeGen->setFramePointerRequiredEH(true);

Expand Down

0 comments on commit 15f422d

Please sign in to comment.