_vcomp_fork stack frame puzzle
Dan Kegel
dank at kegel.com
Fri Aug 10 21:42:41 CDT 2012
On Fri, Aug 10, 2012 at 7:37 PM, Dan Kegel <dank at kegel.com> wrote:
> Yes indeed, this works:
>
> extern void WINAPIV VCOMP__vcomp_fork(DWORD parallel, int ncount, void
> (__cdecl *helper)(__ms_va_list), ...);
> __ASM_GLOBAL_FUNC( VCOMP__vcomp_fork,
> "pop %eax\n\t" /* save return address */
> "add $8,%esp\n\t" /* skip parallel and ncount */
> "pop %ebx\n\t" /* save helper */
> "push %eax\n\t" /* set up return address */
> "jmp %ebx" /* enter handler */
> )
(Or maybe %edx instead of %ebx;
http://en.wikipedia.org/wiki/X86_calling_conventions
suggests %ebx shouldn't be modified by the callee.)
More information about the wine-devel
mailing list