private void ThrowExceptionForHelper(ref CORINFO_HELPER_DESC throwHelper)
{ throw new NotImplementedException("ThrowExceptionForHelper"); }
- private uint SizeOfPInvokeTransitionFrame
- {
- get
- {
- // struct PInvokeTransitionFrame:
- // #ifdef _TARGET_ARM_
- // m_ChainPointer
- // #endif
- // m_RIP
- // m_FramePointer
- // m_pThread
- // m_Flags + align (no align for ARM64 that has 64 bit m_Flags)
- // m_PreserverRegs - RSP
- // No need to save other preserved regs because of the JIT ensures that there are
- // no live GC references in callee saved registers around the PInvoke callsite.
- int size = 5 * this.PointerSize;
-
- if (_compilation.TypeSystemContext.Target.Architecture == TargetArchitecture.ARM)
- size += this.PointerSize; // m_ChainPointer
-
- return (uint)size;
- }
- }
-
private void getEEInfo(ref CORINFO_EE_INFO pEEInfoOut)
{
pEEInfoOut = new CORINFO_EE_INFO();
int pointerSize = this.PointerSize;
- pEEInfoOut.inlinedCallFrameInfo.size = this.SizeOfPInvokeTransitionFrame;
+ pEEInfoOut.inlinedCallFrameInfo.size = (uint)SizeOfPInvokeTransitionFrame;
pEEInfoOut.offsetOfDelegateInstance = (uint)pointerSize; // Delegate::m_firstParameter
pEEInfoOut.offsetOfDelegateFirstTarget = OffsetOfDelegateFirstTarget;
// ** IMPORTANT ** If you ever need to change the value of this fixed size, make sure to change the R2R
// version number, otherwise older R2R images will probably crash when used.
- const int r2rInlinedCallFrameSize = TARGET_POINTER_SIZE * 11;
+ const int r2rInlinedCallFrameSize = TARGET_POINTER_SIZE * READYTORUN_PInvokeTransitionFrameSizeInPointerUnits;
#if defined(_DEBUG) && !defined(CROSSBITNESS_COMPILE)
InlinedCallFrame::GetEEInfo(&pEEInfoOut->inlinedCallFrameInfo);