This is the mail archive of the
mailing list for the glibc project.
Re: soft-fp extensions and sNaNs
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: David Miller <davem at davemloft dot net>
- Cc: <libc-alpha at sourceware dot org>
- Date: Sat, 12 Oct 2013 12:43:01 +0000
- Subject: Re: soft-fp extensions and sNaNs
- Authentication-results: sourceware.org; auth=none
- References: <20131011 dot 182333 dot 1273745639469124926 dot davem at davemloft dot net> <Pine dot LNX dot 4 dot 64 dot 1310112312070 dot 5638 at digraph dot polyomino dot org dot uk> <20131012 dot 005540 dot 1182887248646393606 dot davem at davemloft dot net>
On Sat, 12 Oct 2013, David Miller wrote:
> > <https://sourceware.org/ml/libc-alpha/2013-10/msg00393.html>
> 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
FP_DECL_EX, FP_CLEAR_EXCEPTIONS and FP_HANDLE_EXCEPTIONS; likewise
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