hwloc: cpuid-x86: Fix duplicate asm labels in case of heavy inlining on x86-32
hwloc_x86_discover() calls hwloc_look_x86() twice, which calls hwloc_have_x86_cpuid(). If everything gets inlined, the asm label inside hwloc_have_x86_cpuid() is duplicated. Use a local label with f annotation in jumps to avoid the problem. Thanks to Thomas Van Doren for reporting the issue (found with gcc -m32). (cherry picked from commit open-mpi/hwloc@50e447f5bc) Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Этот коммит содержится в:
родитель
86a536ca58
Коммит
9b59d532fc
@ -32,14 +32,14 @@ static __hwloc_inline int hwloc_have_x86_cpuid(void)
|
||||
"pushfl \n\t" \
|
||||
"pop %1 \n\t" \
|
||||
"cmp %1,%2\n\t" /* Compare with expected value */ \
|
||||
"jnz Lhwloc1\n\t" /* Unexpected, failure */ \
|
||||
"jnz 0f\n\t" /* Unexpected, failure */ \
|
||||
|
||||
TRY_TOGGLE /* Try to set/clear */
|
||||
TRY_TOGGLE /* Try to clear/set */
|
||||
|
||||
"mov $1,%0\n\t" /* Passed the test! */
|
||||
|
||||
"Lhwloc1: \n\t"
|
||||
"0: \n\t"
|
||||
"popfl \n\t" /* Restore flags */
|
||||
|
||||
: "=r" (ret), "=&r" (tmp), "=&r" (tmp2));
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user