[all-commits] [llvm/llvm-project] 247727: [ARM] reject -mtp=cp15 if target subarch does not ...

Ard Biesheuvel via All-commits all-commits at lists.llvm.org
Tue Nov 9 09:30:34 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 24772720c54500714e2d48b9109bb62d5867ad95
      https://github.com/llvm/llvm-project/commit/24772720c54500714e2d48b9109bb62d5867ad95
  Author: Ard Biesheuvel <ardb at kernel.org>
  Date:   2021-11-09 (Tue, 09 Nov 2021)

  Changed paths:
    M clang/lib/Driver/ToolChains/Arch/ARM.cpp
    M clang/lib/Driver/ToolChains/Arch/ARM.h
    M clang/test/Driver/clang-translation.c

  Log Message:
  -----------
  [ARM] reject -mtp=cp15 if target subarch does not support it

Currently, we permit -mtp=cp15 even for targets that don't implement the
TLS register. When building for ARMv6 or earlier, this means we emit
instructions that will UNDEF at runtime. For Thumb1, passing -mtp=cp15
will trigger an assert in the backend.

So let's add some diagnostics to ensure that -mtp=cp15 is only accepted
for ARMv6T2 or newer.

Reviewed By: nickdesaulniers

Differential Revision: https://reviews.llvm.org/D113026




More information about the All-commits mailing list