diff --git a/src/coreclr/inc/corinfo.h b/src/coreclr/inc/corinfo.h index ef4e633d32db..d45b29899c9c 100644 --- a/src/coreclr/inc/corinfo.h +++ b/src/coreclr/inc/corinfo.h @@ -664,12 +664,11 @@ enum CorInfoHelpFunc CORINFO_HELP_LLVM_GET_OR_INIT_SHADOW_STACK_TOP, CORINFO_HELP_LLVM_SET_SHADOW_STACK_TOP, CORINFO_HELP_LLVM_EH_CATCH, - CORINFO_HELP_LLVM_EH_CATCH_POP_UNWOUND_VIRTUAL_FRAMES, CORINFO_HELP_LLVM_EH_POP_UNWOUND_VIRTUAL_FRAMES, + CORINFO_HELP_LLVM_EH_PUSH_VIRTUAL_UNWIND_FRAME, + CORINFO_HELP_LLVM_EH_POP_VIRTUAL_UNWIND_FRAME, CORINFO_HELP_LLVM_EH_UNHANDLED_EXCEPTION, CORINFO_HELP_LLVM_RESOLVE_INTERFACE_CALL_TARGET, - CORINFO_HELP_LLVM_PUSH_VIRTUAL_UNWIND_FRAME, - CORINFO_HELP_LLVM_POP_VIRTUAL_UNWIND_FRAME, CORINFO_HELP_COUNT, }; diff --git a/src/coreclr/inc/jithelpers.h b/src/coreclr/inc/jithelpers.h index 0e4e95163893..14d483bf50bb 100644 --- a/src/coreclr/inc/jithelpers.h +++ b/src/coreclr/inc/jithelpers.h @@ -361,12 +361,11 @@ JITHELPER(CORINFO_HELP_LLVM_GET_OR_INIT_SHADOW_STACK_TOP, NULL, CORINFO_HELP_SIG_UNDEF) JITHELPER(CORINFO_HELP_LLVM_SET_SHADOW_STACK_TOP, NULL, CORINFO_HELP_SIG_UNDEF) JITHELPER(CORINFO_HELP_LLVM_EH_CATCH, NULL, CORINFO_HELP_SIG_UNDEF) - JITHELPER(CORINFO_HELP_LLVM_EH_CATCH_POP_UNWOUND_VIRTUAL_FRAMES, NULL, CORINFO_HELP_SIG_UNDEF) JITHELPER(CORINFO_HELP_LLVM_EH_POP_UNWOUND_VIRTUAL_FRAMES, NULL, CORINFO_HELP_SIG_UNDEF) + JITHELPER(CORINFO_HELP_LLVM_EH_PUSH_VIRTUAL_UNWIND_FRAME, NULL, CORINFO_HELP_SIG_UNDEF) + JITHELPER(CORINFO_HELP_LLVM_EH_POP_VIRTUAL_UNWIND_FRAME, NULL, CORINFO_HELP_SIG_UNDEF) JITHELPER(CORINFO_HELP_LLVM_EH_UNHANDLED_EXCEPTION, NULL, CORINFO_HELP_SIG_UNDEF) JITHELPER(CORINFO_HELP_LLVM_RESOLVE_INTERFACE_CALL_TARGET, NULL, CORINFO_HELP_SIG_UNDEF) - JITHELPER(CORINFO_HELP_LLVM_PUSH_VIRTUAL_UNWIND_FRAME, NULL, CORINFO_HELP_SIG_UNDEF) - JITHELPER(CORINFO_HELP_LLVM_POP_VIRTUAL_UNWIND_FRAME, NULL, CORINFO_HELP_SIG_UNDEF) #undef JITHELPER #undef DYNAMICJITHELPER diff --git a/src/coreclr/jit/llvm.cpp b/src/coreclr/jit/llvm.cpp index 3abb0c209c0d..d3dbdc42460d 100644 --- a/src/coreclr/jit/llvm.cpp +++ b/src/coreclr/jit/llvm.cpp @@ -585,12 +585,11 @@ bool Llvm::helperCallMayPhysicallyThrow(CorInfoHelpFunc helperFunc) const { FUNC(CORINFO_HELP_LLVM_GET_OR_INIT_SHADOW_STACK_TOP) CORINFO_TYPE_PTR, { }, HFIF_NO_RPI_OR_GC }, { FUNC(CORINFO_HELP_LLVM_SET_SHADOW_STACK_TOP) CORINFO_TYPE_VOID, { CORINFO_TYPE_PTR }, HFIF_NO_RPI_OR_GC }, { FUNC(CORINFO_HELP_LLVM_EH_CATCH) CORINFO_TYPE_CLASS, { CORINFO_TYPE_NATIVEUINT }, HFIF_SS_ARG }, - { FUNC(CORINFO_HELP_LLVM_EH_CATCH_POP_UNWOUND_VIRTUAL_FRAMES) CORINFO_TYPE_CLASS, { CORINFO_TYPE_NATIVEUINT }, HFIF_SS_ARG }, { FUNC(CORINFO_HELP_LLVM_EH_POP_UNWOUND_VIRTUAL_FRAMES) CORINFO_TYPE_VOID, { }, HFIF_SS_ARG }, + { FUNC(CORINFO_HELP_LLVM_EH_PUSH_VIRTUAL_UNWIND_FRAME) CORINFO_TYPE_VOID, { CORINFO_TYPE_PTR, CORINFO_TYPE_PTR, CORINFO_TYPE_NATIVEUINT }, HFIF_NO_RPI_OR_GC }, + { FUNC(CORINFO_HELP_LLVM_EH_POP_VIRTUAL_UNWIND_FRAME) CORINFO_TYPE_VOID, { }, HFIF_NO_RPI_OR_GC }, { FUNC(CORINFO_HELP_LLVM_EH_UNHANDLED_EXCEPTION) CORINFO_TYPE_VOID, { CORINFO_TYPE_CLASS }, HFIF_SS_ARG }, { FUNC(CORINFO_HELP_LLVM_RESOLVE_INTERFACE_CALL_TARGET) CORINFO_TYPE_PTR, { CORINFO_TYPE_CLASS, CORINFO_TYPE_PTR }, HFIF_SS_ARG }, - { FUNC(CORINFO_HELP_LLVM_PUSH_VIRTUAL_UNWIND_FRAME) CORINFO_TYPE_VOID, { CORINFO_TYPE_PTR, CORINFO_TYPE_PTR, CORINFO_TYPE_NATIVEUINT }, HFIF_NO_RPI_OR_GC }, - { FUNC(CORINFO_HELP_LLVM_POP_VIRTUAL_UNWIND_FRAME) CORINFO_TYPE_VOID, { }, HFIF_NO_RPI_OR_GC }, }; // clang-format on diff --git a/src/coreclr/jit/llvmlower.cpp b/src/coreclr/jit/llvmlower.cpp index 53fc254288c6..162caac34082 100644 --- a/src/coreclr/jit/llvmlower.cpp +++ b/src/coreclr/jit/llvmlower.cpp @@ -1435,7 +1435,7 @@ PhaseStatus Llvm::AddVirtualUnwindFrame() GenTree* unwindFrameLclAddr = m_compiler->gtNewLclVarAddrNode(unwindFrameLclNum); GenTreeIntCon* initialUnwindIndexNode = m_compiler->gtNewIconNode(m_initialIndexValue, TYP_I_IMPL); GenTreeCall* initializeCall = - m_compiler->gtNewHelperCallNode(CORINFO_HELP_LLVM_PUSH_VIRTUAL_UNWIND_FRAME, TYP_VOID, + m_compiler->gtNewHelperCallNode(CORINFO_HELP_LLVM_EH_PUSH_VIRTUAL_UNWIND_FRAME, TYP_VOID, unwindFrameLclAddr, unwindTableAddrNode, initialUnwindIndexNode); LIR::Range initRange; initRange.InsertAtEnd(unwindFrameLclAddr); @@ -1470,7 +1470,7 @@ PhaseStatus Llvm::AddVirtualUnwindFrame() assert(lastNode->OperIs(GT_RETURN)); GenTreeCall* popCall = - m_compiler->gtNewHelperCallNode(CORINFO_HELP_LLVM_POP_VIRTUAL_UNWIND_FRAME, TYP_VOID); + m_compiler->gtNewHelperCallNode(CORINFO_HELP_LLVM_EH_POP_VIRTUAL_UNWIND_FRAME, TYP_VOID); LIR::Range popCallRange; popCallRange.InsertAtBeginning(popCall); m_llvm->lowerRange(block, popCallRange); diff --git a/src/coreclr/jit/utils.cpp b/src/coreclr/jit/utils.cpp index a06649327d36..6f1d222c024b 100644 --- a/src/coreclr/jit/utils.cpp +++ b/src/coreclr/jit/utils.cpp @@ -1561,10 +1561,9 @@ void HelperCallProperties::init() case CORINFO_HELP_LLVM_GET_OR_INIT_SHADOW_STACK_TOP: case CORINFO_HELP_LLVM_SET_SHADOW_STACK_TOP: case CORINFO_HELP_LLVM_EH_CATCH: - case CORINFO_HELP_LLVM_EH_CATCH_POP_UNWOUND_VIRTUAL_FRAMES: case CORINFO_HELP_LLVM_EH_POP_UNWOUND_VIRTUAL_FRAMES: - case CORINFO_HELP_LLVM_PUSH_VIRTUAL_UNWIND_FRAME: - case CORINFO_HELP_LLVM_POP_VIRTUAL_UNWIND_FRAME: + case CORINFO_HELP_LLVM_EH_PUSH_VIRTUAL_UNWIND_FRAME: + case CORINFO_HELP_LLVM_EH_POP_VIRTUAL_UNWIND_FRAME: noThrow = true; mutatesHeap = true; diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoHelpFunc.cs b/src/coreclr/tools/Common/JitInterface/CorInfoHelpFunc.cs index 0ae8ea86547a..601787845bc5 100644 --- a/src/coreclr/tools/Common/JitInterface/CorInfoHelpFunc.cs +++ b/src/coreclr/tools/Common/JitInterface/CorInfoHelpFunc.cs @@ -306,12 +306,11 @@ which is the right helper to use to allocate an object of a given type. */ CORINFO_HELP_LLVM_GET_OR_INIT_SHADOW_STACK_TOP, CORINFO_HELP_LLVM_SET_SHADOW_STACK_TOP, CORINFO_HELP_LLVM_EH_CATCH, - CORINFO_HELP_LLVM_EH_CATCH_POP_UNWOUND_VIRTUAL_FRAMES, CORINFO_HELP_LLVM_EH_POP_UNWOUND_VIRTUAL_FRAMES, + CORINFO_HELP_LLVM_EH_PUSH_VIRTUAL_UNWIND_FRAME, + CORINFO_HELP_LLVM_EH_POP_VIRTUAL_UNWIND_FRAME, CORINFO_HELP_LLVM_EH_UNHANDLED_EXCEPTION, CORINFO_HELP_LLVM_RESOLVE_INTERFACE_CALL_TARGET, - CORINFO_HELP_LLVM_PUSH_VIRTUAL_UNWIND_FRAME, - CORINFO_HELP_LLVM_POP_VIRTUAL_UNWIND_FRAME, CORINFO_HELP_COUNT, } diff --git a/src/coreclr/tools/aot/ILCompiler.RyuJit/JitInterface/CorInfoImpl.RyuJit.cs b/src/coreclr/tools/aot/ILCompiler.RyuJit/JitInterface/CorInfoImpl.RyuJit.cs index 4d74bee75c36..528a1e282ee2 100644 --- a/src/coreclr/tools/aot/ILCompiler.RyuJit/JitInterface/CorInfoImpl.RyuJit.cs +++ b/src/coreclr/tools/aot/ILCompiler.RyuJit/JitInterface/CorInfoImpl.RyuJit.cs @@ -768,24 +768,21 @@ private ISymbolNode GetHelperFtnUncached(CorInfoHelpFunc ftnNum) case CorInfoHelpFunc.CORINFO_HELP_LLVM_EH_CATCH: mangledName = "RhpHandleExceptionWasmCatch"; break; - case CorInfoHelpFunc.CORINFO_HELP_LLVM_EH_CATCH_POP_UNWOUND_VIRTUAL_FRAMES: - mangledName = "RhpHandleExceptionWasmCatchAndPopUnwoundVirtualFrames"; - break; case CorInfoHelpFunc.CORINFO_HELP_LLVM_EH_POP_UNWOUND_VIRTUAL_FRAMES: mangledName = "RhpPopUnwoundVirtualFrames"; break; - case CorInfoHelpFunc.CORINFO_HELP_LLVM_EH_UNHANDLED_EXCEPTION: - mangledName = "RhpHandleUnhandledException"; - break; case CorInfoHelpFunc.CORINFO_HELP_LLVM_RESOLVE_INTERFACE_CALL_TARGET: mangledName = "RhpResolveInterfaceDispatch"; break; - case CorInfoHelpFunc.CORINFO_HELP_LLVM_PUSH_VIRTUAL_UNWIND_FRAME: + case CorInfoHelpFunc.CORINFO_HELP_LLVM_EH_PUSH_VIRTUAL_UNWIND_FRAME: mangledName = "RhpPushVirtualUnwindFrame"; break; - case CorInfoHelpFunc.CORINFO_HELP_LLVM_POP_VIRTUAL_UNWIND_FRAME: + case CorInfoHelpFunc.CORINFO_HELP_LLVM_EH_POP_VIRTUAL_UNWIND_FRAME: mangledName = "RhpPopVirtualUnwindFrame"; break; + case CorInfoHelpFunc.CORINFO_HELP_LLVM_EH_UNHANDLED_EXCEPTION: + mangledName = "RhpHandleUnhandledException"; + break; default: throw new NotImplementedException(ftnNum.ToString());