From 99adda23317d943eb2644ffd87798e0e264d426b 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 (#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 --- src/jit/lower.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/jit/lower.cpp b/src/jit/lower.cpp index 573de3a..5aad06a 100644 --- a/src/jit/lower.cpp +++ b/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