AArch64 NEON widen/narrow intrinsics ported to pragma-based framework
NEON widen and narrow intrinsics for AArch64 are now managed via a pragma-based framework, simplifying their implementation and maintenance.
This change integrates AArch64 NEON widen and narrow intrinsics, including saturating versions, into GCC’s pragma-based framework. Previously, these operations were handled through separate, now-deleted macros and builtins. The new approach standardizes their implementation, making them more manageable and consistent with other NEON intrinsics.
In Details
This commit refactors the implementation of AArch64 NEON integer-to-integer conversion intrinsics (vmovn, vmovl, vqmovn, vqmovun) to use the established pragma-based framework. This replaces custom macros and direct builtin declarations with a more centralized and extensible mechanism within aarch64-neon-builtins-base.cc, aligning with GCC's general approach for handling SIMD intrinsics and improving maintainability.
- NEON
- ARM's Advanced SIMD (Single Instruction, Multiple Data) extension, providing vector processing capabilities for multimedia and signal processing.
- intrinsics
- Functions that provide a C/C++ interface to specific hardware instructions, allowing developers to leverage low-level processor capabilities like SIMD operations from high-level code.
- pragma
- A directive to the compiler that provides extra information, often used in GCC to define how built-in functions, like SIMD intrinsics, are implemented and represented internally.
- widen/narrow
- Operations that convert data to a larger (widen) or smaller (narrow) data type. In the context of NEON, this involves converting between different vector element sizes, e.g., byte to word or word to byte.
- saturating
- An arithmetic operation where the result is clamped to a maximum or minimum value if it exceeds the representable range of the data type, rather than wrapping around or causing an overflow.