]> git.ipfire.org Git - thirdparty/gcc.git/commit
AVR/LibF7: target/122177 - fix fmin / fmax return value for one NaN arg.
authorGeorg-Johann Lay <avr@gjlay.de>
Sun, 5 Oct 2025 18:56:56 +0000 (20:56 +0200)
committerGeorg-Johann Lay <avr@gjlay.de>
Mon, 6 Oct 2025 15:19:59 +0000 (17:19 +0200)
commitefb3cd64fdefab88c7787b16ad33be33f4c4a2a4
treeb50609d4ed5b6a814e7caaaf9157d42378a7dc31
parente5731a4bc50e95245cb628505142e0adff0bb79e
AVR/LibF7: target/122177 - fix fmin / fmax return value for one NaN arg.

fmin and fmax should return the non-NaN argument in the case where
exactly one argument is a NaN.

Moreover, IEEE double fmin and fmax can be performed without
first converting the args to the internal representation and
then converting back again.

PR target/122177
libgcc/config/avr/libf7/
* libf7-common.mk (m_ddd): Remove: fmin, fmax.
(F7_ASM_PARTS): Add: D_fminfmax.
* libf7-asm.sx (D_fmanfmax): New module.
* f7-wraps.h: Rebuild.

gcc/testsuite/
* gcc.target/avr/fminfmax-1.c: New test.
gcc/testsuite/gcc.target/avr/fminfmax-1.c [new file with mode: 0644]
libgcc/config/avr/libf7/f7-wraps.h
libgcc/config/avr/libf7/libf7-asm.sx
libgcc/config/avr/libf7/libf7-common.mk