[all-commits] [llvm/llvm-project] 86f76c: [AArch64][Libunwind] Add Support for FEAT_PAuthLR ...

Jack Styles via All-commits all-commits at lists.llvm.org
Mon Oct 28 01:23:00 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 86f76c3b171f95fd0560339f2ad0f4449277cf8d
      https://github.com/llvm/llvm-project/commit/86f76c3b171f95fd0560339f2ad0f4449277cf8d
  Author: Jack Styles <jack.styles at arm.com>
  Date:   2024-10-28 (Mon, 28 Oct 2024)

  Changed paths:
    M libunwind/src/DwarfInstructions.hpp
    M libunwind/src/DwarfParser.hpp
    M libunwind/src/dwarf2.h
    M llvm/include/llvm/BinaryFormat/Dwarf.def
    M llvm/include/llvm/MC/MCDwarf.h
    M llvm/include/llvm/MC/MCStreamer.h
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
    M llvm/lib/CodeGen/CFIInstrInserter.cpp
    M llvm/lib/CodeGen/MIRParser/MILexer.cpp
    M llvm/lib/CodeGen/MIRParser/MILexer.h
    M llvm/lib/CodeGen/MIRParser/MIParser.cpp
    M llvm/lib/CodeGen/MachineOperand.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
    M llvm/lib/MC/MCAsmStreamer.cpp
    M llvm/lib/MC/MCDwarf.cpp
    M llvm/lib/MC/MCStreamer.cpp
    M llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
    M llvm/lib/Target/AArch64/AArch64PointerAuth.cpp
    M llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-cfi.ll
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-diff-scope-same-key.ll
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-non-leaf.ll
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-regsave.mir
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-same-scope-diff-key.ll
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-subtarget.ll
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-thunk.ll
    M llvm/test/CodeGen/AArch64/pacbti-llvm-generated-funcs-2.ll
    M llvm/test/CodeGen/AArch64/sign-return-address-cfi-negate-ra-state.ll
    M llvm/test/CodeGen/AArch64/sign-return-address-pauth-lr.ll
    M llvm/test/CodeGen/AArch64/sign-return-address.ll
    M llvm/test/CodeGen/MIR/AArch64/return-address-signing.mir
    M llvm/test/MC/AArch64/directives-case_insensitive.s
    A llvm/test/MC/AArch64/negate_ra_state_with_pc.s
    M llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp

  Log Message:
  -----------
  [AArch64][Libunwind] Add Support for FEAT_PAuthLR DWARF Instruction (#112171)

As part of FEAT_PAuthLR, a new DWARF Frame Instruction was introduced,
`DW_CFA_AARCH64_negate_ra_state_with_pc`. This instructs Libunwind that
the PC has been used with the signing instruction. This change includes
three commits
- Libunwind support for the newly introduced DWARF Instruction
- CodeGen Support for the DWARF Instructions
- Reversing the changes made in #96377. Due to
`DW_CFA_AARCH64_negate_ra_state_with_pc`'s requirements to be placed
immediately after the signing instruction, this would mean the CFI
Instruction location was not consistent with the generated location when
not using FEAT_PAuthLR. The commit reverses the changes and makes the
location consistent across the different branch protection options.
While this does have a code size effect, this is a negligible one.

For the ABI information, see here:
https://github.com/ARM-software/abi-aa/blob/853286c7ab66048e4b819682ce17f567b77a0291/aadwarf64/aadwarf64.rst#id23



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