public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/99184] [avr] wrong double to 16-Bit and 32-Bit integers in libgcc/libf7 Date: Mon, 19 Sep 2022 07:52:27 +0000 [thread overview] Message-ID: <bug-99184-4-7MyAsyS8Bt@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-99184-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99184 --- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Richard Biener <rguenth@gcc.gnu.org>: https://gcc.gnu.org/g:57896e8cddd2eb952145fa32ca25635fd63246b4 commit r12-8773-g57896e8cddd2eb952145fa32ca25635fd63246b4 Author: Georg-Johann Lay <avr@gjlay.de> Date: Mon Sep 19 09:46:58 2022 +0200 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. (cherry picked from commit 0b5b8ac5cb7fe92dd17ae8bd7de84640daa59e84)
next prev parent reply other threads:[~2022-09-19 7:52 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-20 22:40 [Bug target/99184] New: " avr at gjlay dot de 2022-09-18 16:53 ` [Bug target/99184] " gjl at gcc dot gnu.org 2022-09-19 7:50 ` cvs-commit at gcc dot gnu.org 2022-09-19 7:52 ` cvs-commit at gcc dot gnu.org [this message] 2022-09-19 7:52 ` cvs-commit at gcc dot gnu.org 2022-09-19 7:53 ` cvs-commit at gcc dot gnu.org 2022-09-19 7:54 ` rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-99184-4-7MyAsyS8Bt@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).