Re: [PATCH] Fix remainder calculating bug in single floating point division

2008-01-09 Thread David Gibson
On Wed, Jan 09, 2008 at 09:24:07AM +0800, Liu Yu wrote: > > > > > can you provide the test case that shows the error. > > > > It seems that math-emu only be used for MPC8xx on current kernel. It can be used for IBM/AMCC 4xx too. -- David Gibson| I'll have my music baroque

RE: [PATCH] Fix remainder calculating bug in single floating point division

2008-01-08 Thread Liu Yu
> > can you provide the test case that shows the error. > It seems that math-emu only be used for MPC8xx on current kernel. --- #include #include #include #include void fdiv(float f, float f1, float expected) { float f2; f2 = f / f1; printf("fdiv %e / %e = %e expected %e %s

Re: [PATCH] Fix remainder calculating bug in single floating point division

2008-01-07 Thread Kumar Gala
On Jan 6, 2008, at 8:26 AM, Liu Yu wrote: > This bug exists in the emulation of floating point division for > powerpc. > > The original code cannot count the remainder correctly. > I can provide a test case to trigger this bug. > When use fdiv to count 1.1754941e-38f / 0.999f, > the result

Re: [PATCH] Fix remainder calculating bug in single floating point division

2008-01-07 Thread Kumar Gala
On Jan 6, 2008, at 2:44 PM, Dan Malek wrote: > > On Jan 6, 2008, at 12:07 PM, Benjamin Herrenschmidt wrote: > >> It's nice to see somebody digging in that scary math emu stuff. If >> you >> could also get rid of the warnings, it would be perfect :-) > > Yes, it is :-) I didn't think it would h

Re: [PATCH] Fix remainder calculating bug in single floating point division

2008-01-06 Thread Josh Boyer
On Mon, 07 Jan 2008 07:49:33 +1100 Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > > On Sun, 2008-01-06 at 12:44 -0800, Dan Malek wrote: > > While it's convenient, I still don't think kernel float > > emulation should be a solution. The tools should > > generate soft-float for the applicatio

Re: [PATCH] Fix remainder calculating bug in single floating point division

2008-01-06 Thread Dan Malek
On Jan 6, 2008, at 12:07 PM, Benjamin Herrenschmidt wrote: > It's nice to see somebody digging in that scary math emu stuff. If you > could also get rid of the warnings, it would be perfect :-) Yes, it is :-) I didn't think it would have a life beyond MPC8xx. > that this code was lifted f

Re: [PATCH] Fix remainder calculating bug in single floating point division

2008-01-06 Thread Benjamin Herrenschmidt
On Sun, 2008-01-06 at 12:44 -0800, Dan Malek wrote: > While it's convenient, I still don't think kernel float > emulation should be a solution. The tools should > generate soft-float for the applications and libraries. I agree, for deployement, it's definitely not a solution, though it's very co

Re: [PATCH] Fix remainder calculating bug in single floating point division

2008-01-06 Thread Benjamin Herrenschmidt
On Sun, 2008-01-06 at 22:26 +0800, Liu Yu wrote: > This bug exists in the emulation of floating point division for powerpc. > > The original code cannot count the remainder correctly. > I can provide a test case to trigger this bug. > When use fdiv to count 1.1754941e-38f / 0.999f, > the r