The code in question:

void cpuid(unsigned info, unsigned *eax, unsigned *ebx, unsigned *ecx, unsigned 
*edx)
{
#ifdef __GNUC__
#if defined(__i386__) || defined(__x86_64__)
        *eax = info;
        __asm volatile
                ("mov %%ebx, %%edi;" /* 32bit PIC: don't clobber ebx */
                 "cpuid;"
                 "mov %%ebx, %%esi;"
                 "mov %%edi, %%ebx;"
                 :"+a" (*eax), "=S" (*ebx), "=c" (*ecx), "=d" (*edx)
                 : :"edi");
#endif
#endif
}

On 64-bit systems upper half of %rbx gets clobbered, because only %ebx is
preserved via %edi.

-- 
Andriy Gapon

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Freerdp-devel mailing list
Freerdp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freerdp-devel

Reply via email to