[all-commits] [llvm/llvm-project] e1f8f8: [ARM] Fix frame chains with M-profile PACBTI (#110...

Oliver Stannard via All-commits all-commits at lists.llvm.org
Thu Oct 17 01:33:06 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e1f8f84acec05997893c305c78fbf7feecf44dd7
      https://github.com/llvm/llvm-project/commit/e1f8f84acec05997893c305c78fbf7feecf44dd7
  Author: Oliver Stannard <oliver.stannard at arm.com>
  Date:   2024-10-17 (Thu, 17 Oct 2024)

  Changed paths:
    M llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
    M llvm/lib/Target/ARM/ARMCallingConv.td
    M llvm/lib/Target/ARM/ARMFrameLowering.cpp
    M llvm/lib/Target/ARM/ARMSubtarget.cpp
    M llvm/lib/Target/ARM/ARMSubtarget.h
    A llvm/test/CodeGen/Thumb2/pacbti-m-frame-chain.ll

  Log Message:
  -----------
  [ARM] Fix frame chains with M-profile PACBTI (#110285)

When using AAPCS-compliant frame chains with PACBTI return address
signing, there ware a number of bugs in the generation of the frame
pointer and function prologues. The most obvious was that we sometimes
would modify r11 before pushing it to the stack, so it wasn't preserved
as required by the PCS. We also sometimes did not push R11 and LR
adjacent to one another on the stack, or used R11 as a frame pointer
without pointing it at the saved value of R11, both of which are
required to have an AAPCS compliant frame chain.

The original work of this patch was done by James Westwood, reviewed as
 #82801 and #81249, with some tidy-ups done by Mark Murray and myself.



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