Skip to content

Commit

Permalink
Update to latest libprimesieve
Browse files Browse the repository at this point in the history
  • Loading branch information
kimwalisch committed Jun 26, 2024
1 parent c7fb835 commit 1aa5931
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions lib/primesieve/src/x86/cpuid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ void run_cpuid(int eax, int ecx, int* abcd)
#if defined(__i386__) && \
defined(__PIC__)
// In case of PIC under 32-bit EBX cannot be clobbered
asm volatile("movl %%ebx, %%edi;"
"cpuid;"
"xchgl %%ebx, %%edi;"
: "+a" (eax),
"=D" (ebx),
"+c" (ecx),
"=d" (edx));
__asm__ __volatile__("movl %%ebx, %%edi;"
"cpuid;"
"xchgl %%ebx, %%edi;"
: "+a" (eax),
"=D" (ebx),
"+c" (ecx),
"=d" (edx));
#else
asm volatile("cpuid"
: "+a" (eax),
"+b" (ebx),
"+c" (ecx),
"=d" (edx));
__asm__ __volatile__("cpuid"
: "+a" (eax),
"+b" (ebx),
"+c" (ecx),
"=d" (edx));
#endif

abcd[0] = eax;
Expand All @@ -75,7 +75,7 @@ uint64_t get_xcr0()
uint32_t eax;
uint32_t edx;

asm volatile("xgetbv" : "=a"(eax), "=d"(edx) : "c"(0));
__asm__ __volatile__("xgetbv" : "=a"(eax), "=d"(edx) : "c"(0));
return eax | (uint64_t(edx) << 32);
#endif
}
Expand Down

0 comments on commit 1aa5931

Please sign in to comment.