Add paddis instruction support to PowerPC future target
GCC now supports the 'paddis' instruction for future PowerPC processors.
GCC has added support for the ‘paddis’ instruction, which is planned for a future revision of the PowerPC architecture. This includes new predicates, constraints, and instruction patterns to recognize and generate the instruction. The changes also ensure compatibility with existing instructions like paddi and addi, enabling more efficient arithmetic operations on future PowerPC hardware.
In Details
This commit introduces support for the paddis instruction in the rs6000 backend, targeting a future PowerPC ISA. It adds new predicates (paddis_operand, paddis_paddi_operand) and operand handlers (add_cint_operand, reg_or_add_cint_operand, add_operand) in predicates.md and rs6000.cc to correctly select and emit paddis or combinations involving it. New constraint eU and predicate eV are added to constraints.md. The TARGET_PADDIS macro is introduced in rs6000.h. Expanded add instructions and new splitters in rs6000.md handle the paddis instruction for both 32…
- paddis
- A hypothetical new PowerPC instruction that performs a saturating add with an immediate value. This commit adds support for it in GCC.
- PowerPC
- A RISC instruction set architecture developed by Apple, IBM, and Motorola. It's used in various embedded systems, servers, and historically in Apple Macintosh computers.
- predicate
- In compiler optimization, a predicate is a condition that determines whether an instruction or a block of code should be executed. This can be used for predicated execution.
- constraint
- In GCC's machine description files (MD files), constraints specify requirements for operands of an instruction, such as whether an operand must be a register, an immediate value, or satisfy certain bit-width properties.
- GCC backend
- The part of the GCC compiler responsible for translating the compiler's intermediate representation into machine-specific assembly code for a particular target architecture.