[libunwind] NFC: Use macros to accommodate differences in representation of PowerPC...
authorXing Xue <xingxue@outlook.com>
Thu, 6 May 2021 18:33:38 +0000 (14:33 -0400)
committerXing Xue <xingxue@outlook.com>
Thu, 6 May 2021 18:33:38 +0000 (14:33 -0400)
commit8408d3f2d814b19da450ff162f47981b55a9703a
tree02133d5432f7e62c8b9d19d32f3d9c48a0aa2272
parenta577d59db243c1be038f331e0057a37b777a4407
[libunwind] NFC: Use macros to accommodate differences in representation of PowerPC assemblers

Summary:
This NFC patch replaces the representation of registers and the left shift operator in the PowerPC assembly code to allow it to be consumed by the GNU flavored assembler and the AIX assembler.

* Registers - change the representation of PowperPC registers from %rn, %fn, %vsn, and %vrn to the register number alone, e.g., n. The GNU flavored assembler and the AIX assembler are able to determine the register kind based on the context of the instruction in which the register is used.

* Left shift operator - use macro PPC_LEFT_SHIFT to represent the left shift operator. The left shift operator in the AIX assembly language is < instead of <<

Reviewed by: sfertile, MaskRay, compnerd

Differential Revision: https://reviews.llvm.org/D101179
libunwind/src/UnwindRegistersRestore.S
libunwind/src/UnwindRegistersSave.S
libunwind/src/assembly.h