[all-commits] [llvm/llvm-project] b71756: [AArch64] Fix the emission of WinCFI for pac-ret+l...

Anatoly Trosinenko via All-commits all-commits at lists.llvm.org
Sat Jul 12 03:46:09 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b71756852f5a41b35a74918374a11ae00365ee04
      https://github.com/llvm/llvm-project/commit/b71756852f5a41b35a74918374a11ae00365ee04
  Author: Anatoly Trosinenko <atrosinenko at accesssoftek.com>
  Date:   2025-07-12 (Sat, 12 Jul 2025)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
    M llvm/test/CodeGen/AArch64/sign-return-address.ll

  Log Message:
  -----------
  [AArch64] Fix the emission of WinCFI for pac-ret+leaf and SCS (#147518)

This commit fixes WinCFI opcodes being incorrectly emitted for test
cases in sign-return-address.ll.

Emit SEH_Nop opcode in emitShadowCallStackEpilogue the same way it is
done in emitShadowCallStackPrologue function - this fixes

    12 bytes of instructions in range, but .seh directives corresponding to 8 bytes

error being reported for the epilogue of non_leaf_scs function.

Emit SEH_PrologEnd on the code path in emitPrologue function that may be
taken when pac-ret protection is emitted for a leaf function - this
fixes errors like the following:

    starting epilogue (.seh_startepilogue) before prologue has ended (.seh_endprologue) in leaf_sign_all_v83
    Stray .seh_endepilogue in leaf_sign_all_v83



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