From bbd4bb0154b6c4bfc561dce07b71eba7c7fa9013 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sun, 16 Jun 2019 15:04:10 +0200 Subject: [PATCH] Zero ecx with a mov instruction PGI assembler does not like the initialization in the constraints. --- common_x86_64.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common_x86_64.h b/common_x86_64.h index f59ff6627..9db66b545 100644 --- a/common_x86_64.h +++ b/common_x86_64.h @@ -129,12 +129,13 @@ static __inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx){ *ecx=cpuinfo[2]; *edx=cpuinfo[3]; #else - __asm__ __volatile__("cpuid" + __asm__ __volatile__("mov %%ecx, 0;" + "cpuid" : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx) - : "0" (op), "c"(0)); + : "0" (op)); #endif }