Re: [libav-devel] [PATCH 2/4] x86: Add YASM implementations of cpuid and xgetbv from x264

2012-10-03 Thread Måns Rullgård
Diego Biurrun writes: > +#define get_eflags(x) \ > +x = ff_cpu_cpuid_test(); > + > +#define set_eflags(x) \ > +x = 0; Instead of these weird definitions, please break out the existing cpuid test into a function similar to the yasm one.

Re: [libav-devel] [PATCH 2/4] x86: Add YASM implementations of cpuid and xgetbv from x264

2012-10-03 Thread Diego Biurrun
On Thu, Oct 04, 2012 at 01:07:00AM +0200, Diego Biurrun wrote: > > --- /dev/null > +++ b/libavutil/x86/cpuid.asm > @@ -0,0 +1,91 @@ > +;* > +;* Copyright (C) 2005-2010 x264 project > +;* > +;* Authors: Loren Merritt > +;*

[libav-devel] [PATCH 2/4] x86: Add YASM implementations of cpuid and xgetbv from x264

2012-10-03 Thread Diego Biurrun
This allows detecting CPU features with builds that have neither gcc inline assembly nor the right compiler intrinsics enabled. --- libavutil/x86/Makefile |3 +- libavutil/x86/cpu.c | 19 +- libavutil/x86/cpu.h |4 ++ libavutil/x86/cpuid.asm | 91 ++