[all-commits] [llvm/llvm-project] c12bc5: Do not use R12 for indirect tail calls with PACBTI...

Eleanor Bonnici via All-commits all-commits at lists.llvm.org
Tue Apr 30 07:29:29 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c12bc57e23f8c37380ac25e774a60a684fce7bd3
      https://github.com/llvm/llvm-project/commit/c12bc57e23f8c37380ac25e774a60a684fce7bd3
  Author: Eleanor Bonnici <eleanor.bonnici at arm.com>
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
    M llvm/lib/Target/ARM/ARMBaseInstrInfo.h
    M llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
    M llvm/lib/Target/ARM/ARMFrameLowering.cpp
    M llvm/lib/Target/ARM/ARMInstrInfo.td
    M llvm/lib/Target/ARM/ARMPredicates.td
    M llvm/lib/Target/ARM/ARMRegisterBankInfo.cpp
    M llvm/lib/Target/ARM/ARMRegisterInfo.td
    M llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
    A llvm/test/CodeGen/ARM/pacbti-indirect-tail-calls-function-flags.ll
    A llvm/test/CodeGen/ARM/pacbti-indirect-tail-calls-module-flags1.ll
    A llvm/test/CodeGen/ARM/pacbti-indirect-tail-calls-module-flags2.ll

  Log Message:
  -----------
  Do not use R12 for indirect tail calls with PACBTI (#82661)

When compiling for thumbv8.1m with +pacbti and making an indirect tail
call, the compiler was free to put the function pointer into R12.

This is incorrect because R12 is restored to contain authentication code
for the caller's return address.

This patch excludes R12 from the set of registers the compiler can put
the function pointer in.

Fixes https://github.com/llvm/llvm-project/issues/75998



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list