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: kkojima at rr dot iij4u dot or dot jp
- To: joseph at codesourcery dot com
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 27 Jan 2014 10:47:41 +0900 (JST)
- 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> <Pine dot LNX dot 4 dot 64 dot 1401270106380 dot 27196 at digraph dot polyomino dot org dot uk>
"Joseph S. Myers" <joseph@codesourcery.com> wrote:
> 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?)
Yes, it's default on the current gcc. The problem doesn't occur
when building libc on my cross environment. The problem is that
I've run "make regen-ulps" on my SH native environment to run tests
with its old system gcc and -mieee isn't default for that compiler.
>> 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.
SH4 FPU has known issues with subnormals and some of them are handled
with kernel emulations. Perhaps there are yet another latent issues.
> 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).
Sure. Thanks for your suggestions.
Regards,
kaz