NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-alpha/52520: Wrong double to uint64_t conversion

The following reply was made to PR port-alpha/52520; it has been noted by GNATS.

Subject: Re: port-alpha/52520: Wrong double to uint64_t conversion
Date: Sun, 3 Sep 2017 09:56:57 +0000

 As I understand it, the reason for emulating alpha is its inability to
 handle inf and subnormals.
 All valid results of double-to-int conversions aren't inf or subnormals.
 I'm strongly inclined to believe cvttq does the right thing calculating
 the numerical result for valid inputs by itself, so doesn't need
 amendment. but perhaps we still need to set some status flag, and of
 course - not SIGFPE.
 Side notes:
 - GCC generates code with 'cvttq' even without -mieee, rather than
   cvtgq. so IEEE may be the default anyway.
 - cvttq (IEEE T_floating to quadword) and cvtgq (vax G_float to quadword)
   share an emulation function, cvt_gq_tq. But they don't share a format!
   we probably shouldn't attempt to emulate any VAX float, but I haven't
   put much thought into this. As I understand it, Alpha implements vax
   float correctly unassisted.

Home | Main Index | Thread Index | Old Index