Add builtins for SHA2 and SHAPAD instructions.
New builtins provide access to rs6000 SHA2 and SHAPAD crypto instructions.
This patch introduces new built-in functions to GCC for the PowerPC rs6000 architecture, enabling developers to utilize specialized SHA2 and SHAPAD cryptographic instructions. It defines numerous builtins, including those for extended mnemonics, and adds parameter checking to catch errors early in the compilation process. These additions prepare for potential future processor support of these instructions.
In Details
This commit adds intrinsic support for the rs6000 architecture's SHA2 and SHAPAD crypto instructions. It defines UNSPEC entries in crypto.md for instructions like UNSPEC_DMSHA2HASH, UNSPEC_DMXXSHAPAD, and their extended mnemonic variants. The patch also includes specific parameter validation for dmxxshapad related to instruction IDs and bit lengths, aiming to provide earlier error detection than the assembler alone. This is part of a larger effort to expose hardware acceleration for cryptographic primitives.
- builtin
- A function or keyword provided by the compiler that has a predefined meaning and is often implemented as a direct machine instruction or a highly optimized library function.
- rs6000
- GCC's target architecture code for IBM's PowerPC processors.
- SHA2
- A family of secure hash algorithms widely used in cryptography.
- SHAPAD
- A specific instruction set extension for cryptographic operations, likely related to padding or block processing.
- mnemonic
- An abbreviation or symbol used in assembly language to represent a machine instruction.