[Openmp-commits] [openmp] [openmp] __kmp_x86_cpuid fix for i386/PIC builds. (PR #84626)

via Openmp-commits openmp-commits at lists.llvm.org
Sat Mar 9 04:22:59 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 5b5c21d772d20320fd876edddfc204cca93fae0f 17b22a36fad565829ca1490ada173fdb78708d32 -- openmp/runtime/src/kmp.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/openmp/runtime/src/kmp.h b/openmp/runtime/src/kmp.h
index ff10e6d69d..076a9b2e31 100644
--- a/openmp/runtime/src/kmp.h
+++ b/openmp/runtime/src/kmp.h
@@ -1405,11 +1405,11 @@ extern void __kmp_query_cpuid(kmp_cpuinfo_t *p);
 // zero in most cases
 static inline void __kmp_x86_cpuid(int leaf, int subleaf, struct kmp_cpuid *p) {
 #if defined(KMP_ARCH_X86_64) && (defined(__PIC__) || defined(__PIC__))
-// on i386 arch, the ebx reg. is used by pic, thus we need to preserve from
-// being trashed beforehand
+  // on i386 arch, the ebx reg. is used by pic, thus we need to preserve from
+  // being trashed beforehand
   __asm__ __volatile__("mov %%ebx, %%edi\n"
-		       "cpuid\n"
-		       "xchg %%edi, %%ebx\n"
+                       "cpuid\n"
+                       "xchg %%edi, %%ebx\n"
                        : "=a"(p->eax), "=b"(p->ebx), "=c"(p->ecx), "=d"(p->edx)
                        : "a"(leaf), "c"(subleaf));
 #else

``````````

</details>


https://github.com/llvm/llvm-project/pull/84626


More information about the Openmp-commits mailing list