[FFmpeg-devel] [PATCH]Use pushfl/popfl in cpuid.c

Michael Niedermayer michaelni
Mon Nov 24 11:05:42 CET 2008


On Mon, Nov 24, 2008 at 10:35:06AM +0100, Reimar D?ffinger wrote:
> On Mon, Nov 24, 2008 at 03:32:21AM +0100, Michael Niedermayer wrote:
> > On Sun, Nov 23, 2008 at 08:42:11PM +0100, Reimar D?ffinger wrote:
> > > On Sun, Nov 23, 2008 at 07:34:49PM +0100, Michael Niedermayer wrote:
> > > > so it seems we are back to .byte 0x9C
> > > 
> > > Hm, I'd be in favour of disabling the check on x86_64 and then going for
> > > pushfl, or do you dislike that for some reason?
> > 
> > IMHO if there is a cpuid flag on x86_64 (and i think there is but i
> > didnt check) then it seems correct to check it ..
> > but of course the argument, that all x86_64 cpus will likely support
> > cpuid is pretty good as well, so i surely have no strong oppinion on 
> > this
> 
> Well, I just checked, the x86_64 specification does not actually require
> it it seems.
> How about
> #ifdef ARCH_X86_64
> #define PUSHF "pushfq\n\t"
> #define POPF  "popfq\n\t"
> #else
> #define PUSHF "pushfl\n\t"
> #define POPF  "popfl\n\t"
> #endif
> ?

fine with me ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081124/a0930a32/attachment.pgp>



More information about the ffmpeg-devel mailing list