From c78a429613f928bce8cc277f7f371f4e071e848e Mon Sep 17 00:00:00 2001 From: Hyung-Kyu Choi Date: Fri, 31 Mar 2017 07:40:19 +0900 Subject: [PATCH] [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 --- src/coreclr/src/jit/lower.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; -- 2.7.4