This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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 v4 1/5] sim: cgen: add remainder functions (needed for OR1K lf.rem.[sd])


On Fri, Sep 01, 2017 at 09:56:54AM +0200, Simon Marchi wrote:
> On 2017-09-01 00:33, Stafford Horne wrote:
> > > I can't tell for sure because I'm not maintainer of sim/, but I
> > > suppose that
> > > we would need a proper implementation that doesn't use the host fpu
> > > here.
> > 
> > Right, as mentioned in the summary, this is the one place that is a bit
> > controversial.
> > 
> > I was thinking its kind of strange to not allow using libmath, since
> > integer math runs on the host system, why not FPU as well?
> > (probably to implement this I would just copy from libmath in the end:)
> 
> That was just my conclusion after reading the comment in sim-fpu.h:
> 
> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=sim/common/sim-fpu.h;h=d27d80a513aa8d996a7b4c6af53fde31dcb8dad7;hb=HEAD#l54
> 
> It is easy for floating point unit implementations to return wrong or
> slightly different results.  Integer math is more consistent.
> 
> > https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=sysdeps/ieee754/dbl-64/e_remainder.c;hb=HEAD
> > 
> > There are actually no OpenRISC cores that implement the remainder
> > instruction (as its a bit complicated to do in hardware and not really
> > used
> > much). I could remove it if the implementation is beyond the scope of
> > this
> > series.
> 
> Indeed, it can always be contributed later.

Right, I think thats the easiest route.  Ill resubmit the series in a few
days after I receive other comments from you.

-Stafford


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