Letter to DDJ

Andi Kleen ak@suse.de
Wed May 5 16:47:00 GMT 2004


> Well that will not work on some targets where the PIC register is ebx.
> 
>   __asm__ ("pushl %%ecx; pushl %%ebx; cpuid; popl %%ebx; popl %%ecx"
>            : "=a" (fl1) : "0" (0) : "edx", "cc");
> 
> That will work on ever x86 target.

I doubt it, since the asm is not marked volatile and fl1 is unlikely 
to be used.  gcc would optimize your statement away.

Also why save/restore ecx?

-Andi



More information about the Gcc mailing list