From: Hyung-Kyu Choi Date: Thu, 30 Mar 2017 22:40:19 +0000 (+0900) Subject: [Ryujit/ARM32][ReadyToRun] Fix invocation to Thunk (dotnet/coreclr#10348) X-Git-Tag: submit/tizen/20210909.063632~11030^2~7480 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c78a429613f928bce8cc277f7f371f4e071e848e;p=platform%2Fupstream%2Fdotnet%2Fruntime.git [Ryujit/ARM32][ReadyToRun] Fix invocation to Thunk (dotnet/coreclr#10348) Fix invocation to Thunk code from code generated from ReadyToRun. Thunk code for ARM32 accept r12 as a parameter. Signed-off-by: Hyung-Kyu Choi Commit migrated from https://github.com/dotnet/coreclr/commit/99adda23317d943eb2644ffd87798e0e264d426b --- diff --git a/src/coreclr/src/jit/lower.cpp b/src/coreclr/src/jit/lower.cpp index 573de3a..5aad06a 100644 --- a/src/coreclr/src/jit/lower.cpp +++ b/src/coreclr/src/jit/lower.cpp @@ -2542,7 +2542,7 @@ GenTree* Lowering::LowerDirectCall(GenTreeCall* call) GenTree* indir = Ind(cellAddr); #ifdef FEATURE_READYTORUN_COMPILER -#ifdef _TARGET_ARM64_ +#if defined(_TARGET_ARM64_) // For arm64, we dispatch code same as VSD using X11 for indirection cell address, // which ZapIndirectHelperThunk expects. if (call->IsR2RRelativeIndir()) @@ -2550,6 +2550,11 @@ GenTree* Lowering::LowerDirectCall(GenTreeCall* call) cellAddr->gtRegNum = REG_R2R_INDIRECT_PARAM; indir->gtRegNum = REG_JUMP_THUNK_PARAM; } +#elif defined(_TARGET_ARM_) + if (call->IsR2RRelativeIndir()) + { + cellAddr->gtRegNum = REG_JUMP_THUNK_PARAM; + } #endif #endif result = indir;