[all-commits] [llvm/llvm-project] 92f102: [llvm-readobj] Fix printing of Windows ARM unwind ...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Wed May 18 00:18:55 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 92f1028ceb30dc8e7eda3f06a8c7aa8e8082ff65
      https://github.com/llvm/llvm-project/commit/92f1028ceb30dc8e7eda3f06a8c7aa8e8082ff65
  Author: Martin Storsjö <martin at martin.st>
  Date:   2022-05-18 (Wed, 18 May 2022)

  Changed paths:
    A llvm/test/tools/llvm-readobj/COFF/arm-unwind-opcodes.s
    M llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp

  Log Message:
  -----------
  [llvm-readobj] Fix printing of Windows ARM unwind opcodes, add tests

The existing code was essentially untested; in some cases, it used
too narrow variable types to fit all the bits, in some cases the
bit manipulation operations were incorrect.

For the "ldr lr, [sp], #x" opcode, there's nothing in the documentation
that says it cannot be used in a prologue. (In practice, it would
probably seldom be used there, but technically there's nothing
stopping it from being used.) The documentation only specifies the
operation to replay for unwinding it, but the corresponding mirror
instruction to be printed for a prologue is "str lr, [sp, #-x]!".

Also improve printing of register masks, by aggregating registers
into ranges where possible, and make the printing of the terminating
branches clearer, as "bx <reg>" and "b.w <target>".

Differential Revision: https://reviews.llvm.org/D125643




More information about the All-commits mailing list