[clang] [ARM] Using cp15 while mtp =auto and arch is arm_arch6k and support thumb2 (PR #130027)

Vladi Krapp via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 6 10:23:12 PST 2025


VladiKrapp-Arm wrote:

@Zhenhang1213 Might I suggest changes along the lines of 

https://github.com/VladiKrapp-Arm/llvm-project/commit/63e4f10eaefc024e2afc41e5151411a383226a8b

This separates the check for whether the platform allows hardware tls from whether it is possible to encode using thumb2. Both these checks should be made for auto mode, so we don't automatically select this mode for the user when they might have some functions compiled with soft mode. 
@smithp35 : This still isn't exactly the same as what gcc does, because there auto mode is enabled if it's armv6k and arm mode. This check could be done here as well, but could still cause problems if user compiles as in your example with __attribute__((target("thumb"))). 

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


More information about the cfe-commits mailing list