From 74478f481290e3e5fb8ee3c2669b66a71ae0056c Mon Sep 17 00:00:00 2001 From: Petr Bred Date: Wed, 20 Sep 2017 20:52:05 +0300 Subject: [PATCH] ARM32: fix interface dispatch cell address transfer Signed-off-by: Petr Bred --- src/jit/lower.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/jit/lower.cpp b/src/jit/lower.cpp index 05dcd08..59c64e6 100644 --- a/src/jit/lower.cpp +++ b/src/jit/lower.cpp @@ -3803,7 +3803,12 @@ GenTree* Lowering::LowerVirtualStubCall(GenTreeCall* call) // on x64 we must materialize the target using specific registers. addr->gtRegNum = comp->virtualStubParamInfo->GetReg(); +// On ARM we must use a proper address in R12(thunk register) without dereferencing. +// So for the jump we use the default register. +// TODO: specifying register probably unnecessary for other platforms, too. +#if !defined(_TARGET_UNIX_) && !defined(_TARGET_ARM_) indir->gtRegNum = REG_JUMP_THUNK_PARAM; +#endif indir->gtFlags |= GTF_IND_REQ_ADDR_IN_REG; #endif result = indir; -- 2.7.4