mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-30 05:43:53 -06:00
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>
This commit is contained in:
parent
e68e97ce55
commit
b18236897c
3 changed files with 2 additions and 4 deletions
|
@ -14,7 +14,6 @@
|
||||||
#define CPUINFO_POPCNT (1u << 4)
|
#define CPUINFO_POPCNT (1u << 4)
|
||||||
#define CPUINFO_BMI1 (1u << 5)
|
#define CPUINFO_BMI1 (1u << 5)
|
||||||
#define CPUINFO_BMI2 (1u << 6)
|
#define CPUINFO_BMI2 (1u << 6)
|
||||||
#define CPUINFO_SSE2 (1u << 7)
|
|
||||||
#define CPUINFO_AVX1 (1u << 9)
|
#define CPUINFO_AVX1 (1u << 9)
|
||||||
#define CPUINFO_AVX2 (1u << 10)
|
#define CPUINFO_AVX2 (1u << 10)
|
||||||
#define CPUINFO_AVX512F (1u << 11)
|
#define CPUINFO_AVX512F (1u << 11)
|
||||||
|
|
|
@ -188,14 +188,14 @@ static biz_accel_fn const accel_table[] = {
|
||||||
|
|
||||||
static unsigned best_accel(void)
|
static unsigned best_accel(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_AVX2_OPT
|
||||||
unsigned info = cpuinfo_init();
|
unsigned info = cpuinfo_init();
|
||||||
|
|
||||||
#ifdef CONFIG_AVX2_OPT
|
|
||||||
if (info & CPUINFO_AVX2) {
|
if (info & CPUINFO_AVX2) {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return info & CPUINFO_SSE2 ? 1 : 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(__aarch64__) && defined(__ARM_NEON)
|
#elif defined(__aarch64__) && defined(__ARM_NEON)
|
||||||
|
|
|
@ -34,7 +34,6 @@ unsigned __attribute__((constructor)) cpuinfo_init(void)
|
||||||
if (max >= 1) {
|
if (max >= 1) {
|
||||||
__cpuid(1, a, b, c, d);
|
__cpuid(1, a, b, c, d);
|
||||||
|
|
||||||
info |= (d & bit_SSE2 ? CPUINFO_SSE2 : 0);
|
|
||||||
info |= (c & bit_MOVBE ? CPUINFO_MOVBE : 0);
|
info |= (c & bit_MOVBE ? CPUINFO_MOVBE : 0);
|
||||||
info |= (c & bit_POPCNT ? CPUINFO_POPCNT : 0);
|
info |= (c & bit_POPCNT ? CPUINFO_POPCNT : 0);
|
||||||
info |= (c & bit_PCLMUL ? CPUINFO_PCLMUL : 0);
|
info |= (c & bit_PCLMUL ? CPUINFO_PCLMUL : 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue