[Openmp-commits] [openmp] [openmp] __kmp_x86_cpuid fix for i386/PIC builds. (PR #84626)
Michał Górny via Openmp-commits
openmp-commits at lists.llvm.org
Sat Mar 16 06:25:55 PDT 2024
mgorny wrote:
Actually, this change makes no sense to me (either the committed or the proposed variant). You're explicitly specifying `ebx` as the output operand, so the compiler should assume it will be overwritten. I've tested it both with clang and gcc, and indeed it does `pushl %ebx` before the assembly: https://godbolt.org/z/Tchze37ja
On top of that, you're effectively clobbering `%ebx` set by `cpuid`, so `p->ebx` ends up containing "junk" prior to `cpuid` call rather than the value returned by `cpuid`.
https://github.com/llvm/llvm-project/pull/84626
More information about the Openmp-commits
mailing list