From 362f6e73cacb5ebdc34243e6719548c8fba8bef3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Mon, 17 Jan 2022 19:07:07 +0100 Subject: [PATCH] babl: set ecx to 0 in cpuid This is neccesary to be able to detect AVX2 reliably. --- babl/babl-cpuaccel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/babl/babl-cpuaccel.c b/babl/babl-cpuaccel.c index ef26fa5..6c1f1cc 100644 --- a/babl/babl-cpuaccel.c +++ b/babl/babl-cpuaccel.c @@ -136,7 +136,7 @@ enum "=S" (ebx), \ "=c" (ecx), \ "=d" (edx) \ - : "0" (op)) + : "0" (op), "2" (0)) #else #define cpuid(op,eax,ebx,ecx,edx) \ __asm__ ("xor %%ecx, %%ecx\n\t" \ @@ -145,7 +145,7 @@ enum "=b" (ebx), \ "=c" (ecx), \ "=d" (edx) \ - : "0" (op)) + : "0" (op), "2" (0)) #endif -- 2.30.2