This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Letter to DDJ
- From: Andi Kleen <ak at suse dot de>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: Andi Kleen <ak at suse dot de>, gcc at gcc dot gnu dot org,Laurent GUERBY <laurent at guerby dot net>, aph at gcc dot gnu dot org
- Date: Wed, 5 May 2004 18:45:09 +0200
- Subject: Re: Letter to DDJ
- References: <200405041648.i44GmOuI010642@redhat.com.suse.lists.egcs> <1083694945.24278.4.camel@pc.suse.lists.egcs> <p73ekpzcnh3.fsf@verdi.suse.de> <E883AF04-9E6A-11D8-B913-000393A6D2F2@physics.uc.edu>
> 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