Keith Packard ab6bb1bab6
compiler-rt/arm: Check for overflow when adding float denorms (#185245)
When the sum of two sub-normal values is not also subnormal, we need to
set the exponent to one.

Test case:

static volatile float x = 0x1.362b4p-127;
static volatile float x2 = 0x1.362b4p-127 * 2;

int
main (void)
{
	printf("x %a x2 %a x + x %a\n", x, x2, x + x);
	return x2 == x + x ? 0 : 1;
}

Signed-off-by: Keith Packard <keithp@keithp.com>
2026-03-12 10:37:48 +00:00
..

Compiler-RT
================================

This directory and its subdirectories contain source code for the compiler
support routines.

Compiler-RT is open source software. You may freely distribute it under the
terms of the license agreement found in LICENSE.txt.

================================