AVR: Add 64-bit fixed-point divisions to libgcc
AVR targets gain 64-bit saturated fixed-point division support in libgcc.
This commit enhances the libgcc library for AVR targets by introducing 64-bit saturated fixed-point division routines. These new functions, including _udivuQ64_common and related variants, provide essential arithmetic capabilities for fixed-point computations on AVR microcontrollers. The ordinary divisions are aliased to the saturating versions, and rounding is consistently towards zero.
In Details
Adds 64-bit saturated fixed-point division routines to libgcc for AVR targets, implemented in config/avr/lib1funcs-fixed.S. These functions (__udivuta3, __usdivuta3, etc.) handle the specific arithmetic for 64-bit fixed-point numbers with saturation and rounding towards zero. Ordinary division functions are made aliases to these saturating implementations.
- libgcc
- The GCC Runtime Library, providing essential functions for C and C++ programs, such as integer division, floating-point support, and exception handling, that are not directly part of the language standard but are required by the compiler.
- fixed-point arithmetic
- A system of arithmetic where each number has the same number of digits after the decimal point. It is often used in embedded systems or performance-critical applications where floating-point hardware may be slow or absent, providing a trade-off between precision and performance.
- AVR
- A family of microcontrollers from Atmel (now Microchip Technology) commonly used in embedded systems and hobbyist projects.
- saturated arithmetic
- Arithmetic operations where the result is clamped to the maximum or minimum representable value if it exceeds the limits of the data type, rather than wrapping around.