Skip to content
Permalink
Browse files

Zero ecx with a mov instruction

PGI assembler does not like the initialization in the constraints.
  • Loading branch information...
martin-frbg committed Jun 16, 2019
1 parent 6d3efb2 commit bbd4bb0154b6c4bfc561dce07b71eba7c7fa9013
Showing with 3 additions and 2 deletions.
  1. +3 −2 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
}

0 comments on commit bbd4bb0

Please sign in to comment.
You can’t perform that action at this time.