Commit 360820fb authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

kernel32: On process entry store PEB address in %ebx.

8k demo custom PE loader depends on this. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42125Signed-off-by: 's avatarDmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent a0772da5
......@@ -94,12 +94,18 @@ __ASM_GLOBAL_FUNC( call_process_entry,
__ASM_CFI(".cfi_rel_offset %ebp,0\n\t")
"movl %esp,%ebp\n\t"
__ASM_CFI(".cfi_def_cfa_register %ebp\n\t")
"pushl 4(%ebp)\n\t" /* deliberately mis-align the stack by 8, Doom 3 needs this */
"pushl %ebx\n\t"
__ASM_CFI(".cfi_rel_offset %ebx,-4\n\t")
"movl 8(%ebp),%ebx\n\t"
/* deliberately mis-align the stack by 8, Doom 3 needs this */
"pushl 4(%ebp)\n\t" /* Driller expects readable address at this offset */
"pushl 4(%ebp)\n\t"
"pushl 8(%ebp)\n\t"
"pushl %ebx\n\t"
"call *12(%ebp)\n\t"
"leave\n\t"
"leal -4(%ebp),%esp\n\t"
"popl %ebx\n\t"
__ASM_CFI(".cfi_same_value %ebx\n\t")
"popl %ebp\n\t"
__ASM_CFI(".cfi_def_cfa %esp,4\n\t")
__ASM_CFI(".cfi_same_value %ebp\n\t")
"ret" )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment