This is the mail archive of the libc-alpha@sourceware.org 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: [committed] SH: Regenerate libm-test-ulps


"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


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