ret 4
LEAF_END RestoreFPUContext, _TEXT
-LEAF_ENTRY ResumeAtJitEHHelper, _TEXT
- mov edx, [esp + 4] // edx = pContext (EHContext*)
-
- mov ebx, [edx + EHContext_Ebx]
- mov esi, [edx + EHContext_Esi]
- mov edi, [edx + EHContext_Edi]
- mov ebp, [edx + EHContext_Ebp]
- mov ecx, [edx + EHContext_Esp]
- mov eax, [edx + EHContext_Eip]
- mov [ecx - 4], eax
- mov eax, [edx + EHContext_Eax]
- mov [ecx - 8], eax
- mov eax, [edx + EHContext_Ecx]
- mov [ecx - 0Ch], eax
- mov eax, [edx + EHContext_Edx]
- mov [ecx - 10h], eax
- lea esp, [ecx - 10h]
- pop edx
- pop ecx
- pop eax
- ret
-LEAF_END ResumeAtJitEHHelper, _TEXT
-
-// int __stdcall CallJitEHFilterHelper(size_t *pShadowSP, EHContext *pContext);
-// on entry, only the pContext->Esp, Ebx, Esi, Edi, Ebp, and Eip are initialized
-NESTED_ENTRY CallJitEHFilterHelper, _TEXT, NoHandler
- push ebp
- mov ebp, esp
- push ebx
- push esi
- push edi
-
- // Write esp-4 to the shadowSP slot
- mov eax, [ebp + 8] // pShadowSP = [ebp+8]
- test eax, eax
- jz LOCAL_LABEL(DONE_SHADOWSP_FILTER)
- mov ebx, esp
- sub ebx, 4
- or ebx, SHADOW_SP_IN_FILTER_ASM
- mov [eax], ebx
-
-LOCAL_LABEL(DONE_SHADOWSP_FILTER):
- mov edx, [ebp + 12] // pContext = [ebp+12]
- mov eax, [edx + EHContext_Eax]
- mov ebx, [edx + EHContext_Ebx]
- mov esi, [edx + EHContext_Esi]
- mov edi, [edx + EHContext_Edi]
- mov ebp, [edx + EHContext_Ebp]
-
- call DWORD PTR [edx + EHContext_Eip]
-#ifdef _DEBUG
- nop // Indicate that it is OK to call managed code directly from here
-#endif // _DEBUG
-
- pop edi
- pop esi
- pop ebx
- pop ebp // don't use 'leave' here, as ebp as been trashed
- ret 8
-NESTED_END CallJitEHFilterHelper, _TEXT
-
-// void __stdcall CallJITEHFinallyHelper(size_t *pShadowSP, EHContext *pContext);
-// on entry, only the pContext->Esp, Ebx, Esi, Edi, Ebp, and Eip are initialized
-NESTED_ENTRY CallJitEHFinallyHelper, _TEXT, NoHandler
- push ebp
- mov ebp, esp
- push ebx
- push esi
- push edi
-
- // Write esp-4 to the shadowSP slot
- mov eax, [ebp + 8] // pShadowSP = [ebp+8]
- test eax, eax
- jz LOCAL_LABEL(DONE_SHADOWSP_FINALLY)
- mov ebx, esp
- sub ebx, 4
- mov [eax], ebx
-
-LOCAL_LABEL(DONE_SHADOWSP_FINALLY):
- mov edx, [ebp + 12] // pContext = [ebp+12]
- mov eax, [edx + EHContext_Eax]
- mov ebx, [edx + EHContext_Ebx]
- mov esi, [edx + EHContext_Esi]
- mov edi, [edx + EHContext_Edi]
- mov ebp, [edx + EHContext_Ebp]
- call DWORD PTR [edx + EHContext_Eip]
-#ifdef _DEBUG
- nop // Indicate that it is OK to call managed code directly from here
-#endif // _DEBUG
-
- // Reflect the changes to the context and only update non-volatile registers.
- // This will be used later to update REGDISPLAY
- mov edx, [esp + 12 + 12]
- mov [edx + EHContext_Ebx], ebx
- mov [edx + EHContext_Esi], esi
- mov [edx + EHContext_Edi], edi
- mov [edx + EHContext_Ebp], ebp
-
- pop edi
- pop esi
- pop ebx
- pop ebp // don't use 'leave' here, as ebp as been trashed
- ret 8
-NESTED_END CallJitEHFinallyHelper, _TEXT
LEAF_ENTRY GetSpecificCpuTypeAsm, _TEXT
push ebx // ebx is trashed by the cpuid calls
#endif // #ifndef DACCESS_COMPILE
+#ifndef WIN64EXCEPTIONS
//---------------------------------------------------------------------------------------
//
// Initialize the EHContext using the resume PC and the REGDISPLAY. The EHContext is currently used in two
// EAX ECX EDX are scratch
this->Esp = regs->SP;
- this->Ebx = *regs->GetEbxLocation();
- this->Esi = *regs->GetEsiLocation();
- this->Edi = *regs->GetEdiLocation();
- this->Ebp = *regs->GetEbpLocation();
+ this->Ebx = *regs->pEbx;
+ this->Esi = *regs->pEsi;
+ this->Edi = *regs->pEdi;
+ this->Ebp = *regs->pEbp;
this->Eip = (ULONG)(size_t)resumePC;
}
// EAX ECX EDX are scratch.
// No need to update ESP as unwinder takes care of that for us
- LOG((LF_EH, LL_INFO1000, "Updating saved EBX: *%p= %p\n", regs->GetEbxLocation(), this->Ebx));
- LOG((LF_EH, LL_INFO1000, "Updating saved ESI: *%p= %p\n", regs->GetEsiLocation(), this->Esi));
- LOG((LF_EH, LL_INFO1000, "Updating saved EDI: *%p= %p\n", regs->GetEdiLocation(), this->Edi));
- LOG((LF_EH, LL_INFO1000, "Updating saved EBP: *%p= %p\n", regs->GetEbpLocation(), this->Ebp));
+ LOG((LF_EH, LL_INFO1000, "Updating saved EBX: *%p= %p\n", regs->pEbx, this->Ebx));
+ LOG((LF_EH, LL_INFO1000, "Updating saved ESI: *%p= %p\n", regs->pEsi, this->Esi));
+ LOG((LF_EH, LL_INFO1000, "Updating saved EDI: *%p= %p\n", regs->pEdi, this->Edi));
+ LOG((LF_EH, LL_INFO1000, "Updating saved EBP: *%p= %p\n", regs->pEbp, this->Ebp));
- *regs->GetEbxLocation() = this->Ebx;
- *regs->GetEsiLocation() = this->Esi;
- *regs->GetEdiLocation() = this->Edi;
- *regs->GetEbpLocation() = this->Ebp;
+ *regs->pEbx = this->Ebx;
+ *regs->pEsi = this->Esi;
+ *regs->pEdi = this->Edi;
+ *regs->pEbp = this->Ebp;
}
+#endif // WIN64EXCEPTIONS
void TransitionFrame::UpdateRegDisplay(const PREGDISPLAY pRD)
{