diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-05-31 11:02:46 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-06-05 11:01:05 +0200 |
commit | b18236897ca15c3db1506d8edb9a191dfe51429c (patch) | |
tree | c2875e04afe52dbbd7c011c16c054d8ab3fdf6a2 /util | |
parent | e68e97ce55b3d17af22dd62c3b3dc72f761b0862 (diff) | |
download | qemu-b18236897ca15c3db1506d8edb9a191dfe51429c.zip qemu-b18236897ca15c3db1506d8edb9a191dfe51429c.tar.gz qemu-b18236897ca15c3db1506d8edb9a191dfe51429c.tar.bz2 |
host/i386: assume presence of SSE2
QEMU now requires an x86-64-v2 host, which has SSE2.
Use it freely in buffer_is_zero.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'util')
-rw-r--r-- | util/bufferiszero.c | 4 | ||||
-rw-r--r-- | util/cpuinfo-i386.c | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/util/bufferiszero.c b/util/bufferiszero.c index 74864f7..11c080e 100644 --- a/util/bufferiszero.c +++ b/util/bufferiszero.c @@ -188,14 +188,14 @@ static biz_accel_fn const accel_table[] = { static unsigned best_accel(void) { +#ifdef CONFIG_AVX2_OPT unsigned info = cpuinfo_init(); -#ifdef CONFIG_AVX2_OPT if (info & CPUINFO_AVX2) { return 2; } #endif - return info & CPUINFO_SSE2 ? 1 : 0; + return 1; } #elif defined(__aarch64__) && defined(__ARM_NEON) diff --git a/util/cpuinfo-i386.c b/util/cpuinfo-i386.c index 90f92a4..ca74ef0 100644 --- a/util/cpuinfo-i386.c +++ b/util/cpuinfo-i386.c @@ -34,7 +34,6 @@ unsigned __attribute__((constructor)) cpuinfo_init(void) if (max >= 1) { __cpuid(1, a, b, c, d); - info |= (d & bit_SSE2 ? CPUINFO_SSE2 : 0); info |= (c & bit_MOVBE ? CPUINFO_MOVBE : 0); info |= (c & bit_POPCNT ? CPUINFO_POPCNT : 0); info |= (c & bit_PCLMUL ? CPUINFO_PCLMUL : 0); |