[AArch64][Windows] Add llvm-readobj support for save_any_reg unwind opcode.
commit0b61db423bfec26f110c27b7282c3f51aa0f3006
authorEli Friedman <efriedma@quicinc.com>
Wed, 5 Oct 2022 01:55:01 +0000 (4 18:55 -0700)
committerEli Friedman <efriedma@quicinc.com>
Wed, 5 Oct 2022 01:55:01 +0000 (4 18:55 -0700)
treeb4b63c6c05e53fcbcab827f0cf275e55a8c5c6b8
parent30d639180f6715f2fafcac5b4893d8ffbc61733f
[AArch64][Windows] Add llvm-readobj support for save_any_reg unwind opcode.

This is primarily used for Arm64EC, but it could be used for other
non-standard calling conventions. The testcase is based on an Arm64EC
thunk generated by MSVC.

The name save_any_reg comes from Microsoft documentation, but the full
encoding isn't specified there; this is reverse-engineered from the
behavior of the unwinder. (Thanks to Martin Storsjö for his example of
how to write simple unwinder testcases by directly calling
RtlVirtualUnwind.)

Differential Revision: https://reviews.llvm.org/D135196
llvm/test/tools/llvm-readobj/COFF/arm64-unwind-save_any_reg.s [new file with mode: 0644]
llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp
llvm/tools/llvm-readobj/ARMWinEHPrinter.h