Skip to content

Commit d7287ba

Browse files
committed
[wasi][prototype] Adapt dotnet#130384 to current main
David's dotnet#130384 draft was written against pre-dotnet#130363 main. Adapt to build: - dac_cast<TADDR>(m_pCallSiteSP): m_pCallSiteSP is PTR_VOID, helpers take TADDR - GetWasmFramePointerFromStackPointer is now 2-arg (sp, controlPC) on main (dotnet#130363), pass (PCODE)InterpreterIP - (typo m_CallerReturnAddress -> m_pCallerReturnAddress fixed during cherry-pick resolve) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent c9dc74c commit d7287ba

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎src/coreclr/vm/wasm/helpers.cpp‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -533,10 +533,11 @@ void InlinedCallFrame::UpdateRegDisplay_Impl(const PREGDISPLAY pRD, bool updateF
533533

534534
if (m_pCallerReturnAddress == INLINED_PINVOKE_FROM_R2R)
535535
{
536-
pRD->pCurrentContext->InterpreterSP = m_pCallSiteSP;
537-
pRD->pCurrentContext->InterpreterIP = GetWasmVirtualIPFromStackPointer(m_pCallSiteSP);
536+
TADDR callSiteSP = dac_cast<TADDR>(m_pCallSiteSP);
537+
pRD->pCurrentContext->InterpreterSP = callSiteSP;
538+
pRD->pCurrentContext->InterpreterIP = GetWasmVirtualIPFromStackPointer(callSiteSP);
538539
_ASSERTE(pRD->pCurrentContext->InterpreterIP != 0); // We should be in RyuJit compiled code here
539-
pRD->pCurrentContext->InterpreterFP = GetWasmFramePointerFromStackPointer(m_pCallSiteSP, pRD->pCurrentContext->InterpreterIP);
540+
pRD->pCurrentContext->InterpreterFP = GetWasmFramePointerFromStackPointer(callSiteSP, (PCODE)pRD->pCurrentContext->InterpreterIP);
540541
}
541542
else
542543
{

0 commit comments

Comments
 (0)