Add support for HYGON Vector Math Library (HVML) ABI.
Enables GCC to generate vectorized math calls using the HYGON HVML library via a new compiler option.
GCC now supports generating vectorized math function calls to the HYGON Vector Math Library (HVML) through the new option -mveclibabi=hvml. This complements existing support for Intel SVML and AMD ACML/AOCL. The implementation maps 39 scalar math function families, including C23 trigonometric functions, to HVML’s naming conventions. It requires a 64-bit target and unsafe math optimizations, and test cases have been added to verify its functionality and constraints.
In Details
This commit introduces support for the HYGON Vector Math Library (HVML) as a recognized vector math library ABI, similar to Intel's SVML and AMD's ACML/AOCL. The new option -mveclibabi=hvml is added to i386-options.cc and related configuration files. The ix86_veclibabi_hvml function handles the mapping of scalar math functions (39 families, including C23 trig functions) to HVML's specific naming conventions, using the mathfn_built_in path. This feature requires a 64-bit target and unsafe math optimizations (-fno-math-errno or equivalent). Test cases are included to verify correct fu…
- Vector Math Library (VML)
- A library that provides optimized mathematical functions (like sin, cos, exp) implemented using vector instructions (SIMD) for improved performance on supported processors.
- HYGON HVML
- HYGON's Vector Math Library, analogous to Intel's SVML or AMD's ACML, providing vectorized math functions for HYGON processors.
- ABI
- Application Binary Interface. Defines how low-level code is structured, including function calling conventions, data type representations, and how libraries are linked and interact.
- SIMD
- Single Instruction, Multiple Data. A class of parallel computers in Flynn's taxonomy that perform the same operation on multiple data points simultaneously using instruction-level parallelism.
- C23
- The upcoming revision of the C programming language standard, expected to include new features and improvements.