x86: Add CPU flag for the i686 cmov instruction

(cherry picked from commit 65345a5a30)
Signed-off-by: Diego Biurrun <diego@biurrun.de>

Conflicts:
	libavutil/cpu.c
	libavutil/cpu.h
This commit is contained in:
Diego Biurrun 2012-06-19 22:55:26 +02:00
parent c6af9e944e
commit 8637f4edee
5 changed files with 8 additions and 1 deletions

View File

@ -13,6 +13,9 @@ libavutil: 2011-04-18
API changes, most recent first:
2014-09-16 - xxxxxxx - lavu 51.22.3 - cpu.h
Add AV_CPU_FLAG_CMOV.
2012-03-04 - 7f3f855 - lavu 51.22.1 - error.h
Add AVERROR_UNKNOWN

View File

@ -155,7 +155,7 @@
#define LIBAVUTIL_VERSION_MAJOR 51
#define LIBAVUTIL_VERSION_MINOR 22
#define LIBAVUTIL_VERSION_MICRO 2
#define LIBAVUTIL_VERSION_MICRO 3
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \

View File

@ -64,6 +64,7 @@ static const struct {
{ AV_CPU_FLAG_FMA4, "fma4" },
{ AV_CPU_FLAG_3DNOW, "3dnow" },
{ AV_CPU_FLAG_3DNOWEXT, "3dnowext" },
{ AV_CPU_FLAG_CMOV, "cmov" },
#endif
{ 0 }
};

View File

@ -41,6 +41,7 @@
#define AV_CPU_FLAG_XOP 0x0400 ///< Bulldozer XOP functions
#define AV_CPU_FLAG_FMA4 0x0800 ///< Bulldozer FMA4 functions
#define AV_CPU_FLAG_IWMMXT 0x0100 ///< XScale IWMMXT
#define AV_CPU_FLAG_CMOV 0x1000 ///< i686 cmov
#define AV_CPU_FLAG_ALTIVEC 0x0001 ///< standard
/**

View File

@ -83,6 +83,8 @@ int ff_get_cpu_flags_x86(void)
cpuid(1, eax, ebx, ecx, std_caps);
family = ((eax>>8)&0xf) + ((eax>>20)&0xff);
model = ((eax>>4)&0xf) + ((eax>>12)&0xf0);
if (std_caps & (1 << 15))
rval |= AV_CPU_FLAG_CMOV;
if (std_caps & (1<<23))
rval |= AV_CPU_FLAG_MMX;
if (std_caps & (1<<25))