Commit 6e7ef3fd authored by Frank Barchard's avatar Frank Barchard

allow xgetbv to be disabled for drmemory testing

R=harryjin@google.com
BUG=none

Review URL: https://webrtc-codereview.appspot.com/56649004.
parent e40384b6
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 1459
Version: 1460
License: BSD
License File: LICENSE
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 1459
#define LIBYUV_VERSION 1460
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
......@@ -216,8 +216,10 @@ int InitCpuFlags(void) {
kCpuHasX86;
#ifdef HAS_XGETBV
// Avoid call to xgetbv if AVX disabled for drmemory.
// TODO(fbarchard): check xsave before calling xgetbv.
if ((cpu_info1[2] & 0x18000000) == 0x18000000 && // AVX and OSSave
TestOsSaveYmm()) { // Saves YMM.
!TestEnv("LIBYUV_DISABLE_AVX") && TestOsSaveYmm()) { // Saves YMM.
cpu_info_ |= ((cpu_info7[1] & 0x00000020) ? kCpuHasAVX2 : 0) |
kCpuHasAVX;
}
......@@ -238,9 +240,6 @@ int InitCpuFlags(void) {
if (TestEnv("LIBYUV_DISABLE_SSE42")) {
cpu_info_ &= ~kCpuHasSSE42;
}
if (TestEnv("LIBYUV_DISABLE_AVX")) {
cpu_info_ &= ~kCpuHasAVX;
}
if (TestEnv("LIBYUV_DISABLE_AVX2")) {
cpu_info_ &= ~kCpuHasAVX2;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment