This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [committed] SH: Regenerate libm-test-ulps
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: <kkojima at rr dot iij4u dot or dot jp>
- Cc: <libc-alpha at sourceware dot org>
- Date: Mon, 27 Jan 2014 01:16:54 +0000
- Subject: Re: [committed] SH: Regenerate libm-test-ulps
- Authentication-results: sourceware.org; auth=none
- References: <20140127 dot 085632 dot 341813701 dot kkojima at rr dot iij4u dot or dot jp>
On Mon, 27 Jan 2014, kkojima@rr.iij4u.or.jp wrote:
> Hi,
>
> It turned out that I've produced a bogus ulps without -mieee SH gcc
> option which is required for proper IEEE arithmetic on this target.
> I've committed the updated libm-test-ulps with enabling -mieee.
If -mieee is needed for IEEE arithmetic, then sysdeps/sh/sh4/Makefile
needs to do
sysdep-CFLAGS += -mieee
or similar, much like ports/sysdeps/alpha/Makefile does. It shouldn't
rely on the user passing special options when building glibc, glibc should
use the right options automatically.
(But I notice
/* If the -mieee option was not explicitly set by the user, turn it on
unless -ffinite-math-only was specified. See also PR 33135. */
if (! global_options_set.x_TARGET_IEEE)
TARGET_IEEE = ! flag_finite_math_only;
in GCC, suggesting this should be the default - is it not working for some
reason?)
> Although it looks that the issues for fma went away, there are
> new fma_towardzero lines. I'll update Bug 16503 with that result.
> I'd like to look into those *_towardzero cases.
Those all seem to involve subnormals, so I suspect some problem with those
somewhere.
Incidentally, I notice that SH4 has an fmac instruction (single-precision
only) - if it is indeed a fused operation, it might make sense to use it
to implement fmaf for sh/sh4/fpu (once the other problems are fixed - this
is of course just an optimization).
--
Joseph S. Myers
joseph@codesourcery.com