babl: set ecx to 0 in cpuid
authorØyvind Kolås <pippin@gimp.org>
Mon, 17 Jan 2022 18:07:07 +0000 (19:07 +0100)
committerØyvind Kolås <pippin@gimp.org>
Mon, 17 Jan 2022 18:08:17 +0000 (19:08 +0100)
This is neccesary to be able to detect AVX2 reliably.

babl/babl-cpuaccel.c

index ef26fa58bbbb97f56ddf612ecc1a15d54ccf2cae..6c1f1cc1105118cc05011c570d73941dbc98af5e 100644 (file)
@@ -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