Fix target register for invocation to Thunk code from generated by ReadyToRun
Target register: REG_VIRTUAL_STUB_PARAM (R4, same as LegacyJIT)
Commit migrated from https://github.com/dotnet/coreclr/commit/
9c2213765abc56f98dcb59d4567912dc5ac1e137
}
#ifdef FEATURE_READYTORUN_COMPILER
-#ifdef _TARGET_ARM64_
+#if defined(_TARGET_ARM64_)
if (tree->gtCall.IsR2RRelativeIndir())
{
ftreg |= RBM_R2R_INDIRECT_PARAM;
}
+#elif defined(_TARGET_ARM_)
+ if (tree->gtCall.IsR2RRelativeIndir())
+ {
+ ftreg |= RBM_JUMP_THUNK_PARAM;
+ }
#endif
#endif
if (call->IsR2RRelativeIndir())
{
cellAddr->gtRegNum = REG_JUMP_THUNK_PARAM;
+ indir->gtRegNum = REG_VIRTUAL_STUB_PARAM;
}
#endif
#endif