Add builtins for SHA3 cryptographic instructions.
New builtins for PowerPC's SHA3 cryptographic instructions are introduced.
This patch introduces new builtins to GCC for the PowerPC architecture, specifically for SHA3 cryptographic operations. These builtins map to new UNSPEC entries and will support instructions that may appear in future processor revisions. The change also includes documentation for these new SHA3-related builtins and adds a test case to verify their functionality.
In Details
The crypto.md machine description for rs6000 now includes UNSPEC_DMSHA3HASH, UNSPEC_DMSHA3DW, and UNSPEC_DMCRYSHASH to support SHA3 instructions. These are exposed as C builtins via rs6000-builtins.def. The documentation in extend.texi is updated accordingly, and a new test case sha-builtins-5.c is added to gcc.target/powerpc/.
- builtin
- A function or operation that is recognized and handled directly by the compiler, often providing access to specific hardware instructions or features.
- UNSPEC
- An internal GCC construct used in machine descriptions to represent operations that do not have a direct corresponding instruction mnemonic but are handled by specific backend code.