mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-01-01 03:12:16 +08:00
movbe instruction detect
BUG=none TEST=cpu unittest Review URL: https://webrtc-codereview.appspot.com/1027005 git-svn-id: http://libyuv.googlecode.com/svn/trunk@527 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
bae8b852d8
commit
aa64b6b14c
@ -1,6 +1,6 @@
|
||||
Name: libyuv
|
||||
URL: http://code.google.com/p/libyuv/
|
||||
Version: 526
|
||||
Version: 527
|
||||
License: BSD
|
||||
License File: LICENSE
|
||||
|
||||
|
||||
@ -34,6 +34,7 @@ static const int kCpuHasSSE41 = 0x80;
|
||||
static const int kCpuHasSSE42 = 0x100;
|
||||
static const int kCpuHasAVX = 0x200;
|
||||
static const int kCpuHasAVX2 = 0x400;
|
||||
static const int kCpuHasMOVBE = 0x800; // For test purposes.
|
||||
|
||||
// These flags are only valid on MIPS processors.
|
||||
static const int kCpuHasMIPS = 0x1000;
|
||||
|
||||
@ -11,6 +11,6 @@
|
||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||
#define INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
#define LIBYUV_VERSION 526
|
||||
#define LIBYUV_VERSION 527
|
||||
|
||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||
|
||||
@ -162,6 +162,7 @@ int InitCpuFlags(void) {
|
||||
((cpu_info[2] & 0x00000200) ? kCpuHasSSSE3 : 0) |
|
||||
((cpu_info[2] & 0x00080000) ? kCpuHasSSE41 : 0) |
|
||||
((cpu_info[2] & 0x00100000) ? kCpuHasSSE42 : 0) |
|
||||
((cpu_info[2] & 0x00400000) ? kCpuHasMOVBE : 0) |
|
||||
(((cpu_info[2] & 0x18000000) == 0x18000000) ? kCpuHasAVX : 0) |
|
||||
kCpuHasX86;
|
||||
#ifdef HAS_XGETBV
|
||||
@ -189,6 +190,9 @@ int InitCpuFlags(void) {
|
||||
if (TestEnv("LIBYUV_DISABLE_SSE42")) {
|
||||
cpu_info_ &= ~kCpuHasSSE42;
|
||||
}
|
||||
if (TestEnv("LIBYUV_DISABLE_MOVBE")) {
|
||||
cpu_info_ &= ~kCpuHasMOVBE;
|
||||
}
|
||||
if (TestEnv("LIBYUV_DISABLE_AVX")) {
|
||||
cpu_info_ &= ~kCpuHasAVX;
|
||||
}
|
||||
|
||||
@ -35,6 +35,8 @@ TEST_F(libyuvTest, TestCpuHas) {
|
||||
printf("Has SSE4.1 %x\n", has_sse41);
|
||||
int has_sse42 = TestCpuFlag(kCpuHasSSE42);
|
||||
printf("Has SSE4.2 %x\n", has_sse42);
|
||||
int has_movbe = TestCpuFlag(kCpuHasMOVBE);
|
||||
printf("Has MOVBE %x\n", has_movbe);
|
||||
int has_avx = TestCpuFlag(kCpuHasAVX);
|
||||
printf("Has AVX %x\n", has_avx);
|
||||
int has_avx2 = TestCpuFlag(kCpuHasAVX2);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user