gccrs: Add implementations for fast floating-point intrinsics
Implements fast floating-point arithmetic intrinsics in gccrs, though without actual speed optimizations.
GCC’s Rust frontend (gccrs) now includes implementations for several fast floating-point arithmetic intrinsics: fadd_fast, fsub_fast, fmul_fast, fdiv_fast, and frem_fast. While these intrinsics are now recognized and handled, the current implementation performs standard, non-optimized operations. The change notes that GCC does not support enabling ‘fast’ mode for individual operations, only program-wide.
In Details
Implementations for fadd_fast, fsub_fast, fmul_fast, fdiv_fast, and frem_fast intrinsics have been added to gccrs. These are handled by a new fop_fast function in rust-intrinsic-handlers.cc. The intrinsic values are registered in rust-intrinsic-values.h, and type checking information is added in rust-hir-type-check-intrinsic.cc. The rust-compile-intrinsic.cc file is updated to include entries for these intrinsics. Notably, these 'fast' intrinsics currently delegate to the standard non-fast operations as GCC lacks fine-grained control over floating-point rounding modes per…
- gccrs
- The GCC frontend for the Rust programming language.
- Intrinsic
- A function that is recognized by the compiler and translated directly into a specific machine instruction or a sequence of instructions, often for performance or to access hardware features.
- Floating-point arithmetic
- Calculations involving numbers that have a fractional part, represented using a format like IEEE 754. 'Fast' versions of these operations may use less precise but quicker calculations.