aarch64: Port NEON SM3/SM4 intrinsics to pragma framework
Integrates SM3 and SM4 NEON intrinsics into GCC's pragma-based system for aarch64.
This commit ports the NEON SM3 and SM4 intrinsics, which are part of the FEAT_SM4 feature set, to GCC’s pragma-based framework for the aarch64 architecture. It involves adding new function declarations and bases for these intrinsics, removing older builtin function definitions, and including new assembly tests to verify their functionality. This change standardizes the handling of these cryptographic intrinsics within GCC.
In Details
GCC's aarch64 backend implements NEON and other SIMD intrinsics. Previously, some SM3 and SM4 intrinsics (related to FEAT_SM4) were handled via a different mechanism. This commit migrates them to the pragma-based framework, which uses pragmas to define intrinsic functions and their behavior. This involves updating definitions in aarch64-neon-builtins-base.def and .cc, removing corresponding entries from aarch64-simd-builtins.def, and updating header files like arm_neon.h. New tests ensure correctness.
- aarch64
- The 64-bit ARM architecture.
- NEON
- ARM's advanced Single Instruction, Multiple Data (SIMD) architecture extension for its processors, used for accelerating multimedia and signal processing tasks.
- intrinsics
- Special functions provided by a compiler that map directly to specific hardware instructions, allowing programmers to access low-level hardware features from high-level code.
- pragma
- A directive provided by a compiler that specifies how a certain part of the code should be treated. In GCC, pragmas are often used to define built-in functions that map to hardware instructions.
- FEAT_SM4
- A specific feature extension for the ARM architecture that includes cryptographic acceleration instructions, such as those for SM3 and SM4 hashing algorithms.
- SIMD
- Single Instruction, Multiple Data. A class of parallel computers in Flynn's taxonomy that achieves performance by processing multiple data streams with a single instruction.