On Thursday 14 February 2013 14:35:58 Benson Leung wrote:
> + asm volatile ("mov %%ebx, %%edi;" /* save ebx (for PIC) */
> + "cpuid;"
> + "mov %%ebx, %%esi;" /* pass to caller */
> + "mov %%edi, %%ebx;" /* restore ebx */
> + :"+a" (_eax), "=S" (_ebx), "=c" (_ecx), "=d" (_edx)
> + : /* inputs: eax is handled above */
> + :"edi" /* clobbers: we hit edi directly */);i've written a better version since: https://github.com/linux-test-project/ltp/blob/master/include/ltp_cpuid.h -mike
signature.asc
Description: This is a digitally signed message part.

