diff options
author | Georg-Johann Lay <avr@gjlay.de> | 2022-09-19 09:46:58 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2022-09-19 09:50:28 +0200 |
commit | 0b5b8ac5cb7fe92dd17ae8bd7de84640daa59e84 (patch) | |
tree | 0254c2d699754101110a5fff6ea0b5052b4da96c /gcc | |
parent | 0990a778376b63b789a8ff5aa949325ba375c025 (diff) | |
download | gcc-0b5b8ac5cb7fe92dd17ae8bd7de84640daa59e84.zip gcc-0b5b8ac5cb7fe92dd17ae8bd7de84640daa59e84.tar.gz gcc-0b5b8ac5cb7fe92dd17ae8bd7de84640daa59e84.tar.bz2 |
Fix PR target/99184: Wrong cast from double to 16-bit and 32-bit ints
this patch fixed PR target/99184 which incorrectly rounded during 64-bit
(long) double to 16-bit and 32-bit integers.
The patch just removes the respective roundings from
libf7-asm.sx::to_integer and ::to_unsigned. Luckily, LibF7 does nowhere
use respective functions internally, the only user is in libf7.c::f7_exp
which reads
f7_round (qq, qq);
int16_t q = f7_get_s16 (qq);
so that f7_get_s16() operates on an already rounded value, and therefore
this code works unaltered with or without rounding in to_integer.
PR target/99184
libgcc/config/avr/libf7/
* libf7-asm.sx (to_integer, to_unsigned): Don't round 16-bit
and 32-bit integers.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions