summaryrefslogtreecommitdiff
path: root/src/pal
diff options
context:
space:
mode:
authorJonghyun Park <parjong@gmail.com>2017-04-24 17:39:52 +0900
committerJan Vorlicek <janvorli@microsoft.com>2017-04-24 01:39:52 -0700
commite1efbf4a587c44a73bdabcbf99d6fa2074065754 (patch)
treee2fb541c5d032e512158fc74bc86e5a99c4debe7 /src/pal
parent3b0f7a92039e6c2d49a0ddd72e068540b11beadd (diff)
downloadcoreclr-e1efbf4a587c44a73bdabcbf99d6fa2074065754.tar.gz
coreclr-e1efbf4a587c44a73bdabcbf99d6fa2074065754.tar.bz2
coreclr-e1efbf4a587c44a73bdabcbf99d6fa2074065754.zip
[x86/Linux] Remove unnecessary ResumeEsp field (#11167)
Diffstat (limited to 'src/pal')
-rw-r--r--src/pal/inc/pal.h2
-rw-r--r--src/pal/src/arch/i386/asmconstants.h1
-rw-r--r--src/pal/src/arch/i386/context2.S3
-rw-r--r--src/pal/src/arch/i386/exceptionhelper.S2
-rw-r--r--src/pal/src/arch/i386/signalhandlerhelper.cpp1
-rw-r--r--src/pal/src/exception/seh-unwind.cpp1
-rw-r--r--src/pal/src/thread/context.cpp3
7 files changed, 2 insertions, 11 deletions
diff --git a/src/pal/inc/pal.h b/src/pal/inc/pal.h
index 9e97edc8f6..9225e00561 100644
--- a/src/pal/inc/pal.h
+++ b/src/pal/inc/pal.h
@@ -1783,8 +1783,6 @@ typedef struct _CONTEXT {
ULONG SegSs;
UCHAR ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION];
-
- ULONG ResumeEsp;
} CONTEXT, *PCONTEXT, *LPCONTEXT;
// To support saving and loading xmm register context we need to know the offset in the ExtendedRegisters
diff --git a/src/pal/src/arch/i386/asmconstants.h b/src/pal/src/arch/i386/asmconstants.h
index d947cb8bcd..ff763ef16b 100644
--- a/src/pal/src/arch/i386/asmconstants.h
+++ b/src/pal/src/arch/i386/asmconstants.h
@@ -28,4 +28,3 @@
#define CONTEXT_Xmm5 CONTEXT_Xmm4+16
#define CONTEXT_Xmm6 CONTEXT_Xmm5+16
#define CONTEXT_Xmm7 CONTEXT_Xmm6+16
-#define CONTEXT_ResumeEsp CONTEXT_ExtendedRegisters+512
diff --git a/src/pal/src/arch/i386/context2.S b/src/pal/src/arch/i386/context2.S
index 6c31b074cc..cf7581da49 100644
--- a/src/pal/src/arch/i386/context2.S
+++ b/src/pal/src/arch/i386/context2.S
@@ -42,7 +42,6 @@ LEAF_ENTRY CONTEXT_CaptureContext, _TEXT
mov [eax + CONTEXT_Ebp], ebp
lea ebx, [esp + 12]
mov [eax + CONTEXT_Esp], ebx
- mov [eax + CONTEXT_ResumeEsp], ebx
mov ebx, [esp + 8]
mov [eax + CONTEXT_Eip], ebx
@@ -115,7 +114,7 @@ LOCAL_LABEL(Done_Restore_CONTEXT_FLOATING_POINT):
LOCAL_LABEL(Done_Restore_CONTEXT_EXTENDED_REGISTERS):
// Restore Stack
- mov esp, [eax + CONTEXT_ResumeEsp]
+ mov esp, [eax + CONTEXT_Esp]
// Create a minimal frame
push DWORD PTR [eax + CONTEXT_Eip]
diff --git a/src/pal/src/arch/i386/exceptionhelper.S b/src/pal/src/arch/i386/exceptionhelper.S
index bf44124479..b9ceffcc13 100644
--- a/src/pal/src/arch/i386/exceptionhelper.S
+++ b/src/pal/src/arch/i386/exceptionhelper.S
@@ -23,7 +23,7 @@ LEAF_ENTRY ThrowExceptionFromContextInternal, _TEXT
mov eax, [esp + 8] // ebx: CONTEXT *
mov ebp, [eax + CONTEXT_Ebp]
- mov esp, [eax + CONTEXT_ResumeEsp]
+ mov esp, [eax + CONTEXT_Esp]
mov ebx, [eax + CONTEXT_Ebx]
mov esi, [eax + CONTEXT_Esi]
mov edi, [eax + CONTEXT_Edi]
diff --git a/src/pal/src/arch/i386/signalhandlerhelper.cpp b/src/pal/src/arch/i386/signalhandlerhelper.cpp
index 3369abe093..a7d418a788 100644
--- a/src/pal/src/arch/i386/signalhandlerhelper.cpp
+++ b/src/pal/src/arch/i386/signalhandlerhelper.cpp
@@ -70,7 +70,6 @@ void ExecuteHandlerOnOriginalStack(int code, siginfo_t *siginfo, void *context,
// We don't care about the other registers state since the stack unwinding restores
// them for the target frame directly from the signal context.
context2.Esp = (size_t)sp;
- context2.ResumeEsp = (size_t)sp;
context2.Ebp = (size_t)fp;
context2.Eip = (size_t)signal_handler_worker;
diff --git a/src/pal/src/exception/seh-unwind.cpp b/src/pal/src/exception/seh-unwind.cpp
index 1f20ee0cad..ba43c2e725 100644
--- a/src/pal/src/exception/seh-unwind.cpp
+++ b/src/pal/src/exception/seh-unwind.cpp
@@ -155,7 +155,6 @@ static void UnwindContextToWinContext(unw_cursor_t *cursor, CONTEXT *winContext)
#elif defined(_X86_)
unw_get_reg(cursor, UNW_REG_IP, (unw_word_t *) &winContext->Eip);
unw_get_reg(cursor, UNW_REG_SP, (unw_word_t *) &winContext->Esp);
- unw_get_reg(cursor, UNW_REG_SP, (unw_word_t *) &winContext->ResumeEsp);
unw_get_reg(cursor, UNW_X86_EBP, (unw_word_t *) &winContext->Ebp);
unw_get_reg(cursor, UNW_X86_EBX, (unw_word_t *) &winContext->Ebx);
unw_get_reg(cursor, UNW_X86_ESI, (unw_word_t *) &winContext->Esi);
diff --git a/src/pal/src/thread/context.cpp b/src/pal/src/thread/context.cpp
index 04a6fe5aaf..cc794d5f69 100644
--- a/src/pal/src/thread/context.cpp
+++ b/src/pal/src/thread/context.cpp
@@ -506,8 +506,6 @@ void CONTEXTFromNativeContext(const native_context_t *native, LPCONTEXT lpContex
// although the pc value retrived from native context might not have set the least bit.
// This becomes especially problematic if the context is on the JIT_WRITEBARRIER.
lpContext->Pc |= 0x1;
-#elif defined(_X86_)
- lpContext->ResumeEsp = MCREG_Esp(native->uc_mcontext);
#endif
}
@@ -978,7 +976,6 @@ CONTEXT_GetThreadContextFromThreadState(
lpContext->Esi = pState->esi;
lpContext->Ebp = pState->ebp;
lpContext->Esp = pState->esp;
- lpContext->ResumeEsp = pState->esp;
lpContext->SegSs = pState->ss;
lpContext->EFlags = pState->eflags;
lpContext->Eip = pState->eip;