This is the mail archive of the mailing list for the glibc 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]

Re: soft-fp extensions and sNaNs

On Sat, 12 Oct 2013, David Miller wrote:

> > <> 
> Looks good.  Can you recommend how the sparc soft-fp bits might
> make use of this?

General recommendations regarding sparc soft-fp bits and my recent 

Your FP_HANDLE_EXCEPTIONS doesn't use _fcw, so FP_INIT_EXCEPTIONS can be 
defined to empty - although that doesn't really matter when you're not 
using any of the generic soft-fp .c files.  But for 64-bit your 
QP_HANDLE_EXCEPTIONS *does* use _fcw, so you can't avoid the 
initialization when QP_HANDLE_EXCEPTIONS is used.

For sparc32: in logical terms q_cmp.c, q_cmpe.c, q_feq.c, q_fge.c, 
q_fgt.c, q_fle.c, q_flt.c, q_fne.c, q_qtoi.c, q_qtoll.c, q_qtou.c, 
q_qtoull.c would use FP_INIT_EXCEPTIONS (but it would be empty, so that 
doesn't matter).  q_dtoq.c could use FP_INIT_EXCEPTIONS (or nothing) in 
place of the present FP_INIT_ROUNDMODE (since floating-point extension 
doesn't do any rounding) (q_stoq.c already uses nothing there).  q_itoq.c 
should define FP_NO_EXCEPTIONS before including soft-fp.h, then remove the 
q_lltoq.c, q_ulltoq.c, q_utoq.c.

For sparc64: I see no reason why e_ilogbl.c uses FP_DECL_EX.  qp_itoq.c 
should be able to use FP_NO_EXCEPTIONS and not need FP_DECL_EX or 
QP_NO_EXCEPTIONS.  Likewise qp_uitoq.c, qp_uxtoq.c, qp_xtoq.c.  Four other 
files define FP_ROUNDMODE to FP_RND_ZERO, but since those files are 
converting floating point to integers, which doesn't use the rounding 
mode, I think that serves no purpose.

Joseph S. Myers

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