From: Jan Kotas Date: Thu, 24 Sep 2015 01:34:37 +0000 (-0700) Subject: Handle direct call ReadyToRun helpers X-Git-Tag: accepted/tizen/base/20180629.140029~6375^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7291e2f10a7812807c558f04527142496e750241;p=platform%2Fupstream%2Fcoreclr.git Handle direct call ReadyToRun helpers Add missing check in the JIT to generate correct code for direct call ReadyToRun helpers. I have run into this bug while experimenting with ReadyToRun optimizations. It is not observable bug today because of crossgen happens to always emit ReadyToRun helpers as indirect calls. --- diff --git a/src/jit/codegenxarch.cpp b/src/jit/codegenxarch.cpp index 1f590ab..7099de3 100644 --- a/src/jit/codegenxarch.cpp +++ b/src/jit/codegenxarch.cpp @@ -5097,7 +5097,7 @@ void CodeGen::genCallInstruction(GenTreePtr node) #if defined(_TARGET_AMD64_) && defined(FEATURE_READYTORUN_COMPILER) else if (call->gtEntryPoint.addr != nullptr) { - genEmitCall(emitter::EC_FUNC_TOKEN_INDIR, + genEmitCall((call->gtEntryPoint.accessType == IAT_VALUE) ? emitter::EC_FUNC_TOKEN : emitter::EC_FUNC_TOKEN_INDIR, methHnd, INDEBUG_LDISASM_COMMA(sigInfo) (void*) call->gtEntryPoint.addr,