Skip to content

Commit b42545b

Browse files
author
Ralph Castain
committed
Update x86_32 cpuid assembly code. Cheery-picked from
open-mpi/hwloc@40f9978
1 parent 8649a9f commit b42545b

File tree

1 file changed

+3
-6
lines changed
  • opal/mca/hwloc/hwloc1110/hwloc/include/private

1 file changed

+3
-6
lines changed

opal/mca/hwloc/hwloc1110/hwloc/include/private/cpuid-x86.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,11 @@ static __hwloc_inline void hwloc_x86_cpuid(unsigned *eax, unsigned *ebx, unsigne
7272
: "+a" (*eax), "=m" (*ebx), "=&r"(sav_rbx),
7373
"+c" (*ecx), "=&d" (*edx));
7474
#elif defined(HWLOC_X86_32_ARCH)
75-
unsigned long sav_ebx;
7675
__asm__(
77-
"mov %%ebx,%2\n\t"
76+
"mov %%ebx,%1\n\t"
7877
"cpuid\n\t"
79-
"xchg %2,%%ebx\n\t"
80-
"movl %k2,%1\n\t"
81-
: "+a" (*eax), "=m" (*ebx), "=&r"(sav_ebx),
82-
"+c" (*ecx), "=&d" (*edx));
78+
"xchg %%ebx,%1\n\t"
79+
: "+a" (*eax), "=SD" (*ebx), "+c" (*ecx), "=d" (*edx));
8380
#else
8481
#error unknown architecture
8582
#endif

0 commit comments

Comments
 (0)