wine/dlls/ntdll signal_i386.c exception.c
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Oct 31 08:08:05 CST 2005
ChangeSet ID: 20992
CVSROOT: /opt/cvs-commit
Module name: wine
Changes by: julliard at winehq.org 2005/10/31 08:08:05
Modified files:
dlls/ntdll : signal_i386.c exception.c
Log message:
Marcus Meissner <meissner at suse.de>
Added assembly implementation of EXC_CallHandler.
Patch: http://cvs.winehq.org/patch.py?id=20992
Old revision New revision Changes Path
1.100 1.101 +32 -0 wine/dlls/ntdll/signal_i386.c
1.85 1.86 +9 -1 wine/dlls/ntdll/exception.c
Index: wine/dlls/ntdll/signal_i386.c
diff -u -p wine/dlls/ntdll/signal_i386.c:1.100 wine/dlls/ntdll/signal_i386.c:1.101
--- wine/dlls/ntdll/signal_i386.c 31 Oct 2005 14: 8: 5 -0000
+++ /dev/null 31 Oct 2005 14: 8: 5 -0000
@@ -1384,4 +1384,36 @@ __ASM_GLOBAL_FUNC( DbgBreakPoint, "int $
*/
__ASM_GLOBAL_FUNC( DbgUserBreakPoint, "int $3; ret");
+
+/**********************************************************************
+ * EXC_CallHandler (internal)
+ */
+__ASM_GLOBAL_FUNC( EXC_CallHandler,
+" pushl %ebp\n"
+" movl %esp, %ebp\n"
+" subl $12, %esp\n"
+" movl 28(%ebp), %eax\n"
+" movl 12(%ebp), %edx\n"
+" movl %eax, -8(%ebp)\n"
+" movl %edx, -4(%ebp)\n"
+" leal -12(%ebp), %eax\n"
+" .byte 0x64\n"
+" movl (0),%ecx\n"
+" movl %ecx,(%eax)\n"
+" .byte 0x64\n"
+" movl %eax,(0)\n"
+" movl 20(%ebp), %eax\n"
+" pushl %eax\n"
+" movl 16(%ebp), %eax\n"
+" pushl %eax\n"
+" movl 8(%ebp), %eax\n"
+" pushl %edx\n"
+" pushl %eax\n"
+" call *24(%ebp)\n"
+" movl -12(%ebp), %edx\n"
+" .byte 0x64\n"
+" movl %edx,(0)\n"
+" leave\n"
+" ret\n"
+);
#endif /* __i386__ */
Index: wine/dlls/ntdll/exception.c
diff -u -p wine/dlls/ntdll/exception.c:1.85 wine/dlls/ntdll/exception.c:1.86
--- wine/dlls/ntdll/exception.c 31 Oct 2005 14: 8: 5 -0000
+++ /dev/null 31 Oct 2005 14: 8: 5 -0000
@@ -116,7 +116,10 @@ static DWORD EXC_UnwindHandler( EXCEPTIO
* happening during the handler execution.
* Please do not change the first 4 parameters order in any way - some exceptions handlers
* rely on Base Pointer (EBP) to have a fixed position related to the exception frame
+ *
+ * For i386 this function is implemented in assembler in signal_i386.c.
*/
+#ifndef __i386__
static DWORD EXC_CallHandler( EXCEPTION_RECORD *record, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher,
PEXCEPTION_HANDLER handler, PEXCEPTION_HANDLER nested_handler)
@@ -134,7 +137,12 @@ static DWORD EXC_CallHandler( EXCEPTION_
__wine_pop_frame( &newframe.frame );
return ret;
}
-
+#else
+/* in signal_i386.c */
+extern DWORD EXC_CallHandler( EXCEPTION_RECORD *record, EXCEPTION_REGISTRATION_RECORD *frame,
+ CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher,
+ PEXCEPTION_HANDLER handler, PEXCEPTION_HANDLER nested_handler);
+#endif
/**********************************************************************
* send_debug_event
More information about the wine-cvs
mailing list