summaryrefslogtreecommitdiff
path: root/src/vm
diff options
context:
space:
mode:
authorJonghyun Park <parjong@gmail.com>2016-12-07 18:54:54 +0900
committerJan Vorlicek <janvorli@microsoft.com>2016-12-07 10:54:54 +0100
commiteb582352acec56cc9744cae32a34900d6de987ea (patch)
tree81c3b28d9510d9cfdbe603408fcd60e16237ba22 /src/vm
parent375948e39cf1a946b3d8048ca51cd4e548f94648 (diff)
downloadcoreclr-eb582352acec56cc9744cae32a34900d6de987ea.tar.gz
coreclr-eb582352acec56cc9744cae32a34900d6de987ea.tar.bz2
coreclr-eb582352acec56cc9744cae32a34900d6de987ea.zip
Move JIT_EndCatch from asmhelpers.asm into jithelp.asm (#8492)
* Move JIT_EndCatch from asmhelpers.asm into jithelp.asm The name of JIT_EndCatch suggests that it is a JIT helper, but its implementation is inside asmhelpers.asm (not in jithelp.asm). This commit moves its implementation into jithelp.asm. * Move COMPlusEndCatch declaration
Diffstat (limited to 'src/vm')
-rw-r--r--src/vm/i386/asmhelpers.asm28
-rw-r--r--src/vm/i386/jithelp.asm30
2 files changed, 30 insertions, 28 deletions
diff --git a/src/vm/i386/asmhelpers.asm b/src/vm/i386/asmhelpers.asm
index 66a22b7962..0456be82db 100644
--- a/src/vm/i386/asmhelpers.asm
+++ b/src/vm/i386/asmhelpers.asm
@@ -43,7 +43,6 @@ TlsGetValue PROTO stdcall
ifdef FEATURE_HIJACK
EXTERN _OnHijackWorker@4:PROC
endif ;FEATURE_HIJACK
-EXTERN _COMPlusEndCatch@20:PROC
EXTERN _COMPlusFrameHandler:PROC
ifdef FEATURE_COMINTEROP
EXTERN _COMPlusFrameHandlerRevCom:PROC
@@ -1005,33 +1004,6 @@ OnHijackFPTripThread ENDP
endif ; FEATURE_HIJACK
-; Note that the debugger skips this entirely when doing SetIP,
-; since COMPlusCheckForAbort should always return 0. Excep.cpp:LeaveCatch
-; asserts that to be true. If this ends up doing more work, then the
-; debugger may need additional support.
-; void __stdcall JIT_EndCatch();
-JIT_EndCatch PROC stdcall public
-
- ; make temp storage for return address, and push the address of that
- ; as the last arg to COMPlusEndCatch
- mov ecx, [esp]
- push ecx;
- push esp;
-
- ; push the rest of COMPlusEndCatch's args, right-to-left
- push esi
- push edi
- push ebx
- push ebp
-
- call _COMPlusEndCatch@20 ; returns old esp value in eax, stores jump address
- ; now eax = new esp, [esp] = new eip
-
- pop edx ; edx = new eip
- mov esp, eax ; esp = new esp
- jmp edx ; eip = new eip
-
-JIT_EndCatch ENDP
;==========================================================================
; This function is reached only via the embedded ImportThunkGlue code inside
diff --git a/src/vm/i386/jithelp.asm b/src/vm/i386/jithelp.asm
index ac767287ee..9d2f6b7589 100644
--- a/src/vm/i386/jithelp.asm
+++ b/src/vm/i386/jithelp.asm
@@ -92,6 +92,8 @@ EXTERN _TransparentProxyStub_CrossContext@0:PROC
EXTERN _InContextTPQuickDispatchAsmStub@0:PROC
endif
+EXTERN _COMPlusEndCatch@20:PROC
+
.686P
.XMM
; The following macro is needed because of a MASM issue with the
@@ -2571,4 +2573,32 @@ ChkCastInterfaceIsNullInst:
@JIT_ChkCastInterface@8 endp
+; Note that the debugger skips this entirely when doing SetIP,
+; since COMPlusCheckForAbort should always return 0. Excep.cpp:LeaveCatch
+; asserts that to be true. If this ends up doing more work, then the
+; debugger may need additional support.
+; void __stdcall JIT_EndCatch();
+JIT_EndCatch PROC stdcall public
+
+ ; make temp storage for return address, and push the address of that
+ ; as the last arg to COMPlusEndCatch
+ mov ecx, [esp]
+ push ecx;
+ push esp;
+
+ ; push the rest of COMPlusEndCatch's args, right-to-left
+ push esi
+ push edi
+ push ebx
+ push ebp
+
+ call _COMPlusEndCatch@20 ; returns old esp value in eax, stores jump address
+ ; now eax = new esp, [esp] = new eip
+
+ pop edx ; edx = new eip
+ mov esp, eax ; esp = new esp
+ jmp edx ; eip = new eip
+
+JIT_EndCatch ENDP
+
end