mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-01 22:36:05 +00:00

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