[all-commits] [llvm/llvm-project] ed3828: [ARM] Use hardware TLS register in Thumb2 mode whe...

Ard Biesheuvel via All-commits all-commits at lists.llvm.org
Mon Nov 8 08:39:59 PST 2021


  Branch: refs/heads/release/13.x
  Home:   https://github.com/llvm/llvm-project
  Commit: ed38280d006c91d7098b0a02e160835ee09fd08a
      https://github.com/llvm/llvm-project/commit/ed38280d006c91d7098b0a02e160835ee09fd08a
  Author: Ard Biesheuvel <ardb at google.com>
  Date:   2021-11-08 (Mon, 08 Nov 2021)

  Changed paths:
    M llvm/lib/Target/ARM/ARMInstrThumb.td
    M llvm/lib/Target/ARM/ARMInstrThumb2.td
    M llvm/test/CodeGen/ARM/readtp.ll
    M llvm/test/CodeGen/ARM/thread_pointer.ll

  Log Message:
  -----------
  [ARM] Use hardware TLS register in Thumb2 mode when -mtp=cp15 is passed

In ARM mode, passing -mtp=cp15 forces the use of an inline MRC system register read to move the thread pointer value into a register.

Currently, in Thumb2 mode, -mtp=cp15 is ignored, and a call to the __aeabi_read_tp helper is emitted instead.

This is inconsistent, and breaks the Linux/ARM build for Thumb2 targets, as the Linux kernel does not provide an implementation of __aeabi_read_tp,.

Reviewed By: nickdesaulniers, peter.smith

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

(cherry picked from commit d7e089f2d6a5cd5f283a90ab29241d20d4fc3ed1)




More information about the All-commits mailing list