Skip to content

Commit

Permalink
erts: Do not use named no_cpuid label in asm
Browse files Browse the repository at this point in the history
Ask compiler to generate unique label name. Using named label has implications
on optimizer, that may lead to the compilation errors as the following:

    pthread/ethread.c: Assembler messages:
    pthread/ethread.c:213: Error: symbol `no_cpuid' is already defined
    pthread/ethread.c:213: Error: symbol `no_cpuid' is already defined
    pthread/ethread.c:213: Error: symbol `no_cpuid' is already defined
  • Loading branch information
matwey committed Jul 26, 2019
1 parent 5fc9678 commit 7512267
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions erts/lib_src/pthread/ethread.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@ ethr_x86_cpuid__(int *eax, int *ebx, int *ecx, int *edx)
"popl %%eax\n\t"
"movl $0x0, %0\n\t"
"xorl %%ecx, %%eax\n\t"
"jz no_cpuid\n\t"
"jz %=f\n\t"
"movl $0x1, %0\n\t"
"no_cpuid:\n\t"
"%=:\n\t"
: "=r"(have_cpuid)
:
: "%eax", "%ecx", "cc");
Expand Down

0 comments on commit 7512267

Please sign in to comment.