mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-07 01:06:46 +08:00
test xsave before calling xgetbv.
R=agl@chromium.org, harryjin@google.com BUG=libyuv:497 Review URL: https://codereview.chromium.org/1382803002 .
This commit is contained in:
parent
2cc1a2b233
commit
3eefeaeb69
@ -1,6 +1,6 @@
|
||||
Name: libyuv
|
||||
URL: http://code.google.com/p/libyuv/
|
||||
Version: 1496
|
||||
Version: 1497
|
||||
License: BSD
|
||||
License File: LICENSE
|
||||
|
||||
|
||||
@ -11,6 +11,6 @@
|
||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||
#define INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
#define LIBYUV_VERSION 1496
|
||||
#define LIBYUV_VERSION 1497
|
||||
|
||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||
|
||||
@ -216,9 +216,8 @@ 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
|
||||
// AVX requires CPU has AVX, XSAVE and OSXSave for xgetbv
|
||||
if ((cpu_info1[2] & 0x1c000000) == 0x1c000000 && // AVX and OSXSave
|
||||
!TestEnv("LIBYUV_DISABLE_AVX") && TestOsSaveYmm()) { // Saves YMM.
|
||||
cpu_info_ |= ((cpu_info7[1] & 0x00000020) ? kCpuHasAVX2 : 0) |
|
||||
kCpuHasAVX;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user