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: [PATCH 3/4 v2] [SH/SH4]: Set fpcsr register which read again


Hi!

On Thu, 24 May 2012 08:43:04 +0900, Nobuhiro Iwamatsu <iwamatsu@nigauri.org> wrote:
> 2012/5/23 Kaz Kojima <kkojima@rr.iij4u.or.jp>:
> > Thomas Schwinge <thomas@codesourcery.com> wrote:
> >>> + Â/* When read fpscr, this was initialized.
> >>> + Â Â We need to rewrite value of temp. */
> >>> + Â_FPU_SETCW (temp);
> >>>
> >>> Â Âreturn temp & excepts & FE_ALL_EXCEPT;
> >>> Â}
> >>
> >> Why is this needed? ÂIt seems that I can't find it neither in the SH-4A
> >> Software Manual nor in the SH7785 Hardware Manual.
> >
> > I thought that there was an errata for the issue, though I can't
> > find the corresponding documentation ATM. ÂIwamatsu-san?

> When fetestexcept was called, the problem from which the information
> on fpscr is deleted occurred.
> To be sure, it is not writing to the manual.
> I checked this problem using the Linux kernel.
> I think that it may be a problem by the side of a Linux kernel...

I see.  Will you be working on resolving that?  Because, currently the
state is inconsistent: sometimes fpscr is reloaded, sometimes not
(ftestexcept, as well as (potentially) all generic uses of _FPU_GETCW
outside of our control).

If there indeed is an erratum regarding this, how about we directly add
an _FPU_SETCW call to the _FPU_GETCW macro?  This will be redundant for
most cases (when a different value is stored afterwards), but will at
least cover all usage of _FPU_GETCW.  But I'd rather prefer to first
clarify why/where this is really needed.  (Based on glibc's test suite,
it is not needed for our SH7785 board; makes no difference when reverting
your patch.)


GrÃÃe,
 Thomas

Attachment: pgp00000.pgp
Description: PGP signature


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