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 #4 from joseph at codesourcery dot com  2007-12-16 16:44 -------
Subject: Re:  casting negative __int128_t to float/double
 rounds to nearest multiple of 2048

On Sun, 16 Dec 2007, ubizjak at gmail dot com wrote:

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

I think the fix was actually

2005-12-15  Joseph S. Myers  <joseph@codesourcery.com>

        PR other/25028
        * libgcc2.h (SF_SIZE, DF_SIZE, XF_SIZE, TF_SIZE): Define.
        * libgcc2.c (__floatdixf, __floatundixf, __floatditf,
        __floatunditf): Use #error if type sizes don't match requirements
        of implementation.
        (__floatdisf, __floatdidf): Unify.  Possibly use XFmode or TFmode
        as wider floating-point type.  Use #error if type sizes don't
        match requirements of implementation.  Avoid overflow in computing
        Wtype_MAXp1_F * Wtype_MAXp1_F.  When special casing conversion,
        shift one more bit.  Cast 1 to DWtype or UDWtype for shifting.
        (__floatundisf, __floatundidf): Likewise.
        * config/ia64/hpux.h (XF_SIZE, TF_SIZE): Define.
        * config/ia64/ia64.c (ia64_init_libfuncs): Use
        _U_Qfcnvfxt_quad_to_quad and _U_Qfcnvxf_quad_to_quad for
        TFmode-TImode conversions.
        * doc/tm.texi (SF_SIZE, DF_SIZE, XF_SIZE, TF_SIZE): Document.

(which is in 4.2) and that this is a duplicate of that bug.  If software 
TFmode is being used internally in conversions for narrower modes, that's 
a bug caused by x86_64 not defining WIDEST_HARDWARE_FP_SIZE.


-- 


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]