1
1

Merge pull request #766 from rhc54/topic/hwloc

Update x86_32 cpuid assembly code.
Этот коммит содержится в:
rhc54 2015-07-31 12:53:16 -07:00
родитель 2e7f794aae b42545b0cb
Коммит c6cc1a9707

Просмотреть файл

@ -72,14 +72,11 @@ static __hwloc_inline void hwloc_x86_cpuid(unsigned *eax, unsigned *ebx, unsigne
: "+a" (*eax), "=m" (*ebx), "=&r"(sav_rbx), : "+a" (*eax), "=m" (*ebx), "=&r"(sav_rbx),
"+c" (*ecx), "=&d" (*edx)); "+c" (*ecx), "=&d" (*edx));
#elif defined(HWLOC_X86_32_ARCH) #elif defined(HWLOC_X86_32_ARCH)
unsigned long sav_ebx;
__asm__( __asm__(
"mov %%ebx,%2\n\t" "mov %%ebx,%1\n\t"
"cpuid\n\t" "cpuid\n\t"
"xchg %2,%%ebx\n\t" "xchg %%ebx,%1\n\t"
"movl %k2,%1\n\t" : "+a" (*eax), "=SD" (*ebx), "+c" (*ecx), "=d" (*edx));
: "+a" (*eax), "=m" (*ebx), "=&r"(sav_ebx),
"+c" (*ecx), "=&d" (*edx));
#else #else
#error unknown architecture #error unknown architecture
#endif #endif