AVR GCC adds 64-bit fixed point to double-precision conversions.
GCC for AVR now includes new functions to convert between 64-bit fixed-point numbers and 64-bit double-precision floating-point numbers.
This commit significantly enhances the AVR backend of GCC by introducing comprehensive support for conversions between 64-bit fixed-point numbers and 64-bit double-precision floating-point numbers. New _DEFUNs like ufx64_to_d and d_to_fx64 are added to the libf7-asm.sx and libf7.c files, alongside updates to the build system and header files. This expansion in data type conversion capabilities allows AVR developers to perform more complex and precise numeric computations involving these large-precision formats, which is crucial for applications requiring high accuracy, potentially impacting embedded signal processing or control systems.
In Details
This change introduces new _DEFUNs in libf7-asm.sx and libf7.c to handle conversions between 64-bit fixed-point types (e.g., _Fract or _Accum variants) and double (64-bit IEEE 754 floating-point) for the AVR target. This involves both assembly (ufx64_to_d, d_to_fx64) and C-based implementations for various fractional and accumulation types (__fractdadf, __fractdfudq). The updates to libf7-common.mk and f7-renames.h integrate these new conversion routines into the libf7 library, providing a complete software implementation for these extended precision conversions on r…
For Context
Computers represent numbers in different ways, like whole numbers (integers), numbers with decimal points (floating-point), and a less common type called \"fixed-point\" which is useful in embedded systems. This update to GCC for AVR microcontrollers adds new capabilities to convert between very precise fixed-point numbers (64-bit) and very precise decimal numbers (64-bit double-precision floating-point). This means programmers working with AVR chips can now more easily switch between these different number formats for calculations. This can be critical for applications that need high mathematical accuracy, such as certain types of sensor readings or control algorithms in embedded devices.