Add %W print modifier for VSX register pair printing on rs6000
The rs6000 backend now supports a '%W' modifier for printing VSX register pairs, enabling better instruction display for `__vector_pair` operands.
A new ‘%W’ print modifier has been added to the rs6000 backend’s print_operand function. This modifier is designed to display the second VSX register in a pair, which is crucial for representing __vector_pair operands in assembly output. This enhancement supports future Power instruction patterns that require printing both registers of a VSX pair.
In Details
The rs6000.cc file in the rs6000 backend now includes a %W specifier in print_operand. This new modifier complements the existing %x by outputting the VSX register number plus two, specifically for the second register of a __vector_pair operand. This is necessary for accurately disassembling and displaying instructions that utilize paired VSX registers.
- rs6000
- The GCC target identifier for IBM POWER processors, often referred to as 'PowerPC'. This commit relates to code generation for this architecture.
- VSX
- Vector Scalar Extension. A set of instructions and registers on PowerPC architectures designed for SIMD (Single Instruction, Multiple Data) operations, often used for multimedia and scientific computing.
- `__vector_pair` operand
- A data type or concept used in compiler internal representations or assembly output to signify a pair of VSX registers treated as a single unit. This often corresponds to specific hardware capabilities for processing two adjacent vector registers together.
- print modifier
- A character used in format strings within compiler code (like
print_operand) to control how specific operands or values are represented in diagnostic messages or assembly output.