summaryrefslogtreecommitdiff
path: root/src/jit
diff options
context:
space:
mode:
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>2019-05-30 17:37:23 +0200
committerGitHub <noreply@github.com>2019-05-30 17:37:23 +0200
commit7143390a5834d22213ffbbc04f8817b1c401fb83 (patch)
tree1630ad4da5594a70b90e71df5cfdaa19a720b9e4 /src/jit
parentecc0b6f732a6b1a626d30e2c02d0bcaa7bc69668 (diff)
downloadcoreclr-7143390a5834d22213ffbbc04f8817b1c401fb83.tar.gz
coreclr-7143390a5834d22213ffbbc04f8817b1c401fb83.tar.bz2
coreclr-7143390a5834d22213ffbbc04f8817b1c401fb83.zip
Implement R2R helpers for synchronized methods (#24646)
Synchronized methods show up when `Console` is used and the missing helper mapping would cause us not to AOT compile them.
Diffstat (limited to 'src/jit')
-rw-r--r--src/jit/codegenxarch.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/jit/codegenxarch.cpp b/src/jit/codegenxarch.cpp
index 0297979266..482607f5d1 100644
--- a/src/jit/codegenxarch.cpp
+++ b/src/jit/codegenxarch.cpp
@@ -5613,6 +5613,13 @@ void CodeGen::genCallInstruction(GenTreeCall* call)
instGen(INS_vzeroupper);
}
+ if (callType == CT_HELPER && compiler->info.compFlags & CORINFO_FLG_SYNCH)
+ {
+ fPossibleSyncHelperCall = true;
+ helperNum = compiler->eeGetHelperNum(methHnd);
+ noway_assert(helperNum != CORINFO_HELP_UNDEF);
+ }
+
if (target != nullptr)
{
#ifdef _TARGET_X86_
@@ -5738,12 +5745,6 @@ void CodeGen::genCallInstruction(GenTreeCall* call)
void* pAddr = nullptr;
addr = compiler->compGetHelperFtn(helperNum, (void**)&pAddr);
assert(pAddr == nullptr);
-
- // tracking of region protected by the monitor in synchronized methods
- if (compiler->info.compFlags & CORINFO_FLG_SYNCH)
- {
- fPossibleSyncHelperCall = true;
- }
}
else
{