Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang][ARM] relax -mtp=cp15 for non-thumb cases
Building -march=armv6k Linux kernels with -mtp=cp15 fails to compile: error: hardware TLS register is not supported for the arm sub-architecture @ARDB found docs for ARM1176JZF-S (ARMv6K) that reference hard thread pointer. Relax our ARMv6 check for cases where we're targeting ARM via -marm (vs Thumb1 via -mthumb). This more closely matches the KConfig requirements for where we plan to use these (ie. ARMv6K, ARMv7 (arm or thumb2)). As @peter.smith mentions: on armv5 we can write the instruction to read/write to CP15 C13 with the ThreadID opcode. However on no armv5 implementation will the CP15 C13 have a Thread ID register. The GCC intent seems to be whether the instruction is encodable rather than check what the CPU supports. Link: ClangBuiltLinux/linux#1502 Link: https://developer.arm.com/documentation/ddi0301/h/system-control-coprocessor/system-control-processor-registers/c13--thread-and-process-id-registers Reviewed By: ardb, peter.smith Differential Revision: https://reviews.llvm.org/D114116
- Loading branch information
1 parent
728b982
commit 9f95bc7
Showing
3 changed files
with
28 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters