[PATCH] D116233: [clang][ARM] re-use arm::isHardTPSupported for hardware TLS check
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 23 13:49:38 PST 2021
nickdesaulniers added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3219-3226
// Check whether the target subarch supports the hardware TLS register
- if (arm::getARMSubArchVersionNumber(EffectiveTriple) < 7 &&
- llvm::ARM::parseArch(EffectiveTriple.getArchName()) !=
- llvm::ARM::ArchKind::ARMV6T2) {
+ if (!arm::isHardTPSupported(EffectiveTriple)) {
D.Diag(diag::err_target_unsupported_tp_hard)
<< EffectiveTriple.getArchName();
return;
}
// Check whether the user asked for something other than -mtp=cp15
----------------
nickdesaulniers wrote:
> If I refactor `arm::getReadTPMode` a little, we might just be able to use that. Let me see if I can make that work like I'm imagining.
eh, now that I've tried that, I think this approach is cleaner as is. Sorry for the noise.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116233/new/
https://reviews.llvm.org/D116233
More information about the cfe-commits
mailing list