[MPlayer-dev-eng] [PATCH] EH_prolog docu/simplification

Reimar D?ffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon Nov 27 22:30:34 CET 2006


Hello,
the attached patch simplifies and documents the exp_EH_prolog function.
I'm not sure if the change is a good idea, on the one hand this new
version IMO is much easier to understand, on the other hand the old
version is closer to the MSVCRT original...
Unfortunately I see no way to convert this into proper inline asm, at
least not without some hackishness :-(

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: loader/stubs.S
===================================================================
--- loader/stubs.S	(revision 21339)
+++ loader/stubs.S	(working copy)
@@ -4,14 +4,12 @@
 # define SYM(x) x
 #endif
 	.data
+# take care, this function may not change flags or
+# registers besides eax
 .globl SYM(exp_EH_prolog)
 SYM(exp_EH_prolog):
-	pushl $0xff
-	pushl %eax
-	pushl %fs:0
-	movl  %esp, %fs:0
-	movl  12(%esp), %eax
-	movl  %ebp, 12(%esp)
-	leal  12(%esp), %ebp
-	pushl %eax
-	ret
+	pop   %eax
+	push  %ebp
+	mov   %esp, %ebp
+	lea   -12(%esp), %esp
+	jmp   *%eax


More information about the MPlayer-dev-eng mailing list