[compiler-rt] [compiler-rt] Add big endian support to __aeabi_(idivmod|uidivmod|uldivmod) (PR #126277)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 7 09:46:48 PST 2025
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 3f8e2802069aabe4384ecd4575d50fd4457dae51 dd99a15df4556e310dde0966ccdcdbfce5b0ae9e --extensions c -- compiler-rt/test/builtins/Unit/arm/aeabi_uldivmod_test.c
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/compiler-rt/test/builtins/Unit/arm/aeabi_uldivmod_test.c b/compiler-rt/test/builtins/Unit/arm/aeabi_uldivmod_test.c
index 32b08d6048..695f50fe25 100644
--- a/compiler-rt/test/builtins/Unit/arm/aeabi_uldivmod_test.c
+++ b/compiler-rt/test/builtins/Unit/arm/aeabi_uldivmod_test.c
@@ -13,33 +13,32 @@ int test_aeabi_uldivmod(du_int a, du_int b, du_int expected_q, du_int expected_r
{
du_int q, r;
__asm__(
-#if _YUGA_BIG_ENDIAN
+# if _YUGA_BIG_ENDIAN
"movs r1, %Q[a] \n"
"movs r0, %R[a] \n"
"movs r3, %Q[b] \n"
"movs r2, %R[b] \n"
-#else
+# else
"movs r0, %Q[a] \n"
"movs r1, %R[a] \n"
"movs r2, %Q[b] \n"
"movs r3, %R[b] \n"
-#endif
+# endif
"bl __aeabi_uldivmod \n"
-#if _YUGA_BIG_ENDIAN
+# if _YUGA_BIG_ENDIAN
"movs %Q[q], r1\n"
"movs %R[q], r0\n"
"movs %Q[r], r3\n"
"movs %R[r], r2\n"
-#else
+# else
"movs %Q[q], r0\n"
"movs %R[q], r1\n"
"movs %Q[r], r2\n"
"movs %R[r], r3\n"
-#endif
- : [q] "=r" (q), [r] "=r"(r)
+# endif
+ : [q] "=r"(q), [r] "=r"(r)
: [a] "r"(a), [b] "r"(b)
- : "lr", "r0", "r1", "r2", "r3"
- );
+ : "lr", "r0", "r1", "r2", "r3");
if (q != expected_q || r != expected_r)
printf("error in aeabi_uldivmod: %llX / %llX = %llX, R = %llX, expected %llX, %llX\n",
a, b, q, r, expected_q, expected_r);
``````````
</details>
https://github.com/llvm/llvm-project/pull/126277
More information about the llvm-commits
mailing list