diff --git a/src/coreclr/debug/ee/debugger.h b/src/coreclr/debug/ee/debugger.h index 2a5c63200327ae..9da256056f71d0 100644 --- a/src/coreclr/debug/ee/debugger.h +++ b/src/coreclr/debug/ee/debugger.h @@ -3994,6 +3994,8 @@ HANDLE OpenWin32EventOrThrow( // Returns true if the specified IL offset has a special meaning (eg. prolog, etc.) bool DbgIsSpecialILOffset(DWORD offset); +#if defined(TARGET_WINDOWS) void FixupDispatcherContext(T_DISPATCHER_CONTEXT* pDispatcherContext, T_CONTEXT* pContext, PEXCEPTION_ROUTINE pUnwindPersonalityRoutine = NULL); +#endif #endif /* DEBUGGER_H_ */ diff --git a/src/coreclr/jit/lower.cpp b/src/coreclr/jit/lower.cpp index b11495b8713921..0697a284d7fffb 100644 --- a/src/coreclr/jit/lower.cpp +++ b/src/coreclr/jit/lower.cpp @@ -3411,7 +3411,7 @@ void Lowering::RehomeArgForFastTailCall(unsigned int lclNum, //------------------------------------------------------------------------ // LowerTailCallViaJitHelper: lower a call via the tailcall JIT helper. Morph // has already inserted tailcall helper special arguments. This function inserts -// actual data for some placeholders. This function is only used on x86. +// actual data for some placeholders. This function is only used on Windows x86. // // Lower // tail.call(, int numberOfOldStackArgs, int dummyNumberOfNewStackArgs, int flags, void* dummyArg) diff --git a/src/coreclr/jit/morph.cpp b/src/coreclr/jit/morph.cpp index 8f42dd8743ce4e..4555b1dc7560fa 100644 --- a/src/coreclr/jit/morph.cpp +++ b/src/coreclr/jit/morph.cpp @@ -6319,7 +6319,7 @@ void Compiler::fgMorphTailCallViaJitHelper(GenTreeCall* call) // For the helper-assisted tail calls, we need to push all the arguments // into a single list, and then add a few extra at the beginning or end. // - // For x86, the tailcall helper is defined as: + // For Windows x86, the tailcall helper is defined as: // // JIT_TailCall(, int numberOfOldStackArgsWords, int numberOfNewStackArgsWords, int flags, void* // callTarget) diff --git a/src/coreclr/vm/CMakeLists.txt b/src/coreclr/vm/CMakeLists.txt index 9d73e3783e1aba..c6edfe5a6ff526 100644 --- a/src/coreclr/vm/CMakeLists.txt +++ b/src/coreclr/vm/CMakeLists.txt @@ -855,12 +855,6 @@ elseif(CLR_CMAKE_TARGET_ARCH_RISCV64) ) endif() -if(CLR_CMAKE_HOST_UNIX) - list(APPEND VM_SOURCES_WKS_ARCH - ${ARCH_SOURCES_DIR}/unixstubs.cpp - ) -endif(CLR_CMAKE_HOST_UNIX) - set(VM_SOURCES_DAC_ARCH exceptionhandling.cpp ) diff --git a/src/coreclr/vm/amd64/asmhelpers.S b/src/coreclr/vm/amd64/asmhelpers.S index 8d83938246a2c9..ac168bd6164585 100644 --- a/src/coreclr/vm/amd64/asmhelpers.S +++ b/src/coreclr/vm/amd64/asmhelpers.S @@ -44,6 +44,14 @@ # # *********************************************************** +# EXTERN_C void JIT_ProfilerEnterLeaveTailcallStub(UINT_PTR ProfilerHandle); +# +# +# +LEAF_ENTRY JIT_ProfilerEnterLeaveTailcallStub, _TEXT + ret +LEAF_END JIT_ProfilerEnterLeaveTailcallStub, _TEXT + # EXTERN_C void ProfileEnterNaked(FunctionIDOrClientID functionIDOrClientID, size_t profiledRsp); # # diff --git a/src/coreclr/vm/amd64/excepamd64.cpp b/src/coreclr/vm/amd64/excepamd64.cpp index 282a84c7d788db..c679a67b996fc2 100644 --- a/src/coreclr/vm/amd64/excepamd64.cpp +++ b/src/coreclr/vm/amd64/excepamd64.cpp @@ -48,12 +48,14 @@ inline PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrameWorker(UINT_PTR establi return *ppContext; } +#ifdef TARGET_WINDOWS PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(DISPATCHER_CONTEXT * pDispatcherContext) { LIMITED_METHOD_DAC_CONTRACT; return GetCONTEXTFromRedirectedStubStackFrameWorker(pDispatcherContext->EstablisherFrame); } +#endif // TARGET_WINDOWS PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(CONTEXT * pContext) { @@ -63,17 +65,14 @@ PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(CONTEXT * pContext) } #if !defined(DACCESS_COMPILE) - +#ifdef TARGET_WINDOWS FaultingExceptionFrame *GetFrameFromRedirectedStubStackFrame (DISPATCHER_CONTEXT *pDispatcherContext) { LIMITED_METHOD_CONTRACT; return (FaultingExceptionFrame*)(pDispatcherContext->EstablisherFrame + THROWSTUB_ESTABLISHER_OFFSET_FaultingExceptionFrame); } - -#endif // !DACCESS_COMPILE - -#if !defined(DACCESS_COMPILE) +#endif // TARGET_WINDOWS #define AMD64_SIZE64_PREFIX 0x48 #define AMD64_ADD_IMM8_OP 0x83 diff --git a/src/coreclr/vm/amd64/excepcpu.h b/src/coreclr/vm/amd64/excepcpu.h index 07a7d041dc9ce9..3403f99a5e8d91 100644 --- a/src/coreclr/vm/amd64/excepcpu.h +++ b/src/coreclr/vm/amd64/excepcpu.h @@ -40,14 +40,18 @@ EXTERN_C void RedirectForThrowControl(); // Retrieves the redirected CONTEXT* from the stack frame of one of the // RedirectedHandledJITCaseForXXX_Stub's. // +#ifdef TARGET_WINDOWS PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(DISPATCHER_CONTEXT * pDispatcherContext); +#endif // TARGET_WINDOWS PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(CONTEXT * pContext); +#ifdef TARGET_WINDOWS // // Retrieves the FaultingExceptionFrame* from the stack frame of // RedirectForThrowControl. // FaultingExceptionFrame *GetFrameFromRedirectedStubStackFrame (DISPATCHER_CONTEXT *pDispatcherContext); +#endif // TARGET_WINDOWS // // Functions that wrap RtlVirtualUnwind to make sure that in the AMD64 case all the diff --git a/src/coreclr/vm/amd64/unixstubs.cpp b/src/coreclr/vm/amd64/unixstubs.cpp deleted file mode 100644 index 0edb1aef92cc3e..00000000000000 --- a/src/coreclr/vm/amd64/unixstubs.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -#include "common.h" - -extern "C" -{ - void STDMETHODCALLTYPE JIT_ProfilerEnterLeaveTailcallStub(UINT_PTR ProfilerHandle) - { - } -}; diff --git a/src/coreclr/vm/arm/exceparm.cpp b/src/coreclr/vm/arm/exceparm.cpp index 517c3c774cfb99..f9ce191fa3e36f 100644 --- a/src/coreclr/vm/arm/exceparm.cpp +++ b/src/coreclr/vm/arm/exceparm.cpp @@ -7,15 +7,6 @@ #include "asmconstants.h" #include "virtualcallstub.h" -PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_DISPATCHER_CONTEXT * pDispatcherContext) -{ - LIMITED_METHOD_DAC_CONTRACT; - - UINT_PTR stackSlot = pDispatcherContext->EstablisherFrame + REDIRECTSTUB_SP_OFFSET_CONTEXT; - PTR_PTR_CONTEXT ppContext = dac_cast((TADDR)stackSlot); - return *ppContext; -} - PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_CONTEXT * pContext) { LIMITED_METHOD_DAC_CONTRACT; @@ -27,32 +18,6 @@ PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_CONTEXT * pContext) #if !defined(DACCESS_COMPILE) -// The next two functions help retrieve data kept relative to FaultingExceptionFrame that is setup -// for handling async exceptions (e.g. AV, NullRef, ThreadAbort, etc). -// -// FEF (and related data) is available relative to R4 - the thing to be kept in mind is that the -// DispatcherContext->ContextRecord: -// -// 1) represents the caller context in the first pass. -// 2) represents the current context in the second pass. -// -// Since R4 is a non-volatile register, this works for us since we setup the value of R4 -// in the redirection helpers (e.g. RedirectForThreadAbort) but do not -// change it in their respective callee functions (e.g. RedirectForThreadAbort2) -// that have the personality routines associated with them (which perform the collided unwind and also -// invoke the two functions below). -// -// Thus, when our personality routine gets called in either passes, DC->ContextRecord->R4 will -// have the same value. - -// Returns the pointer to the FEF -FaultingExceptionFrame *GetFrameFromRedirectedStubStackFrame (T_DISPATCHER_CONTEXT *pDispatcherContext) -{ - LIMITED_METHOD_CONTRACT; - - return (FaultingExceptionFrame*)((TADDR)pDispatcherContext->ContextRecord->R4); -} - // Returns TRUE if caller should resume execution. BOOL AdjustContextForVirtualStub( diff --git a/src/coreclr/vm/arm/excepcpu.h b/src/coreclr/vm/arm/excepcpu.h index f0c002e70930ce..7637cec21e76fd 100644 --- a/src/coreclr/vm/arm/excepcpu.h +++ b/src/coreclr/vm/arm/excepcpu.h @@ -26,15 +26,8 @@ class FaultingExceptionFrame; // Retrieves the redirected CONTEXT* from the stack frame of one of the // RedirectedHandledJITCaseForXXX_Stub's. // -PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_DISPATCHER_CONTEXT * pDispatcherContext); PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_CONTEXT * pContext); -// -// Retrieves the FaultingExceptionFrame* from the stack frame of -// RedirectForThrowControl. -// -FaultingExceptionFrame *GetFrameFromRedirectedStubStackFrame (T_DISPATCHER_CONTEXT *pDispatcherContext); - inline PCODE GetAdjustedCallAddress(PCODE returnAddress) { diff --git a/src/coreclr/vm/arm/unixstubs.cpp b/src/coreclr/vm/arm/unixstubs.cpp deleted file mode 100644 index 878d5b003686b6..00000000000000 --- a/src/coreclr/vm/arm/unixstubs.cpp +++ /dev/null @@ -1,4 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -#include "common.h" diff --git a/src/coreclr/vm/arm64/excepcpu.h b/src/coreclr/vm/arm64/excepcpu.h index eb575235af8feb..acbd29b102e7b5 100644 --- a/src/coreclr/vm/arm64/excepcpu.h +++ b/src/coreclr/vm/arm64/excepcpu.h @@ -28,14 +28,18 @@ class FaultingExceptionFrame; // Retrieves the redirected CONTEXT* from the stack frame of one of the // RedirectedHandledJITCaseForXXX_Stub's. // +#ifdef TARGET_WINDOWS PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_DISPATCHER_CONTEXT * pDispatcherContext); +#endif // TARGET_WINDOWS PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_CONTEXT * pContext); +#ifdef TARGET_WINDOWS // // Retrieves the FaultingExceptionFrame* from the stack frame of -// RedirectForThrowControl. +// RedirectForThreadAbort. // FaultingExceptionFrame *GetFrameFromRedirectedStubStackFrame (T_DISPATCHER_CONTEXT *pDispatcherContext); +#endif // TARGET_WINDOWS inline PCODE GetAdjustedCallAddress(PCODE returnAddress) diff --git a/src/coreclr/vm/arm64/stubs.cpp b/src/coreclr/vm/arm64/stubs.cpp index 825d2e0e4fd811..6c7b02bab13e9e 100644 --- a/src/coreclr/vm/arm64/stubs.cpp +++ b/src/coreclr/vm/arm64/stubs.cpp @@ -859,11 +859,6 @@ void emitCOMStubCall (ComCallMethodDesc *pCOMMethodRX, ComCallMethodDesc *pCOMMe } #endif // FEATURE_COMINTEROP -void JIT_TailCall() -{ - _ASSERTE(!"ARM64:NYI"); -} - #if !defined(DACCESS_COMPILE) EXTERN_C void JIT_UpdateWriteBarrierState(bool skipEphemeralCheck, size_t writeableOffset); @@ -917,6 +912,7 @@ void InitJITHelpers1() void UpdateWriteBarrierState(bool) {} #endif // !defined(DACCESS_COMPILE) +#ifdef TARGET_WINDOWS PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_DISPATCHER_CONTEXT * pDispatcherContext) { LIMITED_METHOD_DAC_CONTRACT; @@ -925,6 +921,7 @@ PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_DISPATCHER_CONTEXT * pDispa PTR_PTR_CONTEXT ppContext = dac_cast((TADDR)stackSlot); return *ppContext; } +#endif // TARGET_WINDOWS PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_CONTEXT * pContext) { @@ -936,13 +933,14 @@ PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_CONTEXT * pContext) } #if !defined(DACCESS_COMPILE) +#ifdef TARGET_WINDOWS FaultingExceptionFrame *GetFrameFromRedirectedStubStackFrame (DISPATCHER_CONTEXT *pDispatcherContext) { LIMITED_METHOD_CONTRACT; return (FaultingExceptionFrame*)((TADDR)pDispatcherContext->ContextRecord->X19); } - +#endif // TARGET_WINDOWS BOOL AdjustContextForVirtualStub( diff --git a/src/coreclr/vm/arm64/unixstubs.cpp b/src/coreclr/vm/arm64/unixstubs.cpp deleted file mode 100644 index 878d5b003686b6..00000000000000 --- a/src/coreclr/vm/arm64/unixstubs.cpp +++ /dev/null @@ -1,4 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -#include "common.h" diff --git a/src/coreclr/vm/exceptionhandling.cpp b/src/coreclr/vm/exceptionhandling.cpp index 18abf22d51a48c..eedc2b5c39c195 100644 --- a/src/coreclr/vm/exceptionhandling.cpp +++ b/src/coreclr/vm/exceptionhandling.cpp @@ -5867,7 +5867,7 @@ void TrackerAllocator::FreeTrackerMemory(ExceptionTracker* pTracker) InterlockedExchangeT(&(pTracker->m_pThread), NULL); } -#ifndef TARGET_UNIX +#ifdef TARGET_WINDOWS // This is Windows specific implementation as it is based upon the notion of collided unwind that is specific // to Windows 64bit. // @@ -5890,8 +5890,8 @@ void FixupDispatcherContext(DISPATCHER_CONTEXT* pDispatcherContext, CONTEXT* pCo } pDispatcherContext->ControlPc = (UINT_PTR) GetIP(pDispatcherContext->ContextRecord); - -#if defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64) + +#if defined(TARGET_ARM64) // Since this routine is used to fixup contexts for async exceptions, // clear the CONTEXT_UNWOUND_TO_CALL flag since, semantically, frames // where such exceptions have happened do not have callsites. On a similar @@ -5911,21 +5911,10 @@ void FixupDispatcherContext(DISPATCHER_CONTEXT* pDispatcherContext, CONTEXT* pCo // be fixing it at their end, in their implementation of collided unwind. pDispatcherContext->ContextRecord->ContextFlags &= ~CONTEXT_DEBUG_REGISTERS; -#ifdef TARGET_ARM - // But keep the architecture flag set (its part of CONTEXT_DEBUG_REGISTERS) - pDispatcherContext->ContextRecord->ContextFlags |= CONTEXT_ARM; -#elif defined(TARGET_LOONGARCH64) - // But keep the architecture flag set (its part of CONTEXT_DEBUG_REGISTERS) - pDispatcherContext->ContextRecord->ContextFlags |= CONTEXT_LOONGARCH64; -#elif defined(TARGET_RISCV64) - // But keep the architecture flag set (its part of CONTEXT_DEBUG_REGISTERS) - pDispatcherContext->ContextRecord->ContextFlags |= CONTEXT_RISCV64; -#else // TARGET_ARM64 // But keep the architecture flag set (its part of CONTEXT_DEBUG_REGISTERS) pDispatcherContext->ContextRecord->ContextFlags |= CONTEXT_ARM64; -#endif // TARGET_ARM -#endif // TARGET_ARM || TARGET_ARM64 || TARGET_LOONGARCH64 || TARGET_RISCV64 +#endif // TARGET_ARM64 INDEBUG(pDispatcherContext->FunctionEntry = (PT_RUNTIME_FUNCTION)INVALID_POINTER_CD); INDEBUG(pDispatcherContext->ImageBase = INVALID_POINTER_CD); @@ -6101,7 +6090,7 @@ HijackHandler(IN PEXCEPTION_RECORD pExceptionRecord, } -#endif // !TARGET_UNIX +#endif // !TARGET_WINDOWS #ifdef _DEBUG // IsSafeToUnwindFrameChain: diff --git a/src/coreclr/vm/i386/excepcpu.h b/src/coreclr/vm/i386/excepcpu.h index 09f0fa2fc8b725..779b6d61841a65 100644 --- a/src/coreclr/vm/i386/excepcpu.h +++ b/src/coreclr/vm/i386/excepcpu.h @@ -89,9 +89,6 @@ EXTERN_C LPVOID STDCALL COMPlusEndCatch(LPVOID ebp, DWORD ebx, DWORD edi, DWORD // RedirectedHandledJITCaseForXXX_Stub's. // PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(CONTEXT * pContext); -#ifdef FEATURE_EH_FUNCLETS -PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_DISPATCHER_CONTEXT * pDispatcherContext); -#endif // FEATURE_EH_FUNCLETS // Determine the address of the instruction that made the current call. inline diff --git a/src/coreclr/vm/i386/unixstubs.cpp b/src/coreclr/vm/i386/unixstubs.cpp deleted file mode 100644 index eb6844e1b03825..00000000000000 --- a/src/coreclr/vm/i386/unixstubs.cpp +++ /dev/null @@ -1,30 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -#include "common.h" - -EXTERN_C VOID JIT_TailCall() -{ - PORTABILITY_ASSERT("JIT_TailCall"); -} - -EXTERN_C VOID JIT_TailCallReturnFromVSD() -{ - PORTABILITY_ASSERT("JIT_TailCallReturnFromVSD"); -} - -EXTERN_C VOID JIT_TailCallVSDLeave() -{ - PORTABILITY_ASSERT("JIT_TailCallVSDLeave"); -} - -EXTERN_C VOID JIT_TailCallLeave() -{ - PORTABILITY_ASSERT("JIT_TailCallLeave"); -} - -PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_DISPATCHER_CONTEXT * pDispatcherContext) -{ - PORTABILITY_ASSERT("GetCONTEXTFromRedirectedStubStackFrame"); - return NULL; -} diff --git a/src/coreclr/vm/i386/virtualcallstubcpu.hpp b/src/coreclr/vm/i386/virtualcallstubcpu.hpp index 34a9c4d86c0ed6..6da58594858d04 100644 --- a/src/coreclr/vm/i386/virtualcallstubcpu.hpp +++ b/src/coreclr/vm/i386/virtualcallstubcpu.hpp @@ -690,8 +690,10 @@ StubCallSite::StubCallSite(TADDR siteAddrForRegisterIndirect, PCODE returnAddr) } } +#ifndef UNIX_X86_ABI // the special return address for VSD tailcalls extern "C" void STDCALL JIT_TailCallReturnFromVSD(); +#endif // UNIX_X86_ABI PCODE StubCallSite::GetCallerAddress() { diff --git a/src/coreclr/vm/jitinterface.h b/src/coreclr/vm/jitinterface.h index 2dd59db18807cb..746ead51959265 100644 --- a/src/coreclr/vm/jitinterface.h +++ b/src/coreclr/vm/jitinterface.h @@ -352,24 +352,19 @@ extern "C" { #ifndef FEATURE_EH_FUNCLETS void STDCALL JIT_EndCatch(); // JIThelp.asm/JIThelp.s -#endif // TARGET_X86 +#endif // FEATURE_EH_FUNCLETS void STDCALL JIT_ByRefWriteBarrier(); // JIThelp.asm/JIThelp.s -#if defined(TARGET_AMD64) || defined(TARGET_ARM) - - FCDECL2VA(void, JIT_TailCall, PCODE copyArgs, PCODE target); - -#else // TARGET_AMD64 || TARGET_ARM - +#if defined(TARGET_X86) && !defined(UNIX_X86_ABI) void STDCALL JIT_TailCall(); // JIThelp.asm - -#endif // TARGET_AMD64 || TARGET_ARM +#endif // defined(TARGET_X86) && !defined(UNIX_X86_ABI) void STDMETHODCALLTYPE JIT_ProfilerEnterLeaveTailcallStub(UINT_PTR ProfilerHandle); #if !defined(TARGET_ARM64) && !defined(TARGET_LOONGARCH64) && !defined(TARGET_RISCV64) + // TODO: implement stack probing for other architectures https://github.com/dotnet/runtime/issues/13519 void STDCALL JIT_StackProbe(); -#endif // TARGET_ARM64 +#endif // !defined(TARGET_ARM64) && !defined(TARGET_LOONGARCH64) && !defined(TARGET_RISCV64) }; /*********************************************************************/ diff --git a/src/coreclr/vm/loongarch64/excepcpu.h b/src/coreclr/vm/loongarch64/excepcpu.h index 4146f7c6bd9417..8d2e1fdbbd2c07 100644 --- a/src/coreclr/vm/loongarch64/excepcpu.h +++ b/src/coreclr/vm/loongarch64/excepcpu.h @@ -24,15 +24,8 @@ class FaultingExceptionFrame; // Retrieves the redirected CONTEXT* from the stack frame of one of the // RedirectedHandledJITCaseForXXX_Stub's. // -PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_DISPATCHER_CONTEXT * pDispatcherContext); PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_CONTEXT * pContext); -// -// Retrieves the FaultingExceptionFrame* from the stack frame of -// RedirectForThrowControl. -// -FaultingExceptionFrame *GetFrameFromRedirectedStubStackFrame (T_DISPATCHER_CONTEXT *pDispatcherContext); - inline PCODE GetAdjustedCallAddress(PCODE returnAddress) { diff --git a/src/coreclr/vm/loongarch64/stubs.cpp b/src/coreclr/vm/loongarch64/stubs.cpp index c8e612ea2a9159..391c6fdf4cdd9e 100644 --- a/src/coreclr/vm/loongarch64/stubs.cpp +++ b/src/coreclr/vm/loongarch64/stubs.cpp @@ -892,11 +892,6 @@ void emitCOMStubCall (ComCallMethodDesc *pCOMMethodRX, ComCallMethodDesc *pCOMMe #endif // FEATURE_COMINTEROP -void JIT_TailCall() -{ - _ASSERTE(!"LOONGARCH64:NYI"); -} - #if !defined(DACCESS_COMPILE) EXTERN_C void JIT_UpdateWriteBarrierState(bool skipEphemeralCheck, size_t writeableOffset); @@ -949,15 +944,6 @@ void InitJITHelpers1() void UpdateWriteBarrierState(bool) {} #endif // !defined(DACCESS_COMPILE) -PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_DISPATCHER_CONTEXT * pDispatcherContext) -{ - LIMITED_METHOD_DAC_CONTRACT; - - DWORD64 stackSlot = pDispatcherContext->EstablisherFrame + REDIRECTSTUB_SP_OFFSET_CONTEXT; - PTR_PTR_CONTEXT ppContext = dac_cast((TADDR)stackSlot); - return *ppContext; -} - PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_CONTEXT * pContext) { LIMITED_METHOD_DAC_CONTRACT; @@ -968,13 +954,6 @@ PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_CONTEXT * pContext) } #if !defined(DACCESS_COMPILE) -FaultingExceptionFrame *GetFrameFromRedirectedStubStackFrame (DISPATCHER_CONTEXT *pDispatcherContext) -{ - LIMITED_METHOD_CONTRACT; - - return (FaultingExceptionFrame*)((TADDR)pDispatcherContext->ContextRecord->S0); -} - BOOL AdjustContextForVirtualStub( diff --git a/src/coreclr/vm/loongarch64/unixstubs.cpp b/src/coreclr/vm/loongarch64/unixstubs.cpp deleted file mode 100644 index 878d5b003686b6..00000000000000 --- a/src/coreclr/vm/loongarch64/unixstubs.cpp +++ /dev/null @@ -1,4 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -#include "common.h" diff --git a/src/coreclr/vm/ppc64le/unixstubs.cpp b/src/coreclr/vm/ppc64le/unixstubs.cpp deleted file mode 100644 index d51902a949f26c..00000000000000 --- a/src/coreclr/vm/ppc64le/unixstubs.cpp +++ /dev/null @@ -1,12 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -#include "common.h" - -extern "C" -{ - void RedirectForThrowControl() - { - PORTABILITY_ASSERT("Implement for PAL"); - } -}; diff --git a/src/coreclr/vm/riscv64/excepcpu.h b/src/coreclr/vm/riscv64/excepcpu.h index eb575235af8feb..416828487517d8 100644 --- a/src/coreclr/vm/riscv64/excepcpu.h +++ b/src/coreclr/vm/riscv64/excepcpu.h @@ -28,15 +28,8 @@ class FaultingExceptionFrame; // Retrieves the redirected CONTEXT* from the stack frame of one of the // RedirectedHandledJITCaseForXXX_Stub's. // -PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_DISPATCHER_CONTEXT * pDispatcherContext); PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_CONTEXT * pContext); -// -// Retrieves the FaultingExceptionFrame* from the stack frame of -// RedirectForThrowControl. -// -FaultingExceptionFrame *GetFrameFromRedirectedStubStackFrame (T_DISPATCHER_CONTEXT *pDispatcherContext); - inline PCODE GetAdjustedCallAddress(PCODE returnAddress) { diff --git a/src/coreclr/vm/riscv64/stubs.cpp b/src/coreclr/vm/riscv64/stubs.cpp index 3d48d68a4163f5..0d3d0e2f80d7cd 100644 --- a/src/coreclr/vm/riscv64/stubs.cpp +++ b/src/coreclr/vm/riscv64/stubs.cpp @@ -790,11 +790,6 @@ void emitCOMStubCall (ComCallMethodDesc *pCOMMethodRX, ComCallMethodDesc *pCOMMe } #endif // FEATURE_COMINTEROP -void JIT_TailCall() -{ - _ASSERTE(!"RISCV64:NYI"); -} - #if !defined(DACCESS_COMPILE) EXTERN_C void JIT_UpdateWriteBarrierState(bool skipEphemeralCheck, size_t writeableOffset); @@ -847,15 +842,6 @@ void InitJITHelpers1() void UpdateWriteBarrierState(bool) {} #endif // !defined(DACCESS_COMPILE) -PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_DISPATCHER_CONTEXT * pDispatcherContext) -{ - LIMITED_METHOD_DAC_CONTRACT; - - DWORD64 stackSlot = pDispatcherContext->EstablisherFrame + REDIRECTSTUB_SP_OFFSET_CONTEXT; - PTR_PTR_CONTEXT ppContext = dac_cast((TADDR)stackSlot); - return *ppContext; -} - PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_CONTEXT * pContext) { LIMITED_METHOD_DAC_CONTRACT; @@ -866,14 +852,6 @@ PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_CONTEXT * pContext) } #if !defined(DACCESS_COMPILE) -FaultingExceptionFrame *GetFrameFromRedirectedStubStackFrame (DISPATCHER_CONTEXT *pDispatcherContext) -{ - _ASSERTE(!"RISCV64: not implementation on riscv64!!!"); - LIMITED_METHOD_CONTRACT; - - return (FaultingExceptionFrame*)NULL; -} - BOOL AdjustContextForVirtualStub( diff --git a/src/coreclr/vm/riscv64/unixstubs.cpp b/src/coreclr/vm/riscv64/unixstubs.cpp deleted file mode 100644 index 878d5b003686b6..00000000000000 --- a/src/coreclr/vm/riscv64/unixstubs.cpp +++ /dev/null @@ -1,4 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -#include "common.h" diff --git a/src/coreclr/vm/s390x/unixstubs.cpp b/src/coreclr/vm/s390x/unixstubs.cpp deleted file mode 100644 index d51902a949f26c..00000000000000 --- a/src/coreclr/vm/s390x/unixstubs.cpp +++ /dev/null @@ -1,12 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -#include "common.h" - -extern "C" -{ - void RedirectForThrowControl() - { - PORTABILITY_ASSERT("Implement for PAL"); - } -};