From: Gleb Balykov Date: Wed, 6 May 2020 18:35:03 +0000 (+0300) Subject: Fix Linux x86 build error related to #35552 (#35892) X-Git-Tag: submit/tizen/20210909.063632~8149 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=87f7afa0ae356678485e8a9cb51ea0cd07c84c47;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Fix Linux x86 build error related to #35552 (#35892) --- diff --git a/src/coreclr/src/vm/i386/asmconstants.h b/src/coreclr/src/vm/i386/asmconstants.h index 33bb341..34e2da5 100644 --- a/src/coreclr/src/vm/i386/asmconstants.h +++ b/src/coreclr/src/vm/i386/asmconstants.h @@ -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 diff --git a/src/coreclr/src/vm/i386/cgenx86.cpp b/src/coreclr/src/vm/i386/cgenx86.cpp index 3563e8e..887b24e 100644 --- a/src/coreclr/src/vm/i386/cgenx86.cpp +++ b/src/coreclr/src/vm/i386/cgenx86.cpp @@ -838,6 +838,7 @@ void PInvokeCalliFrame::UpdateRegDisplay(const PREGDISPLAY pRD) RETURN; } +#ifndef UNIX_X86_ABI void TailCallFrame::UpdateRegDisplay(const PREGDISPLAY pRD) { CONTRACT_VOID @@ -883,6 +884,7 @@ void TailCallFrame::UpdateRegDisplay(const PREGDISPLAY pRD) RETURN; } +#endif // !UNIX_X86_ABI #ifdef FEATURE_READYTORUN void DynamicHelperFrame::UpdateRegDisplay(const PREGDISPLAY pRD) diff --git a/src/coreclr/src/vm/i386/jitinterfacex86.cpp b/src/coreclr/src/vm/i386/jitinterfacex86.cpp index 82b36f5..72c9709 100644 --- a/src/coreclr/src/vm/i386/jitinterfacex86.cpp +++ b/src/coreclr/src/vm/i386/jitinterfacex86.cpp @@ -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); @@ -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) diff --git a/src/coreclr/src/vm/i386/virtualcallstubcpu.hpp b/src/coreclr/src/vm/i386/virtualcallstubcpu.hpp index b8f9e1a..f8e4982 100644 --- a/src/coreclr/src/vm/i386/virtualcallstubcpu.hpp +++ b/src/coreclr/src/vm/i386/virtualcallstubcpu.hpp @@ -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