diff --git a/src/coreclr/debug/inc/wasm/primitives.h b/src/coreclr/debug/inc/wasm/primitives.h index 5c428fe76ceb62..db13d971d17c44 100644 --- a/src/coreclr/debug/inc/wasm/primitives.h +++ b/src/coreclr/debug/inc/wasm/primitives.h @@ -14,7 +14,7 @@ inline CORDB_ADDRESS GetPatchEndAddr(CORDB_ADDRESS patchAddr) { - _ASSERTE("The function is not implemented on wasm"); + PORTABILITY_ASSERT("The function is not implemented on wasm"); return patchAddr; } diff --git a/src/coreclr/vm/amd64/cgencpu.h b/src/coreclr/vm/amd64/cgencpu.h index 14a6ef604b3201..63f7ccd0caf946 100644 --- a/src/coreclr/vm/amd64/cgencpu.h +++ b/src/coreclr/vm/amd64/cgencpu.h @@ -490,7 +490,7 @@ inline TADDR GetSecondArgReg(CONTEXT *context) #endif } -extern "C" TADDR GetCurrentSP(); +extern "C" void* GetCurrentSP(); // Emits: // mov r10, pv1 diff --git a/src/coreclr/vm/appdomain.cpp b/src/coreclr/vm/appdomain.cpp index 5668860ad47c92..e75348394e15c0 100644 --- a/src/coreclr/vm/appdomain.cpp +++ b/src/coreclr/vm/appdomain.cpp @@ -722,7 +722,9 @@ void SystemDomain::Attach() #ifndef FEATURE_PORTABLE_ENTRYPOINTS PrecodeStubManager::Init(); #endif // !FEATURE_PORTABLE_ENTRYPOINTS +#ifdef FEATURE_JIT JumpStubStubManager::Init(); +#endif // FEATURE_JIT RangeSectionStubManager::Init(); ILStubManager::Init(); InteropDispatchStubManager::Init(); diff --git a/src/coreclr/vm/arm/asmhelpers.S b/src/coreclr/vm/arm/asmhelpers.S index 1e485992c09ec9..74cf86fd5f31b1 100644 --- a/src/coreclr/vm/arm/asmhelpers.S +++ b/src/coreclr/vm/arm/asmhelpers.S @@ -7,13 +7,13 @@ .syntax unified .thumb -// LPVOID __stdcall GetCurrentIP(void)// +// void* GetCurrentIP(void)// LEAF_ENTRY GetCurrentIP, _TEXT mov r0, lr bx lr LEAF_END GetCurrentIP, _TEXT -// LPVOID __stdcall GetCurrentSP(void)// +// void* GetCurrentSP(void)// LEAF_ENTRY GetCurrentSP, _TEXT mov r0, sp bx lr diff --git a/src/coreclr/vm/arm/cgencpu.h b/src/coreclr/vm/arm/cgencpu.h index 51a8b98a4f13d5..fea7e5a41d5354 100644 --- a/src/coreclr/vm/arm/cgencpu.h +++ b/src/coreclr/vm/arm/cgencpu.h @@ -237,7 +237,7 @@ inline PCODE GetLR(const T_CONTEXT * context) { return PCODE(context->Lr); } -extern "C" LPVOID __stdcall GetCurrentSP(); +extern "C" void* GetCurrentSP(); inline void SetSP(T_CONTEXT *context, TADDR esp) { LIMITED_METHOD_DAC_CONTRACT; diff --git a/src/coreclr/vm/arm64/asmhelpers.S b/src/coreclr/vm/arm64/asmhelpers.S index b4b500e189c425..93abb4d13fe60f 100644 --- a/src/coreclr/vm/arm64/asmhelpers.S +++ b/src/coreclr/vm/arm64/asmhelpers.S @@ -4,13 +4,13 @@ #include "asmconstants.h" #include "unixasmmacros.inc" -// LPVOID __stdcall GetCurrentIP(void)// +// void* GetCurrentIP(void)// LEAF_ENTRY GetCurrentIP, _TEXT mov x0, lr ret lr LEAF_END GetCurrentIP, _TEXT -// LPVOID __stdcall GetCurrentSP(void)// +// void* GetCurrentSP(void)// LEAF_ENTRY GetCurrentSP, _TEXT mov x0, sp ret lr diff --git a/src/coreclr/vm/arm64/asmhelpers.asm b/src/coreclr/vm/arm64/asmhelpers.asm index 41e176a0736109..c501e0b50fa24a 100644 --- a/src/coreclr/vm/arm64/asmhelpers.asm +++ b/src/coreclr/vm/arm64/asmhelpers.asm @@ -69,13 +69,13 @@ ;;like TEXTAREA, but with 64 byte alignment so that we can align the patchable pool below to 64 without warning AREA |.text|,ALIGN=6,CODE,READONLY -;; LPVOID __stdcall GetCurrentIP(void); +;; void* GetCurrentIP(void); LEAF_ENTRY GetCurrentIP mov x0, lr ret lr LEAF_END -;; LPVOID __stdcall GetCurrentSP(void); +;; void* GetCurrentSP(void); LEAF_ENTRY GetCurrentSP mov x0, sp ret lr diff --git a/src/coreclr/vm/arm64/cgencpu.h b/src/coreclr/vm/arm64/cgencpu.h index 5f035b80150313..1a8e0367bbb001 100644 --- a/src/coreclr/vm/arm64/cgencpu.h +++ b/src/coreclr/vm/arm64/cgencpu.h @@ -261,7 +261,7 @@ inline void SetSimdReg(T_CONTEXT * context, int Regnum, NEON128 RegContent) context->V[Regnum] = RegContent; } -extern "C" LPVOID __stdcall GetCurrentSP(); +extern "C" void* GetCurrentSP(); inline void SetSP(T_CONTEXT *context, TADDR sp) { LIMITED_METHOD_DAC_CONTRACT; diff --git a/src/coreclr/vm/codeman.cpp b/src/coreclr/vm/codeman.cpp index a948316a7f1cf6..ad62d1376f92ea 100644 --- a/src/coreclr/vm/codeman.cpp +++ b/src/coreclr/vm/codeman.cpp @@ -5613,6 +5613,7 @@ void ExecutionManager::Unload(LoaderAllocator *pLoaderAllocator) #endif // FEATURE_INTERPRETER } +#ifdef HOST_64BIT // This method is used by the JIT and the runtime for PreStubs. It will return // the address of a short jump thunk that will jump to the 'target' address. // It is only needed when the target architecture has a perferred call instruction @@ -5924,6 +5925,7 @@ PCODE ExecutionManager::getNextJumpStub(MethodDesc* pMD, PCODE target, RETURN((PCODE)jumpStub); } +#endif // HOST_64BIT #endif // !DACCESS_COMPILE static void GetFuncletStartOffsetsHelper(PCODE pCodeStart, SIZE_T size, SIZE_T ofsAdj, diff --git a/src/coreclr/vm/codeman.h b/src/coreclr/vm/codeman.h index 0862961e8f1b62..ba642958007c6b 100644 --- a/src/coreclr/vm/codeman.h +++ b/src/coreclr/vm/codeman.h @@ -2388,14 +2388,14 @@ class ExecutionManager static void EnumMemoryRegions(CLRDataEnumMemoryFlags flags); #endif -#ifndef DACCESS_COMPILE +#if !defined(DACCESS_COMPILE) && defined(HOST_64BIT) static PCODE jumpStub(MethodDesc* pMD, PCODE target, BYTE * loAddr, BYTE * hiAddr, LoaderAllocator *pLoaderAllocator = NULL, bool throwOnOutOfMemoryWithinRange = true); -#endif +#endif // !defined(DACCESS_COMPILE) && defined(HOST_64BIT) private: static RangeSection * FindCodeRangeWithLock(PCODE currentPC); @@ -2459,13 +2459,13 @@ class ExecutionManager } #endif // defined(_DEBUG) -#ifndef DACCESS_COMPILE +#if !defined(DACCESS_COMPILE) && defined(HOST_64BIT) static PCODE getNextJumpStub(MethodDesc* pMD, PCODE target, BYTE * loAddr, BYTE * hiAddr, LoaderAllocator *pLoaderAllocator, bool throwOnOutOfMemoryWithinRange); -#endif +#endif // !defined(DACCESS_COMPILE) && defined(HOST_64BIT) private: // *************************************************************************** diff --git a/src/coreclr/vm/dllimport.cpp b/src/coreclr/vm/dllimport.cpp index 817cc977b629f7..f35f4088b00b46 100644 --- a/src/coreclr/vm/dllimport.cpp +++ b/src/coreclr/vm/dllimport.cpp @@ -5930,7 +5930,7 @@ void MarshalStructViaILStubCode(PCODE pStubCode, void* pManagedData, void* pNati // it can reenter managed mode and throw a CLR exception if the DLL linking // fails. //========================================================================== -EXTERN_C LPVOID STDCALL PInvokeImportWorker(PInvokeMethodDesc* pMD) +EXTERN_C void* PInvokeImportWorker(PInvokeMethodDesc* pMD) { LPVOID ret = NULL; diff --git a/src/coreclr/vm/frames.cpp b/src/coreclr/vm/frames.cpp index f879ea0b8f8421..a6abef50a209a1 100644 --- a/src/coreclr/vm/frames.cpp +++ b/src/coreclr/vm/frames.cpp @@ -634,7 +634,7 @@ void Frame::PopIfChained() } #endif // TARGET_UNIX && !DACCESS_COMPILE -#if !defined(TARGET_X86) || defined(TARGET_UNIX) +#if (!defined(TARGET_X86) || defined(TARGET_UNIX)) && !defined(TARGET_WASM) /* static */ void Frame::UpdateFloatingPointRegisters(const PREGDISPLAY pRD, TADDR targetSP) { @@ -676,7 +676,7 @@ void InlinedCallFrame::UpdateFloatingPointRegisters(const PREGDISPLAY pRD) } } } -#endif // !TARGET_X86 || TARGET_UNIX +#endif // (!TARGET_X86 || TARGET_UNIX) && !TARGET_WASM //----------------------------------------------------------------------- #endif // #ifndef DACCESS_COMPILE diff --git a/src/coreclr/vm/frames.h b/src/coreclr/vm/frames.h index 1ad9d41948543d..972b17ecb9ca00 100644 --- a/src/coreclr/vm/frames.h +++ b/src/coreclr/vm/frames.h @@ -591,9 +591,9 @@ class Frame #endif // DACCESS_COMPILE #ifndef DACCESS_COMPILE -#if !defined(TARGET_X86) || defined(TARGET_UNIX) +#if (!defined(TARGET_X86) || defined(TARGET_UNIX)) && !defined(TARGET_WASM) static void UpdateFloatingPointRegisters(const PREGDISPLAY pRD, TADDR targetSP); -#endif // !TARGET_X86 || TARGET_UNIX +#endif // (!TARGET_X86 || TARGET_UNIX) && !TARGET_WASM #endif // DACCESS_COMPILE #if defined(TARGET_UNIX) && !defined(DACCESS_COMPILE) @@ -2232,9 +2232,9 @@ class InlinedCallFrame : public Frame } #ifndef DACCESS_COMPILE -#if !defined(TARGET_X86) || defined(TARGET_UNIX) +#if (!defined(TARGET_X86) || defined(TARGET_UNIX)) && !defined(TARGET_WASM) void UpdateFloatingPointRegisters(const PREGDISPLAY pRD); -#endif // !TARGET_X86 || TARGET_UNIX +#endif // (!TARGET_X86 || TARGET_UNIX) && !TARGET_WASM #endif // DACCESS_COMPILE #ifdef FEATURE_INTERPRETER @@ -2528,6 +2528,7 @@ class InterpreterFrame : public FramedMethodFrame } #endif // HOST_AMD64 && HOST_WINDOWS +#ifndef TARGET_WASM void SetInterpExecMethodSP(TADDR sp) { LIMITED_METHOD_CONTRACT; @@ -2539,6 +2540,7 @@ class InterpreterFrame : public FramedMethodFrame LIMITED_METHOD_CONTRACT; return m_SP; } +#endif // TARGET_WASM void SetIsFaulting(bool isFaulting) { @@ -2556,7 +2558,9 @@ class InterpreterFrame : public FramedMethodFrame // Saved SSP of the InterpExecMethod for resuming after catch into interpreter frames. TADDR m_SSP; #endif // HOST_AMD64 && HOST_WINDOWS +#ifndef TARGET_WASM TADDR m_SP; +#endif // TARGET_WASM }; #endif // FEATURE_INTERPRETER diff --git a/src/coreclr/vm/i386/asmhelpers.S b/src/coreclr/vm/i386/asmhelpers.S index 634a6aaaf5d088..62578e542c87c2 100644 --- a/src/coreclr/vm/i386/asmhelpers.S +++ b/src/coreclr/vm/i386/asmhelpers.S @@ -346,7 +346,7 @@ LEAF_ENTRY GetCurrentIP, _TEXT ret LEAF_END GetCurrentIP, _TEXT -// LPVOID __stdcall GetCurrentSP(void); +// void* GetCurrentSP(void); LEAF_ENTRY GetCurrentSP, _TEXT mov eax, esp add eax, 4 diff --git a/src/coreclr/vm/i386/asmhelpers.asm b/src/coreclr/vm/i386/asmhelpers.asm index 798fefe9f564a4..77341186120aaa 100644 --- a/src/coreclr/vm/i386/asmhelpers.asm +++ b/src/coreclr/vm/i386/asmhelpers.asm @@ -713,7 +713,7 @@ _GetCurrentIP@0 proc public retn _GetCurrentIP@0 endp -; LPVOID __stdcall GetCurrentSP(void); +; void* GetCurrentSP(void); _GetCurrentSP@0 proc public mov eax, esp retn diff --git a/src/coreclr/vm/i386/cgencpu.h b/src/coreclr/vm/i386/cgencpu.h index 5e7ef2a59a0de6..021d74c9d6908b 100644 --- a/src/coreclr/vm/i386/cgencpu.h +++ b/src/coreclr/vm/i386/cgencpu.h @@ -210,7 +210,7 @@ inline TADDR GetSP(const CONTEXT * context) { return (TADDR)(context->Esp); } -EXTERN_C LPVOID STDCALL GetCurrentSP(); +EXTERN_C void* GetCurrentSP(); inline void SetSP(CONTEXT *context, TADDR esp) { LIMITED_METHOD_DAC_CONTRACT; diff --git a/src/coreclr/vm/interpexec.cpp b/src/coreclr/vm/interpexec.cpp index 77dc9f90b60f97..c2aeaef06eff31 100644 --- a/src/coreclr/vm/interpexec.cpp +++ b/src/coreclr/vm/interpexec.cpp @@ -13,6 +13,14 @@ // for numeric_limits #include +#ifdef TARGET_WASM +// Unused on WASM +#define SAVE_THE_LOWEST_SP do {} while (0) +#else +// Save the lowest SP in the current method so that we can identify it by that during stackwalk +#define SAVE_THE_LOWEST_SP pInterpreterFrame->SetInterpExecMethodSP((TADDR)GetCurrentSP()) +#endif // !TARGET_WASM + // Call invoker helpers provided by platform. void InvokeManagedMethod(MethodDesc *pMD, int8_t *pArgs, int8_t *pRet, PCODE target); void InvokeUnmanagedMethod(MethodDesc *targetMethod, int8_t *pArgs, int8_t *pRet, PCODE callTarget); @@ -809,8 +817,7 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr bool isTailcall = false; MethodDesc* targetMethod; - // Save the lowest SP in the current method so that we can identify it by that during stackwalk - pInterpreterFrame->SetInterpExecMethodSP((TADDR)GetCurrentSP()); + SAVE_THE_LOWEST_SP; MAIN_LOOP: try @@ -2629,8 +2636,7 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr pChildFrame = (InterpMethodContextFrame*)alloca(sizeof(InterpMethodContextFrame)); pChildFrame->pNext = NULL; pFrame->pNext = pChildFrame; - // Save the lowest SP in the current method so that we can identify it by that during stackwalk - pInterpreterFrame->SetInterpExecMethodSP((TADDR)GetCurrentSP()); + SAVE_THE_LOWEST_SP; } pChildFrame->ReInit(pFrame, targetIp, returnValueAddress, LOCAL_VAR_ADDR(callArgsOffset, int8_t)); pFrame = pChildFrame; @@ -2747,8 +2753,7 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr pChildFrame = (InterpMethodContextFrame*)alloca(sizeof(InterpMethodContextFrame)); pChildFrame->pNext = NULL; pFrame->pNext = pChildFrame; - // Save the lowest SP in the current method so that we can identify it by that during stackwalk - pInterpreterFrame->SetInterpExecMethodSP((TADDR)GetCurrentSP()); + SAVE_THE_LOWEST_SP; } pChildFrame->ReInit(pFrame, targetIp, returnValueAddress, callArgsAddress); pFrame = pChildFrame; @@ -3564,8 +3569,7 @@ do \ pChildFrame = (InterpMethodContextFrame*)alloca(sizeof(InterpMethodContextFrame)); pChildFrame->pNext = NULL; pFrame->pNext = pChildFrame; - // Save the lowest SP in the current method so that we can identify it by that during stackwalk - pInterpreterFrame->SetInterpExecMethodSP((TADDR)GetCurrentSP()); + SAVE_THE_LOWEST_SP; } // Set the frame to the same values as the caller frame. pChildFrame->ReInit(pFrame, pFrame->startIp, pFrame->pRetVal, pFrame->pStack); diff --git a/src/coreclr/vm/loongarch64/asmhelpers.S b/src/coreclr/vm/loongarch64/asmhelpers.S index cdcaf96184cb27..457f21b34ef022 100644 --- a/src/coreclr/vm/loongarch64/asmhelpers.S +++ b/src/coreclr/vm/loongarch64/asmhelpers.S @@ -9,7 +9,7 @@ LEAF_ENTRY GetCurrentIP, _TEXT jirl $r0, $ra, 0 LEAF_END GetCurrentIP, _TEXT -// LPVOID __stdcall GetCurrentSP(void)// +// void* GetCurrentSP(void)// LEAF_ENTRY GetCurrentSP, _TEXT ori $a0, $sp, 0 jirl $r0, $ra, 0 diff --git a/src/coreclr/vm/loongarch64/cgencpu.h b/src/coreclr/vm/loongarch64/cgencpu.h index 34ecdce9c320dd..eb12a56d8dfd19 100644 --- a/src/coreclr/vm/loongarch64/cgencpu.h +++ b/src/coreclr/vm/loongarch64/cgencpu.h @@ -211,7 +211,7 @@ inline TADDR GetReg(T_CONTEXT * context, int Regnum) return (TADDR)(&context->R0 + Regnum); } -extern "C" LPVOID __stdcall GetCurrentSP(); +extern "C" void* GetCurrentSP(); inline void SetSP(T_CONTEXT *context, TADDR sp) { LIMITED_METHOD_DAC_CONTRACT; diff --git a/src/coreclr/vm/riscv64/asmhelpers.S b/src/coreclr/vm/riscv64/asmhelpers.S index 7e2db0a99a69f9..391c176adf933f 100644 --- a/src/coreclr/vm/riscv64/asmhelpers.S +++ b/src/coreclr/vm/riscv64/asmhelpers.S @@ -9,7 +9,7 @@ LEAF_ENTRY GetCurrentIP, _TEXT ret LEAF_END GetCurrentIP, _TEXT -// LPVOID __stdcall GetCurrentSP(void)// +// void* GetCurrentSP(void)// LEAF_ENTRY GetCurrentSP, _TEXT addi a0, sp, 0 ret diff --git a/src/coreclr/vm/riscv64/cgencpu.h b/src/coreclr/vm/riscv64/cgencpu.h index f5d440918824c8..17a924d228146c 100644 --- a/src/coreclr/vm/riscv64/cgencpu.h +++ b/src/coreclr/vm/riscv64/cgencpu.h @@ -219,7 +219,7 @@ inline void SetReg(T_CONTEXT * context, int Regnum, PCODE RegContent) *(&context->R0 + Regnum) = RegContent; } -extern "C" LPVOID __stdcall GetCurrentSP(); +extern "C" void* GetCurrentSP(); inline void SetSP(T_CONTEXT *context, TADDR sp) { LIMITED_METHOD_DAC_CONTRACT; diff --git a/src/coreclr/vm/stubmgr.cpp b/src/coreclr/vm/stubmgr.cpp index 0d87bd838e9d41..7f3aeabe6ac220 100644 --- a/src/coreclr/vm/stubmgr.cpp +++ b/src/coreclr/vm/stubmgr.cpp @@ -1424,6 +1424,7 @@ BOOL StubLinkStubManager::TraceManager(Thread *thread, #endif // #ifndef DACCESS_COMPILE +#ifdef FEATURE_JIT // ------------------------------------------------------- // JumpStub stubs // @@ -1472,6 +1473,7 @@ BOOL JumpStubStubManager::DoTraceStub(PCODE stubStartAddress, return TRUE; } +#endif // FEATURE_JIT // // Stub manager for code sections. It forwards the query to the more appropriate @@ -1535,8 +1537,10 @@ BOOL RangeSectionStubManager::DoTraceStub(PCODE stubStartAddress, TraceDestinati switch (GetStubKind(stubStartAddress)) { +#ifdef FEATURE_JIT case STUB_CODE_BLOCK_JUMPSTUB: return JumpStubStubManager::g_pManager->DoTraceStub(stubStartAddress, trace); +#endif // FEATURE_JIT case STUB_CODE_BLOCK_STUBLINK: return StubLinkStubManager::g_pManager->DoTraceStub(stubStartAddress, trace); diff --git a/src/coreclr/vm/stubmgr.h b/src/coreclr/vm/stubmgr.h index c5d9495dff5bcd..47eb5d2f8aa20b 100644 --- a/src/coreclr/vm/stubmgr.h +++ b/src/coreclr/vm/stubmgr.h @@ -504,9 +504,9 @@ class StubLinkStubManager : public StubManager #endif } ; +#ifdef FEATURE_JIT // // Stub manager for jump stubs created by ExecutionManager::jumpStub() -// These are currently used only on the 64-bit targets IA64 and AMD64 // typedef VPTR(class JumpStubStubManager) PTR_JumpStubStubManager; @@ -542,6 +542,7 @@ class JumpStubStubManager : public StubManager { LIMITED_METHOD_CONTRACT; return W("JumpStub"); } #endif }; +#endif // FEATURE_JIT // // Stub manager for code sections. It forwards the query to the more appropriate diff --git a/src/coreclr/vm/threads.cpp b/src/coreclr/vm/threads.cpp index fa7735fc6ad976..003789dc8dfe6f 100644 --- a/src/coreclr/vm/threads.cpp +++ b/src/coreclr/vm/threads.cpp @@ -231,7 +231,7 @@ void Thread::SetFrame(Frame *pFrame) if (g_pConfig->fAssertOnFailFast() == false) return; - Frame* espVal = (Frame*)GetCurrentSP(); + void* espVal = GetCurrentSP(); while (pFrame != (Frame*) -1) { @@ -6812,7 +6812,7 @@ Frame * Thread::NotifyFrameChainOfExceptionUnwind(Frame* pStartFrame, LPVOID pvL while (pFrame < pvLimitSP) { CONSISTENCY_CHECK(pFrame != PTR_NULL); - CONSISTENCY_CHECK((pFrame) > static_cast((LPVOID)GetCurrentSP())); + CONSISTENCY_CHECK((pFrame) > static_cast(GetCurrentSP())); pFrame->ExceptionUnwind(); pFrame = pFrame->Next(); } diff --git a/src/coreclr/vm/wasm/cgencpu.h b/src/coreclr/vm/wasm/cgencpu.h index ebbf1cb42b64e0..1e076e9d01e089 100644 --- a/src/coreclr/vm/wasm/cgencpu.h +++ b/src/coreclr/vm/wasm/cgencpu.h @@ -7,6 +7,7 @@ #include "stublink.h" #include "utilcode.h" +#include // preferred alignment for data #define DATA_ALIGNMENT 4 @@ -30,10 +31,10 @@ struct HijackArgs { }; -inline LPVOID STDCALL GetCurrentSP() +inline void* GetCurrentSP() { - _ASSERTE("The function is not implemented on wasm, it lacks registers"); - return nullptr; + WRAPPER_NO_CONTRACT; + return (void*)emscripten_stack_get_current(); } extern PCODE GetPreStubEntryPoint(); @@ -128,19 +129,6 @@ inline BOOL ClrFlushInstructionCache(LPCVOID pCodeAddr, size_t sizeOfCode, bool return true; } -//------------------------------------------------------------------------ -inline void emitBackToBackJump(LPBYTE pBufferRX, LPBYTE pBufferRW, LPVOID target) -{ - _ASSERTE("emitBackToBackJump is not implemented on wasm"); -} - -//------------------------------------------------------------------------ -inline PCODE decodeBackToBackJump(PCODE pBuffer) -{ - _ASSERTE("decodeBackToBackJump is not implemented on wasm"); - return 0; -} - FORCEINLINE int64_t PalInterlockedCompareExchange64(_Inout_ int64_t volatile *pDst, int64_t iValue, int64_t iComparand) { int64_t result = __sync_val_compare_and_swap(pDst, iComparand, iValue); diff --git a/src/coreclr/vm/wasm/excepcpu.h b/src/coreclr/vm/wasm/excepcpu.h index bb819cae090f5d..d3dd80fe7ec526 100644 --- a/src/coreclr/vm/wasm/excepcpu.h +++ b/src/coreclr/vm/wasm/excepcpu.h @@ -29,8 +29,9 @@ PCODE GetAdjustedCallAddress(PCODE returnAddress) return returnAddress; } -inline BOOL AdjustContextForVirtualStub(EXCEPTION_RECORD *pExceptionRecord, T_CONTEXT *pContext) { - _ASSERTE("AdjustContextForVirtualStub is not implemented on wasm"); +inline BOOL AdjustContextForVirtualStub(EXCEPTION_RECORD *pExceptionRecord, T_CONTEXT *pContext) +{ + LIMITED_METHOD_CONTRACT; return FALSE; }