AVR: Tweak lib1funcs-fixed.S::__mulQ64_work
AVR libgcc multiplication routine refined for signed overflow handling.
The __mulQ64_work function in GCC’s libgcc for the AVR target has been updated to refine its signed overflow handling. The patch now uses __negsi2 (non-saturating negation) for negation. Additionally, a misnamed file fx24-mul.c has been renamed to fx64-mul-1.c, and more test cases have been added to fx64-mul-2.c.
In Details
This commit modifies the AVR-specific signed 64-bit multiplication helper __mulQ64_work within libgcc. The signed overflow handling is refined by utilizing __negsi2 for negations, which is a non-saturating negation operation. This change aims for more precise signed overflow detection or behavior. The commit also includes cosmetic file renaming and test case additions for related multiplication functions.
- libgcc
- The GCC runtime library. It provides essential functions that are called by generated code, such as integer division, floating-point operations, and support for language features like exceptions and setjmp.
- AVR
- A family of microcontrollers developed by Atmel (now Microchip Technology). GCC provides a specific target backend for compiling code for AVR microcontrollers.
- __mulQ64_work
- A private helper function within libgcc, likely implementing a 64-bit integer multiplication, possibly used when hardware multiplication is not available or for specific signed/unsigned variants.
- __negsi2
- A libgcc function that performs a signed integer negation. The 'non-saturating' aspect implies it behaves like the unary minus operator, without clamping to minimum/maximum values.