qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC PATCH v4 16/75] target/i386: disable AVX/AVX2 cpuid bi


From: Jan Bobek
Subject: [Qemu-devel] [RFC PATCH v4 16/75] target/i386: disable AVX/AVX2 cpuid bitchecks
Date: Wed, 21 Aug 2019 13:28:52 -0400

Ignore the AVX/AVX2 cpuid bits when checking for availability of the
relevant instructions. This is clearly incorrect, but it preserves the
old behavior, which is useful during development.

Note: This changeset is intended for development only and shall not be
included in the final patch series.

Signed-off-by: Jan Bobek <address@hidden>
---
 target/i386/translate.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/target/i386/translate.c b/target/i386/translate.c
index 3e54443d99..e7c2ad41bf 100644
--- a/target/i386/translate.c
+++ b/target/i386/translate.c
@@ -4564,15 +4564,15 @@ static bool check_cpuid(CPUX86State *env, DisasContext 
*s, CheckCpuidFeat feat)
     case CHECK_CPUID_PCLMULQDQ:
         return s->cpuid_ext_features & CPUID_EXT_PCLMULQDQ;
     case CHECK_CPUID_AVX:
-        return s->cpuid_ext_features & CPUID_EXT_AVX;
+        return true /* s->cpuid_ext_features & CPUID_EXT_AVX */;
     case CHECK_CPUID_AES_AVX:
-        return (s->cpuid_ext_features & CPUID_EXT_AES)
-            && (s->cpuid_ext_features & CPUID_EXT_AVX);
+        return s->cpuid_ext_features & CPUID_EXT_AES
+            /* && (s->cpuid_ext_features & CPUID_EXT_AVX) */;
     case CHECK_CPUID_PCLMULQDQ_AVX:
-        return (s->cpuid_ext_features & CPUID_EXT_PCLMULQDQ)
-            && (s->cpuid_ext_features & CPUID_EXT_AVX);
+        return s->cpuid_ext_features & CPUID_EXT_PCLMULQDQ
+            /* && (s->cpuid_ext_features & CPUID_EXT_AVX) */;
     case CHECK_CPUID_AVX2:
-        return s->cpuid_7_0_ebx_features & CPUID_7_0_EBX_AVX2;
+        return true /* s->cpuid_7_0_ebx_features & CPUID_7_0_EBX_AVX2 */;
     default:
         g_assert_not_reached();
     }
-- 
2.20.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]