[babl] babl: set ecx to 0 in cpuid
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] babl: set ecx to 0 in cpuid
- Date: Mon, 17 Jan 2022 18:08:45 +0000 (UTC)
commit 362f6e73cacb5ebdc34243e6719548c8fba8bef3
Author: Øyvind Kolås <pippin gimp org>
Date: Mon Jan 17 19:07:07 2022 +0100
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 ef26fa58b..6c1f1cc11 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]