This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/34473] casting negative __int128_t to float/double rounds to nearest multiple of 2048
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Dec 2007 16:02:09 -0000
- Subject: [Bug target/34473] casting negative __int128_t to float/double rounds to nearest multiple of 2048
- References: <bug-34473-15524@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from ubizjak at gmail dot com 2007-12-16 16:02 -------
>From libgcc2.c, __floatdisf():
/* Protect against double-rounding error.
Represent any low-order bits, that might be truncated by a bit that
won't be lost. The bit can go in anywhere below the rounding position
of the SFmode. A fixed mask and bit position handles all usual
configurations. It doesn't handle the case of 128-bit DImode, however.
*/
Please note that "di" in fact represents TImode for 64bit x86_64. I guess that
__floatdidf() also can't handle 128bit DImode values properly.
This works OK for 4.3.0, beacuse 4.3 branch implements 128bit TFmode floating
point mode and _floatdi{s,d}f function is changed to use this mode.
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Known to work| |4.3.0
Resolution| |WONTFIX
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34473