[x86/Linux] Clean Up JIT_EndCatch (dotnet/coreclr#9302)
authorJonghyun Park <parjong@gmail.com>
Fri, 3 Feb 2017 17:49:52 +0000 (02:49 +0900)
committerJan Kotas <jkotas@microsoft.com>
Fri, 3 Feb 2017 17:49:52 +0000 (09:49 -0800)
Commit migrated from https://github.com/dotnet/coreclr/commit/0f02eb4f3b77fd8908baf4b61f4bf0bf99c2928d

src/coreclr/src/inc/jithelpers.h
src/coreclr/src/vm/i386/jithelp.S
src/coreclr/src/vm/jitinterface.h

index 89d4be7..f84db91 100644 (file)
     JITHELPER(CORINFO_HELP_FIELD_ACCESS_EXCEPTION,JIT_ThrowFieldAccessException, CORINFO_HELP_SIG_REG_ONLY)
     JITHELPER(CORINFO_HELP_CLASS_ACCESS_EXCEPTION,JIT_ThrowClassAccessException, CORINFO_HELP_SIG_REG_ONLY)
 
-// UNIXTODO: Disable JIT_EndCatch after revising the jitter not to use this (for x86/Linux)
-#ifndef _TARGET_X86_
+#ifdef WIN64EXCEPTIONS
     JITHELPER(CORINFO_HELP_ENDCATCH,            NULL,               CORINFO_HELP_SIG_CANNOT_USE_ALIGN_STUB)
 #else
     JITHELPER(CORINFO_HELP_ENDCATCH,            JIT_EndCatch,       CORINFO_HELP_SIG_CANNOT_USE_ALIGN_STUB)
index 35a0261..9a7e334 100644 (file)
@@ -720,34 +720,3 @@ LEAF_END JIT_PatchedCodeLast, _TEXT
 LEAF_ENTRY JIT_PatchedCodeEnd, _TEXT
     ret
 LEAF_END JIT_PatchedCodeEnd, _TEXT
-
-// 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();
-NESTED_ENTRY JIT_EndCatch, _TEXT, NoHandler
-#ifndef WIN64EXCEPTIONS
-    // 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
-
-    // returns old esp value in eax, stores jump address
-    call    C_FUNC(COMPlusEndCatch)
-    // now eax = new esp, [esp] = new eip
-
-    pop     edx         // edx = new eip
-    mov     esp, eax    // esp = new esp
-    jmp     edx         // eip = new eip
-#else
-    int3
-#endif
-NESTED_END JIT_EndCatch, _TEXT
index 6cc3a05..df9e1d7 100644 (file)
@@ -391,8 +391,7 @@ void ValidateWriteBarrierHelpers();
 
 extern "C"
 {
-#ifdef _TARGET_X86_
-    // UNIXTODO: Disable JIT_EndCatch after revising the jitter not to use this (for x86/Linux)
+#ifndef WIN64EXCEPTIONS
     void STDCALL JIT_EndCatch();               // JIThelp.asm/JIThelp.s
 #endif // _TARGET_X86_