[PATCH 1/4] dbghelp: Avoid using inline assembly in do_x86cpuid().

Chip Davis cdavis at codeweavers.com
Sun Nov 25 22:28:13 CST 2018


November 25, 2018 10:13 PM, "Zebediah Figura" <z.figura12 at gmail.com> wrote:

> @@ -542,20 +542,27 @@ static unsigned dump_modules(struct dump_context* dc, BOOL dump_elf)
[...]
> +#ifdef __i386__
> +__ASM_GLOBAL_FUNC( do_x86cpuid,
> +                   "pushl %edi\n\t"
> +                   "pushl %ebx\n\t"
> +                   "movl 4(%esp),%eax\n\t"
> +                   "movl 8(%esp),%esi\n\t"
> +                   "cpuid\n\t"
> +                   "movl %eax,(%esi)\n\t"
> +                   "movl %ebx,4(%esi)\n\t"
> +                   "movl %ecx,8(%esi)\n\t"
> +                   "movl %edx,12(%esi)\n\t"
> +                   "popl %ebx\n\t"
> +                   "popl %edi\n\t"
> +                   "ret" );

You save EDI here, but then clobber ESI.

Chip



More information about the wine-devel mailing list