This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/34473] casting negative __int128_t to float/double rounds to nearest multiple of 2048



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]