[4/8] vcomp: Implement stub for _vcomp_fork.

Alexandre Julliard julliard at winehq.org
Wed Jul 15 09:35:56 CDT 2015

Sebastian Lackner <sebastian at fds-team.de> writes:

> I am not sure why you think it is questionable. We have compiler support for
> variadic functions, so why should we not use it? Please note that on x86_64
> this does more than just grabbing a pointer to the variadic arguments, the
> declaration as WINAPIV also ensures that the compiler stores the register
> values ecx/edx/r8/r9 back onto the stack:

If you need them on the stack, you should be putting them there from
assembly, not relying on the compiler implementation of va_list or
assuming that va_list is a pointer to the first argument.

va_list is supposed to be an opaque type, so if you want to use it you'd
have to access the arguments from C code too, which AFAICS is not
possible in this case.

> Moreover, implementing the whole logic of _vcomp_fork in Assembler seems
> unreasonable. Do you mean a second Assembler wrapper, one to grab the "valist"
> pointer, and one to copy the arguments again on the target stack to execute
> the function?

Probably something like that, or something along the lines of the
existing relay code.

Alexandre Julliard
julliard at winehq.org

More information about the wine-devel mailing list