[all-commits] [llvm/llvm-project] 1ca763: [llvm-readobj] [ARMWinEH] Fix printing of packed u...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Wed Dec 3 03:09:36 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1ca763b76423a17a2101a4579b5d74bade4f0ce4
      https://github.com/llvm/llvm-project/commit/1ca763b76423a17a2101a4579b5d74bade4f0ce4
  Author: Martin Storsjö <martin at martin.st>
  Date:   2025-12-03 (Wed, 03 Dec 2025)

  Changed paths:
    M llvm/test/tools/llvm-readobj/COFF/arm64-packed-unwind.s
    M llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp

  Log Message:
  -----------
  [llvm-readobj] [ARMWinEH] Fix printing of packed unwind with H=1, RegI=RegF=0, CR!=1 (#170294)

In these cases, there are no other GPRs or float registers that would
have been backed up before the register homing area, that would have
allocated space on the stack for the saved registers.

Normally, the register homing part of the prologue consists of 4 nop
unwind codes. However, if we haven't allocated stack space for those
arguments yet, there's no space to store them in. The previous printout,
printing "stp x0, x1, [sp, #-N]!" wouldn't work when interpreted as a
nop unwind code.

Based on "dumpbin -unwindinfo", and from empirical inspection with
RtlVirtualUnwind, it turns out that the homing of argument registers is
done outside of the prologue. In these cases, "dumpbin -unwindinfo"
prints an annotation "(argument registers homed post-prolog)".

Adjust the printout accordingly. In these cases, the later stack
allocation (either "stp x29, x30, [sp, #-LocSZ]! or "sub sp, sp,
#LocSZ") is adjusted to include the space the homed registers (i.e. be
the full size from FrameSize).



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