[compiler-rt] [compiler-rt][ARM] Make ARMv4T assembly builtins interwork (PR #221725)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 7 06:22:56 PDT 2026
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 origin/main HEAD --extensions h,c -- compiler-rt/test/builtins/Unit/arm/aeabi_cmpflags_interwork_test.c compiler-rt/test/builtins/Unit/arm/aeabi_fcmp_test.c compiler-rt/test/builtins/Unit/arm/aeabi_ldivmod_test.c compiler-rt/test/builtins/Unit/arm/aeabi_mem_test.c compiler-rt/lib/builtins/assembly.h compiler-rt/test/builtins/Unit/arm/aeabi_idivmod_test.c compiler-rt/test/builtins/Unit/arm/aeabi_uidivmod_test.c compiler-rt/test/builtins/Unit/arm/aeabi_uldivmod_test.c compiler-rt/test/builtins/Unit/divmodsi4_test.c compiler-rt/test/builtins/Unit/divsi3_test.c compiler-rt/test/builtins/Unit/modsi3_test.c compiler-rt/test/builtins/Unit/udivsi3_test.c --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/compiler-rt/lib/builtins/assembly.h b/compiler-rt/lib/builtins/assembly.h
index 3fc79073f..bddd60a4f 100644
--- a/compiler-rt/lib/builtins/assembly.h
+++ b/compiler-rt/lib/builtins/assembly.h
@@ -206,23 +206,25 @@
// pop {pc} can't switch Thumb mode on ARMv4T
#if __ARM_ARCH >= 5
#define POP_PC() pop {pc}
-#define POP_PC_WITH_REGS(...) pop {__VA_ARGS__, pc}
-#define POP_PC_WITH_REGS_NO_CLOBBER(...) pop {__VA_ARGS__, pc}
+#define POP_PC_WITH_REGS(...) \
+ pop { __VA_ARGS__, pc }
+#define POP_PC_WITH_REGS_NO_CLOBBER(...) \
+ pop { __VA_ARGS__, pc }
#elif defined(USE_THUMB_1)
#define POP_PC() \
- pop {r3}; \
+ pop{r3}; \
JMP(r3)
#define POP_PC_WITH_REGS(...) \
- pop {__VA_ARGS__}; \
- pop {r3}; \
+ pop{__VA_ARGS__}; \
+ pop{r3}; \
JMP(r3)
// Some builtins have live values in every Thumb-1 low register. Use ip and lr
// while transferring the stacked return address to a BX-capable high register.
// NO_CLOBBER refers to low registers; ip and lr may be clobbered.
#define POP_PC_WITH_REGS_NO_CLOBBER(...) \
- pop {__VA_ARGS__}; \
+ pop{__VA_ARGS__}; \
mov ip, r3; \
- pop {r3}; \
+ pop{r3}; \
mov lr, r3; \
mov r3, ip; \
JMP(lr)
@@ -231,7 +233,7 @@
pop {ip}; \
JMP(ip)
#define POP_PC_WITH_REGS(...) \
- pop {__VA_ARGS__, ip}; \
+ pop{__VA_ARGS__, ip}; \
JMP(ip)
#define POP_PC_WITH_REGS_NO_CLOBBER(...) POP_PC_WITH_REGS(__VA_ARGS__)
#endif
``````````
</details>
https://github.com/llvm/llvm-project/pull/221725
More information about the llvm-commits
mailing list