SATURDAY, JULY 25, 2026
avr Performance Win
AVR: Add __negdi2_r10 to libgcc.
AVR target gets a new libgcc function for 64-bit negation to simplify existing operations.
This patch adds the __negdi2_r10 function to libgcc for the AVR target. It also tidies up some 64-bit negation operations, using the new function where applicable in __divdi3_moddi3 and __mulQ64_work. This improves the handling of 64-bit arithmetic on AVR.
In Details
The AVR target's libgcc library gains a new function __negdi2_r10 for efficient 64-bit negation. This function is then integrated into existing 64-bit arithmetic routines like __divdi3_moddi3 and __mulQ64_work to streamline their operation.
For Context
- libgcc
- GCC's runtime library, providing support functions for operations not directly handled by the target architecture's instruction set, such as integer division on some platforms, or floating-point operations.
- AVR
- A family of microcontrollers developed by Atmel (now Microchip Technology). GCC has support for generating code for these embedded systems.