Fixed hwcaps_detect() failing to compile on x86-64

pull/1823/head
Kfir Itzhak 2017-03-19 15:11:06 +02:00
parent 29885135a6
commit 8b593b701b
1 changed files with 10 additions and 2 deletions

View File

@ -248,10 +248,18 @@ void hwcaps_detect() {
"mov $0x0,%%ecx\n\t"
"mov $0x7,%%eax\n\t"
"cpuid\n\t"
"pushl %%ebx\n\t"
#ifdef __x86_64__
"push %%rbx\n\t"
#else
"push %%ebx\n\t"
#endif
"mov $0x1,%%eax\n\t"
"cpuid\n\t"
"popl %%ebx\n\t"
#ifdef __x86_64__
"pop %%rbx\n\t"
#else
"pop %%ebx\n\t"
#endif
: "=d" (r_edx), "=c" (r_ecx), "=b" (r_ebx)
:
: "%eax"