[compiler-rt] [compiler-rt][ARM] Add missing PACBTI support to assembly aeabi functions (PR #142400)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 6 07:06:42 PDT 2025
================
@@ -37,6 +42,12 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_cfcmpeq)
movs r0, #0xF
lsls r0, r0, #31
pop {r0-r3, pc}
+#else
+#if defined(__ARM_FEATURE_PAC_DEFAULT)
+ pop {r0-r3, r12, lr}
+ aut r12, lr, sp
+ beq 2f
----------------
smithp35 wrote:
Similar comment to above. I think you can get rid of
```
beq 2f
b __aeabi_cfcmple
```
and move the #endif to be after `pop {r0-r3, lr}`
```
#if defined(__ARM_FEATURE_PAC_DEFAULT)
pop {r0-r3, r12, lr}
aut r12, lr, sp
# else
pop {r0, r3, lr}
# endif
// __aeabi_cfcmple is in a different section for some builds.
IT(ne)
bne __aeabi_cfcmple
#if defined(USE_THUMB_2)
mov r12, #APSR_C
msr APSR_nzcvq, r12
#else
msr APSR_nzcvq, #APSR_C
#endif
```
https://github.com/llvm/llvm-project/pull/142400
More information about the llvm-commits
mailing list