Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

[x86/Linux] Enclose stub-linking methods with FEATURE_STUBS_AS_IL #8432

Merged
merged 1 commit into from
Dec 5, 2016
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
5 changes: 5 additions & 0 deletions src/vm/i386/cgenx86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,7 @@ Stub *GenerateUMThunkPrestub()
}
CONTRACT_END;

#ifndef FEATURE_STUBS_AS_IL
CPUSTUBLINKER sl;
CPUSTUBLINKER *psl = &sl;

Expand Down Expand Up @@ -809,6 +810,10 @@ Stub *GenerateUMThunkPrestub()
psl->EmitComMethodStubEpilog(UMThkCallFrame::GetMethodFrameVPtr(), rgRareLabels, rgRejoinLabels, FALSE /*Don't profile*/);

RETURN psl->Link(SystemDomain::GetGlobalLoaderAllocator()->GetExecutableHeap());
#else // FEATURE_STUBS_AS_IL
PORTABILITY_ASSERT("GenerateUMThunkPrestub");
return NULL;
#endif // FEATURE_STUBS_AS_IL
}
#endif // !FEATURE_PAL

Expand Down
2 changes: 2 additions & 0 deletions src/vm/i386/stublinkerx86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2624,6 +2624,7 @@ VOID StubLinkerCPU::EmitProfilerComCallEpilog(TADDR pFrameVptr, X86Reg regFrame)
#endif // PROFILING_SUPPORTED


#ifndef FEATURE_STUBS_AS_IL
//========================================================================
// Prolog for entering managed code from COM
// pushes the appropriate frame ptr
Expand Down Expand Up @@ -2850,6 +2851,7 @@ void StubLinkerCPU::EmitComMethodStubEpilog(TADDR pFrameVptr,
EmitLabel(rgRareLabels[0]); // label for rare setup thread
EmitRareSetup(rgRejoinLabels[0], /*fThrow*/ TRUE); // emit rare setup thread
}
#endif // !FEATURE_STUBS_AS_IL

//---------------------------------------------------------------
// Emit code to store the setup current Thread structure in eax.
Expand Down
11 changes: 7 additions & 4 deletions src/vm/i386/stublinkerx86.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,11 @@ class StubLinkerCPU : public StubLinker

VOID EmitSetup(CodeLabel *pForwardRef);
VOID EmitRareSetup(CodeLabel* pRejoinPoint, BOOL fThrow);

#ifndef FEATURE_STUBS_AS_IL
VOID EmitMethodStubProlog(TADDR pFrameVptr, int transitionBlockOffset);
VOID EmitMethodStubEpilog(WORD numArgBytes, int transitionBlockOffset);

VOID EmitCheckGSCookie(X86Reg frameReg, int gsCookieOffset);

#ifdef _TARGET_X86_
Expand All @@ -353,10 +358,8 @@ class StubLinkerCPU : public StubLinker

void EmitComMethodStubEpilog(TADDR pFrameVptr, CodeLabel** rgRareLabels,
CodeLabel** rgRejoinLabels, BOOL bShouldProfile);
#endif

VOID EmitMethodStubProlog(TADDR pFrameVptr, int transitionBlockOffset);
VOID EmitMethodStubEpilog(WORD numArgBytes, int transitionBlockOffset);
#endif // _TARGET_X86_
#endif // !FEATURE_STUBS_AS_IL

VOID EmitUnboxMethodStub(MethodDesc* pRealMD);
#if defined(FEATURE_SHARE_GENERIC_CODE)
Expand Down