Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/coreclr/src/vm/i386/asmconstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,10 @@ ASMCONSTANTS_C_ASSERT(LazyMachState_captureEip == offsetof(LazyMachState, captur
#define VASigCookie__StubOffset 4
ASMCONSTANTS_C_ASSERT(VASigCookie__StubOffset == offsetof(VASigCookie, pNDirectILStub))

#ifndef UNIX_X86_ABI
#define SIZEOF_TailCallFrame 32
ASMCONSTANTS_C_ASSERT(SIZEOF_TailCallFrame == sizeof(TailCallFrame))
#endif // !UNIX_X86_ABI

#define SIZEOF_GSCookie 4

Expand Down
2 changes: 2 additions & 0 deletions src/coreclr/src/vm/i386/cgenx86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,7 @@ void PInvokeCalliFrame::UpdateRegDisplay(const PREGDISPLAY pRD)
RETURN;
}

#ifndef UNIX_X86_ABI
void TailCallFrame::UpdateRegDisplay(const PREGDISPLAY pRD)
{
CONTRACT_VOID
Expand Down Expand Up @@ -883,6 +884,7 @@ void TailCallFrame::UpdateRegDisplay(const PREGDISPLAY pRD)

RETURN;
}
#endif // !UNIX_X86_ABI

#ifdef FEATURE_READYTORUN
void DynamicHelperFrame::UpdateRegDisplay(const PREGDISPLAY pRD)
Expand Down
4 changes: 4 additions & 0 deletions src/coreclr/src/vm/i386/jitinterfacex86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@ HCIMPL1(Object*, AllocObjectWrapper, MethodTable *pMT)
HCIMPLEND

/*********************************************************************/
#ifndef UNIX_X86_ABI
extern "C" void* g_TailCallFrameVptr;
void* g_TailCallFrameVptr;
#endif // !UNI_X86_ABI

#ifdef FEATURE_HIJACK
extern "C" void STDCALL JIT_TailCallHelper(Thread * pThread);
Expand Down Expand Up @@ -1085,8 +1087,10 @@ void InitJITHelpers1()

// Leave the patched region writable for StompWriteBarrierEphemeral(), StompWriteBarrierResize()

#ifndef UNIX_X86_ABI
// Initialize g_TailCallFrameVptr for JIT_TailCall helper
g_TailCallFrameVptr = (void*)TailCallFrame::GetMethodFrameVPtr();
#endif // !UNIX_X86_ABI
}
#pragma warning (default : 4731)

Expand Down
5 changes: 5 additions & 0 deletions src/coreclr/src/vm/i386/virtualcallstubcpu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -696,11 +696,16 @@ extern "C" void STDCALL JIT_TailCallReturnFromVSD();
PCODE StubCallSite::GetCallerAddress()
{
LIMITED_METHOD_CONTRACT;

#ifdef UNIX_X86_ABI
return m_returnAddr;
#else // UNIX_X86_ABI
if (m_returnAddr != (PCODE)JIT_TailCallReturnFromVSD)
return m_returnAddr;

// Find the tailcallframe in the frame chain and get the actual caller from the first TailCallFrame
return TailCallFrame::FindTailCallFrame(GetThread()->GetFrame())->GetCallerAddress();
#endif // UNIX_X86_ABI
}

#ifdef STUB_LOGGING
Expand Down