Add an -mtp=el[0-3] option to select which of the AArch64 thread ID registers will be used for the TLS base pointer.
This is a followup to D54685 which added subtarget features to enable accesses to the privileged thread ID registers.
Paths
| Differential D59631
[AArch64] Support selecting TPIDR_EL[1-3] as the thread base ClosedPublic Authored by philip.derrin on Mar 20 2019, 10:44 PM.
Details Summary Add an -mtp=el[0-3] option to select which of the AArch64 thread ID registers will be used for the TLS base pointer. This is a followup to D54685 which added subtarget features to enable accesses to the privileged thread ID registers.
Diff Detail
Event TimelineComment Actions Is there an existing compiler which this option is trying to be compatible with? GCC for AArch64 doesn't currently have an option for this, so we don't have to worry about compatibility with that. If possible, I'd prefer for the option to be "-mtp=", to match the option accepted by clang and GCC for AArch32. Comment Actions
No, there's no existing option as far as I'm aware. I'm happy to use -mtp=, as long as it is ok for it to remain in Group<m_arm_Features_Group> and to list values for both AArch32 and AArch64. It looks like these things only affect value completion and documentation; is that correct? Comment Actions I can't see any other uses of the option groups, or any way to put an option into two groups, so this LGTM. I'll commit it for you as before. This revision is now accepted and ready to land.Mar 29 2019, 6:00 AM Closed by commit rC357250: [AArch64] Support selecting TPIDR_EL[1-3] as the thread base (authored by olista01). · Explain WhyMar 29 2019, 6:31 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 192814 include/clang/Driver/Options.td
lib/Driver/ToolChains/Arch/AArch64.cpp
test/Driver/clang-translation.c
|