This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Letter to DDJ


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]