GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
avr

AVR: Add 16-bit saturated fixed-point divisions.

AVR libgcc now supports 16-bit saturated fixed-point divisions for UHAmode and UHQQmode.

Libgcc for the AVR target has been updated to include support for 16-bit saturated fixed-point divisions, covering UHAmode and UHQQmode. The non-saturating division functions are now aliases of these new saturating functions. New test cases have been added to verify this functionality.

In Details

This commit introduces alldiv as a code iterator in avr-fixed.md for 16-bit fixed-point division instructions and expanders targeting [U]HAmode and [U]HQmode. It adds support for saturated divisions in these modes, with existing non-saturating functions becoming aliases. New test cases validate these additions.

For Context
AVR
A family of microcontrollers from Atmel (now Microchip Technology). GCC has specific backends for targeting these devices.
libgcc
The GCC helper library, providing essential functions not directly supported by the target architecture or handled by the compiler, such as integer division, exception handling, and floating-point operations.
[U]HAmode
AVR-specific machine modes representing unsigned half-accumulators, used for fixed-point arithmetic.
[U]HQmode
AVR-specific machine modes representing unsigned quarter-accumulators, used for fixed-point arithmetic.
Filed Under: avrfixed-pointlibgcc