[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:00:13 PST 2021


nickdesaulniers planned changes to this revision.
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
----------------
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.


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