From: Jonghyun Park Date: Tue, 24 Jan 2017 06:50:20 +0000 (+0900) Subject: Rename Esp in x86 REGDISPLAY as SP (dotnet/coreclr#9070) X-Git-Tag: submit/tizen/20210909.063632~11030^2~8363 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d42cc844940cf9a37f4b005710b0af89fb915b0e;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Rename Esp in x86 REGDISPLAY as SP (dotnet/coreclr#9070) * Rename Esp in x86 REGDISPLAY as SP * Fix x86/Windows build error Commit migrated from https://github.com/dotnet/coreclr/commit/7a1185d4abce994bebb1aaa604730c79dce70186 --- diff --git a/src/coreclr/src/debug/daccess/dacdbiimplstackwalk.cpp b/src/coreclr/src/debug/daccess/dacdbiimplstackwalk.cpp index d3a2a63..7ab7ac7 100644 --- a/src/coreclr/src/debug/daccess/dacdbiimplstackwalk.cpp +++ b/src/coreclr/src/debug/daccess/dacdbiimplstackwalk.cpp @@ -1163,7 +1163,7 @@ void DacDbiInterfaceImpl::UpdateContextFromRegDisp(REGDISPLAY * pRegDisp, pContext->Eax = *pRegDisp->pEax; pContext->Ecx = *pRegDisp->pEcx; pContext->Edx = *pRegDisp->pEdx; - pContext->Esp = pRegDisp->Esp; + pContext->Esp = pRegDisp->SP; pContext->Eip = pRegDisp->ControlPC; // If we still have the pointer to the leaf CONTEXT, and the leaf CONTEXT is the same as the CONTEXT for diff --git a/src/coreclr/src/debug/ee/debugger.inl b/src/coreclr/src/debug/ee/debugger.inl index dbd5479..54ac8b9 100644 --- a/src/coreclr/src/debug/ee/debugger.inl +++ b/src/coreclr/src/debug/ee/debugger.inl @@ -242,7 +242,7 @@ inline void FuncEvalFrame::UpdateRegDisplay(const PREGDISPLAY pRD) pRD->pEcx = &(pDE->m_context.Ecx); pRD->pEax = &(pDE->m_context.Eax); pRD->pEbp = &(pDE->m_context.Ebp); - pRD->Esp = (DWORD)GetSP(&pDE->m_context); + pRD->SP = (DWORD)GetSP(&pDE->m_context); pRD->PCTAddr = GetReturnAddressPtr(); pRD->ControlPC = *PTR_PCODE(pRD->PCTAddr); diff --git a/src/coreclr/src/debug/ee/i386/x86walker.cpp b/src/coreclr/src/debug/ee/i386/x86walker.cpp index dd03468..5266668 100644 --- a/src/coreclr/src/debug/ee/i386/x86walker.cpp +++ b/src/coreclr/src/debug/ee/i386/x86walker.cpp @@ -304,7 +304,7 @@ DWORD NativeWalker::GetRegisterValue(int registerNumber) return *m_registers->pEbx; break; case 4: - return m_registers->Esp; + return m_registers->SP; break; case 5: return *m_registers->pEbp; diff --git a/src/coreclr/src/debug/shared/i386/primitives.cpp b/src/coreclr/src/debug/shared/i386/primitives.cpp index e47f3e7..d3c7c76 100644 --- a/src/coreclr/src/debug/shared/i386/primitives.cpp +++ b/src/coreclr/src/debug/shared/i386/primitives.cpp @@ -113,7 +113,7 @@ void SetDebuggerREGDISPLAYFromREGDISPLAY(DebuggerREGDISPLAY* pDRD, REGDISPLAY* p pDRD->pEax = NULL; #endif // !USE_REMOTE_REGISTER_ADDRESS - pDRD->SP = pRD->Esp; + pDRD->SP = pRD->SP; pDRD->PC = pRD->ControlPC; // Please leave EBP, ESP, EIP at the front so I don't have to scroll diff --git a/src/coreclr/src/inc/regdisp.h b/src/coreclr/src/inc/regdisp.h index 6806000..a1c9fe2 100644 --- a/src/coreclr/src/inc/regdisp.h +++ b/src/coreclr/src/inc/regdisp.h @@ -54,7 +54,7 @@ struct REGDISPLAY { DWORD * pEax; DWORD * pEbp; - DWORD Esp; // (Esp) Stack Pointer + DWORD SP; // Stack Pointer PCODE ControlPC; TADDR PCTAddr; @@ -63,13 +63,13 @@ struct REGDISPLAY { inline TADDR GetRegdisplaySP(REGDISPLAY *display) { LIMITED_METHOD_DAC_CONTRACT; - return (TADDR)display->Esp; + return (TADDR)display->SP; } inline void SetRegdisplaySP(REGDISPLAY *display, LPVOID sp ) { LIMITED_METHOD_DAC_CONTRACT; - (display->Esp) = (DWORD)(size_t)sp; + (display->SP) = (DWORD)(size_t)sp; } inline TADDR GetRegdisplayFP(REGDISPLAY *display) { @@ -379,7 +379,7 @@ inline void SyncRegDisplayToCurrentContext(REGDISPLAY* pRD) pRD->SP = (DWORD)GetSP(pRD->pCurrentContext); pRD->ControlPC = (DWORD)GetIP(pRD->pCurrentContext); #elif defined(_TARGET_X86_) // _TARGET_ARM_ - pRD->Esp = (DWORD)GetSP(pRD->pCurrentContext); + pRD->SP = (DWORD)GetSP(pRD->pCurrentContext); pRD->ControlPC = (DWORD)GetIP(pRD->pCurrentContext); #else // _TARGET_X86_ PORTABILITY_ASSERT("SyncRegDisplayToCurrentContext"); @@ -407,7 +407,7 @@ inline void FillRegDisplay(const PREGDISPLAY pRD, PT_CONTEXT pctx, PT_CONTEXT pC pRD->pEax = &(pctx->Eax); pRD->pEcx = &(pctx->Ecx); pRD->pEdx = &(pctx->Edx); - pRD->Esp = pctx->Esp; + pRD->SP = pctx->Esp; pRD->ControlPC = (PCODE)(pctx->Eip); pRD->PCTAddr = (UINT_PTR)&(pctx->Eip); #else // _TARGET_X86_ @@ -499,7 +499,7 @@ inline void CopyRegDisplay(const PREGDISPLAY pInRD, PREGDISPLAY pOutRD, T_CONTEX if (pInRD->pEax != NULL) {pOutCtx->Eax = *pInRD->pEax;} else {pInRD->pEax = NULL;} if (pInRD->pEcx != NULL) {pOutCtx->Ecx = *pInRD->pEcx;} else {pInRD->pEcx = NULL;} if (pInRD->pEdx != NULL) {pOutCtx->Edx = *pInRD->pEdx;} else {pInRD->pEdx = NULL;} - pOutCtx->Esp = pInRD->Esp; + pOutCtx->Esp = pInRD->SP; pOutCtx->Eip = pInRD->ControlPC; #else // _TARGET_X86_ PORTABILITY_ASSERT("CopyRegDisplay"); @@ -591,7 +591,7 @@ inline void UpdateContextFromRegDisp(PREGDISPLAY pRegDisp, PT_CONTEXT pContext) pContext->Eax = *pRegDisp->pEax; pContext->Ecx = *pRegDisp->pEcx; pContext->Edx = *pRegDisp->pEdx; - pContext->Esp = pRegDisp->Esp; + pContext->Esp = pRegDisp->SP; pContext->Eip = pRegDisp->ControlPC; #else // _TARGET_X86_ PORTABILITY_ASSERT("UpdateContextFromRegDisp"); diff --git a/src/coreclr/src/unwinder/i386/unwinder_i386.cpp b/src/coreclr/src/unwinder/i386/unwinder_i386.cpp index 8d2ea53..05fa4a1 100644 --- a/src/coreclr/src/unwinder/i386/unwinder_i386.cpp +++ b/src/coreclr/src/unwinder/i386/unwinder_i386.cpp @@ -92,7 +92,7 @@ OOPStackUnwinderX86::VirtualUnwind( { rd.pEbp = &(ContextRecord->Ebp); } - rd.Esp = ContextRecord->Esp; + rd.SP = ContextRecord->Esp; rd.ControlPC = (PCODE)(ContextRecord->Eip); rd.PCTAddr = (UINT_PTR)&(ContextRecord->Eip); @@ -118,7 +118,7 @@ OOPStackUnwinderX86::VirtualUnwind( #undef CALLEE_SAVED_REGISTER } - ContextRecord->Esp = rd.Esp; + ContextRecord->Esp = rd.SP; ContextRecord->Eip = rd.ControlPC; ContextRecord->Ebp = *rd.pEbp; diff --git a/src/coreclr/src/vm/eetwain.cpp b/src/coreclr/src/vm/eetwain.cpp index 414f8f3..b445690 100644 --- a/src/coreclr/src/vm/eetwain.cpp +++ b/src/coreclr/src/vm/eetwain.cpp @@ -3135,17 +3135,17 @@ void EECodeManager::QuickUnwindStackFrame(PREGDISPLAY pRD, StackwalkCacheEntry * _ASSERTE(pCacheEntry->fUseEbp); // EBP frame, update ESP through EBP, since ESPOffset may vary pRD->pEbp = PTR_DWORD((TADDR)*pRD->pEbp); - pRD->Esp = (TADDR)pRD->pEbp + sizeof(void*); + pRD->SP = (TADDR)pRD->pEbp + sizeof(void*); } else { _ASSERTE(!pCacheEntry->fUseEbp); // ESP frame, update up to retAddr using ESPOffset - pRD->Esp += pCacheEntry->ESPOffset; + pRD->SP += pCacheEntry->ESPOffset; } - pRD->PCTAddr = (TADDR)pRD->Esp; + pRD->PCTAddr = (TADDR)pRD->SP; pRD->ControlPC = *PTR_PCODE(pRD->PCTAddr); - pRD->Esp += sizeof(void*) + pCacheEntry->argSize; + pRD->SP += sizeof(void*) + pCacheEntry->argSize; #elif defined(_TARGET_AMD64_) if (pRD->IsCallerContextValid) @@ -3234,7 +3234,7 @@ void UnwindEspFrameEpilog( _ASSERTE(info->epilogOffs > 0); int offset = 0; - unsigned ESP = pContext->Esp; + unsigned ESP = pContext->SP; if (info->rawStkSize) { @@ -3302,7 +3302,7 @@ void UnwindEspFrameEpilog( pContext->PCTAddr = (TADDR)ESP; pContext->ControlPC = *PTR_PCODE(pContext->PCTAddr); - pContext->Esp = ESP; + pContext->SP = ESP; } /*****************************************************************************/ @@ -3326,7 +3326,7 @@ void UnwindEbpDoubleAlignFrameEpilog( have already been popped */ int offset = 0; - unsigned ESP = pContext->Esp; + unsigned ESP = pContext->SP; bool needMovEspEbp = false; @@ -3434,7 +3434,7 @@ void UnwindEbpDoubleAlignFrameEpilog( pContext->PCTAddr = (TADDR)ESP; pContext->ControlPC = *PTR_PCODE(pContext->PCTAddr); - pContext->Esp = ESP; + pContext->SP = ESP; } //**************************************************************************** @@ -3478,7 +3478,7 @@ void UnwindEpilog( /* Now adjust stack pointer */ - pContext->Esp += ESPIncrOnReturn(info); + pContext->SP += ESPIncrOnReturn(info); } /*****************************************************************************/ @@ -3508,7 +3508,7 @@ void UnwindEspFrameProlog( #endif const DWORD curOffs = info->prologOffs; - unsigned ESP = pContext->Esp; + unsigned ESP = pContext->SP; // Find out how many callee-saved regs have already been pushed @@ -3580,7 +3580,7 @@ void UnwindEspFrameProlog( _ASSERTE(offset == info->prologOffs); #endif - pContext->Esp = ESP; + pContext->SP = ESP; } /*****************************************************************************/ @@ -3599,7 +3599,7 @@ void UnwindEspFrame( _ASSERTE(!info->ebpFrame && !info->doubleAlign); _ASSERTE(info->epilogOffs == hdrInfo::NOT_IN_EPILOG); - unsigned ESP = pContext->Esp; + unsigned ESP = pContext->SP; if (info->prologOffs != hdrInfo::NOT_IN_PROLOG) @@ -3607,7 +3607,7 @@ void UnwindEspFrame( if (info->prologOffs != 0) // Do nothing for the very start of the method { UnwindEspFrameProlog(pContext, info, methodStart, flags); - ESP = pContext->Esp; + ESP = pContext->SP; } } else @@ -3643,7 +3643,7 @@ void UnwindEspFrame( /* Now adjust stack pointer */ - pContext->Esp = ESP + ESPIncrOnReturn(info); + pContext->SP = ESP + ESPIncrOnReturn(info); } @@ -3687,11 +3687,11 @@ void UnwindEbpDoubleAlignFrameProlog( /* If we're past the "push ebp", adjust ESP to pop EBP off */ if (curOffs == (offset + 1)) - pContext->Esp += sizeof(TADDR); + pContext->SP += sizeof(TADDR); /* Stack pointer points to return address */ - pContext->PCTAddr = (TADDR)pContext->Esp; + pContext->PCTAddr = (TADDR)pContext->SP; pContext->ControlPC = *PTR_PCODE(pContext->PCTAddr); /* EBP and callee-saved registers still have the correct value */ @@ -3755,11 +3755,11 @@ void UnwindEbpDoubleAlignFrameProlog( /* The caller's saved EBP is pointed to by our EBP */ pContext->pEbp = PTR_DWORD((TADDR)curEBP); - pContext->Esp = DWORD((TADDR)(curEBP + sizeof(void *))); + pContext->SP = DWORD((TADDR)(curEBP + sizeof(void *))); /* Stack pointer points to return address */ - pContext->PCTAddr = (TADDR)pContext->Esp; + pContext->PCTAddr = (TADDR)pContext->SP; pContext->ControlPC = *PTR_PCODE(pContext->PCTAddr); } @@ -3777,7 +3777,7 @@ bool UnwindEbpDoubleAlignFrame( _ASSERTE(info->ebpFrame || info->doubleAlign); - const unsigned curESP = pContext->Esp; + const unsigned curESP = pContext->SP; const unsigned curEBP = *pContext->pEbp; /* First check if we are in a filter (which is obviously after the prolog) */ @@ -3808,7 +3808,7 @@ bool UnwindEbpDoubleAlignFrame( pContext->PCTAddr = baseSP; pContext->ControlPC = *PTR_PCODE(pContext->PCTAddr); - pContext->Esp = (DWORD)(baseSP + sizeof(TADDR)); + pContext->SP = (DWORD)(baseSP + sizeof(TADDR)); // pContext->pEbp = same as before; @@ -3847,7 +3847,7 @@ bool UnwindEbpDoubleAlignFrame( /* Now adjust stack pointer. */ - pContext->Esp += ESPIncrOnReturn(info); + pContext->SP += ESPIncrOnReturn(info); return true; } @@ -3872,7 +3872,7 @@ bool UnwindEbpDoubleAlignFrame( /* The caller's ESP will be equal to EBP + retAddrSize + argSize. */ - pContext->Esp = (DWORD)(curEBP + sizeof(curEBP) + ESPIncrOnReturn(info)); + pContext->SP = (DWORD)(curEBP + sizeof(curEBP) + ESPIncrOnReturn(info)); /* The caller's saved EIP is right after our EBP */ @@ -4125,7 +4125,7 @@ bool EECodeManager::EnumGcRefs( PREGDISPLAY pContext, unsigned curOffs = pCodeInfo->GetRelOffset(); unsigned EBP = *pContext->pEbp; - unsigned ESP = pContext->Esp; + unsigned ESP = pContext->SP; unsigned ptrOffs; @@ -5171,7 +5171,7 @@ OBJECTREF EECodeManager::GetInstance( PREGDISPLAY pContext, } else { - taArgBase = pContext->Esp + stackDepth; + taArgBase = pContext->SP + stackDepth; } // Only synchronized methods and generic code that accesses @@ -5477,7 +5477,7 @@ void * EECodeManager::GetGSCookieAddr(PREGDISPLAY pContext, PTR_CBYTE table = PTR_CBYTE(gcInfoToken.Info) + stateBuf->hdrInfoSize; unsigned argSize = GetPushedArgSize(info, table, relOffset); - return PVOID(SIZE_T(pContext->Esp + argSize + info->gsCookieOffset)); + return PVOID(SIZE_T(pContext->SP + argSize + info->gsCookieOffset)); } #elif defined(USE_GC_INFO_DECODER) && !defined(CROSSGEN_COMPILE) diff --git a/src/coreclr/src/vm/exceptionhandling.cpp b/src/coreclr/src/vm/exceptionhandling.cpp index 56bb0df..fa6c682 100644 --- a/src/coreclr/src/vm/exceptionhandling.cpp +++ b/src/coreclr/src/vm/exceptionhandling.cpp @@ -1300,11 +1300,7 @@ void ExceptionTracker::InitializeCurrentContextForCrawlFrame(CrawlFrame* pcfThis *(pRD->pCallerContext) = *(pDispatcherContext->ContextRecord); pRD->IsCallerContextValid = TRUE; -#ifndef _TARGET_X86_ pRD->SP = sfEstablisherFrame.SP; -#else - pRD->Esp = sfEstablisherFrame.SP; -#endif pRD->ControlPC = pDispatcherContext->ControlPc; #if defined(_TARGET_ARM_) || defined(_TARGET_ARM64_) diff --git a/src/coreclr/src/vm/i386/cgenx86.cpp b/src/coreclr/src/vm/i386/cgenx86.cpp index 6afd58b..85db84a 100644 --- a/src/coreclr/src/vm/i386/cgenx86.cpp +++ b/src/coreclr/src/vm/i386/cgenx86.cpp @@ -213,7 +213,7 @@ void EHContext::Setup(PCODE resumePC, PREGDISPLAY regs) LIMITED_METHOD_DAC_CONTRACT; // EAX ECX EDX are scratch - this->Esp = regs->Esp; + this->Esp = regs->SP; this->Ebx = *regs->pEbx; this->Esi = *regs->pEsi; this->Edi = *regs->pEdi; @@ -275,7 +275,7 @@ void TransitionFrame::UpdateRegDisplay(const PREGDISPLAY pRD) _ASSERTE(pFunc != NULL); UpdateRegDisplayHelper(pRD, pFunc->CbStackPop()); - LOG((LF_GCROOTS, LL_INFO100000, "STACKWALK TransitionFrame::UpdateRegDisplay(ip:%p, sp:%p)\n", pRD->ControlPC, pRD->Esp)); + LOG((LF_GCROOTS, LL_INFO100000, "STACKWALK TransitionFrame::UpdateRegDisplay(ip:%p, sp:%p)\n", pRD->ControlPC, pRD->SP)); RETURN; } @@ -326,7 +326,7 @@ void TransitionFrame::UpdateRegDisplayHelper(const PREGDISPLAY pRD, UINT cbStack #else // WIN64EXCEPTIONS pRD->ControlPC = *PTR_PCODE(pRD->PCTAddr); - pRD->Esp = (DWORD)(pRD->PCTAddr + sizeof(TADDR) + cbStackPop); + pRD->SP = (DWORD)(pRD->PCTAddr + sizeof(TADDR) + cbStackPop); #endif // WIN64EXCEPTIONS @@ -368,7 +368,7 @@ void HelperMethodFrame::UpdateRegDisplay(const PREGDISPLAY pRD) InsureInit(false, &unwindState); pRD->PCTAddr = dac_cast(unwindState.pRetAddr()); pRD->ControlPC = unwindState.GetRetAddr(); - pRD->Esp = unwindState._esp; + pRD->SP = unwindState._esp; // Get some special host instance memory // so we have a place to point to. @@ -409,7 +409,7 @@ void HelperMethodFrame::UpdateRegDisplay(const PREGDISPLAY pRD) pRD->pEbp = (DWORD*) m_MachState.pEbp(); pRD->PCTAddr = dac_cast(m_MachState.pRetAddr()); pRD->ControlPC = m_MachState.GetRetAddr(); - pRD->Esp = (DWORD) m_MachState.esp(); + pRD->SP = (DWORD) m_MachState.esp(); #ifdef WIN64EXCEPTIONS pRD->IsCallerContextValid = FALSE; @@ -419,7 +419,7 @@ void HelperMethodFrame::UpdateRegDisplay(const PREGDISPLAY pRD) // Copy the saved state from the frame to the current context. // pRD->pCurrentContext->Eip = pRD->ControlPC; - pRD->pCurrentContext->Esp = pRD->Esp; + pRD->pCurrentContext->Esp = pRD->SP; #define CALLEE_SAVED_REGISTER(regname) pRD->pCurrentContext->regname = *pRD->p##regname; ENUM_CALLEE_SAVED_REGISTERS(); @@ -569,7 +569,7 @@ void FaultingExceptionFrame::UpdateRegDisplay(const PREGDISPLAY pRD) #define CALLEE_SAVED_REGISTER(regname) pRD->p##regname = (DWORD*) ®s->regname; ENUM_CALLEE_SAVED_REGISTERS(); #undef CALLEE_SAVED_REGISTER - pRD->Esp = m_Esp; + pRD->SP = m_Esp; pRD->PCTAddr = GetReturnAddressPtr(); pRD->ControlPC = *PTR_PCODE(pRD->PCTAddr); @@ -588,13 +588,13 @@ void FaultingExceptionFrame::UpdateRegDisplay(const PREGDISPLAY pRD) ENUM_CALLEE_SAVED_REGISTERS(); #undef CALLEE_SAVED_REGISTER - pRD->Esp = m_ctx.Esp; + pRD->SP = m_ctx.Esp; pRD->PCTAddr = GetReturnAddressPtr(); pRD->ControlPC = m_ctx.Eip; #endif // WIN64EXCEPTIONS - LOG((LF_GCROOTS, LL_INFO100000, "STACKWALK FaultingExceptionFrame::UpdateRegDisplay(ip:%p, sp:%p)\n", pRD->ControlPC, pRD->Esp)); + LOG((LF_GCROOTS, LL_INFO100000, "STACKWALK FaultingExceptionFrame::UpdateRegDisplay(ip:%p, sp:%p)\n", pRD->ControlPC, pRD->SP)); RETURN; } @@ -650,14 +650,14 @@ void InlinedCallFrame::UpdateRegDisplay(const PREGDISPLAY pRD) pRD->ControlPC = *PTR_PCODE(pRD->PCTAddr); /* Now we need to pop off the outgoing arguments */ - pRD->Esp = (DWORD) dac_cast(m_pCallSiteSP) + stackArgSize; + pRD->SP = (DWORD) dac_cast(m_pCallSiteSP) + stackArgSize; #ifdef WIN64EXCEPTIONS pRD->IsCallerContextValid = FALSE; pRD->IsCallerSPValid = FALSE; // Don't add usage of this field. This is only temporary. pRD->pCurrentContext->Eip = pRD->ControlPC; - pRD->pCurrentContext->Esp = pRD->Esp; + pRD->pCurrentContext->Esp = pRD->SP; pRD->pCurrentContext->Ebp = *pRD->pEbp; #define CALLEE_SAVED_REGISTER(regname) pRD->pCurrentContextPointers->regname = NULL; @@ -669,7 +669,7 @@ void InlinedCallFrame::UpdateRegDisplay(const PREGDISPLAY pRD) SyncRegDisplayToCurrentContext(pRD); #endif - LOG((LF_GCROOTS, LL_INFO100000, "STACKWALK InlinedCallFrame::UpdateRegDisplay(ip:%p, sp:%p)\n", pRD->ControlPC, pRD->Esp)); + LOG((LF_GCROOTS, LL_INFO100000, "STACKWALK InlinedCallFrame::UpdateRegDisplay(ip:%p, sp:%p)\n", pRD->ControlPC, pRD->SP)); RETURN; } @@ -735,7 +735,7 @@ void ResumableFrame::UpdateRegDisplay(const PREGDISPLAY pRD) pRD->ControlPC = pUnwoundContext->Eip; pRD->PCTAddr = dac_cast(m_Regs) + offsetof(CONTEXT, Eip); - pRD->Esp = m_Regs->Esp; + pRD->SP = m_Regs->Esp; RETURN; } @@ -764,7 +764,7 @@ void HijackFrame::UpdateRegDisplay(const PREGDISPLAY pRD) pRD->pEbp = &m_Args->Ebp; pRD->PCTAddr = dac_cast(m_Args) + offsetof(HijackArgs, Eip); pRD->ControlPC = *PTR_PCODE(pRD->PCTAddr); - pRD->Esp = (DWORD)(pRD->PCTAddr + sizeof(TADDR)); + pRD->SP = (DWORD)(pRD->PCTAddr + sizeof(TADDR)); } #endif // FEATURE_HIJACK @@ -808,7 +808,7 @@ void TailCallFrame::UpdateRegDisplay(const PREGDISPLAY pRD) pRD->PCTAddr = GetReturnAddressPtr(); pRD->ControlPC = *PTR_PCODE(pRD->PCTAddr); - pRD->Esp = (DWORD)(pRD->PCTAddr + sizeof(TADDR)); + pRD->SP = (DWORD)(pRD->PCTAddr + sizeof(TADDR)); RETURN; } diff --git a/src/coreclr/src/vm/proftoeeinterfaceimpl.cpp b/src/coreclr/src/vm/proftoeeinterfaceimpl.cpp index 1aee26d..6a50c62 100644 --- a/src/coreclr/src/vm/proftoeeinterfaceimpl.cpp +++ b/src/coreclr/src/vm/proftoeeinterfaceimpl.cpp @@ -7412,7 +7412,7 @@ Loop: ZeroMemory(&rd, sizeof(rd)); rd.pEbp = &ctxCur.Ebp; - rd.Esp = ctxCur.Esp; + rd.SP = ctxCur.Esp; rd.ControlPC = ctxCur.Eip; codeInfo.GetCodeManager()->UnwindStackFrame( @@ -7423,7 +7423,7 @@ Loop: NULL); ctxCur.Ebp = *(rd.pEbp); - ctxCur.Esp = rd.Esp; + ctxCur.Esp = rd.SP; ctxCur.Eip = rd.ControlPC; } else