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

Zebediah Figura z.figura12 at gmail.com
Sun Nov 25 22:29:23 CST 2018


On 11/25/2018 10:28 PM, Chip Davis wrote:
> 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
> 
> 

Ack, thanks for the catch, will fix.



More information about the wine-devel mailing list