tags 324455 patch
thanks
Hi Falk,
On Tue, Aug 23, 2005 at 10:09:56AM +0200, Falk Hueffner wrote:
> Steve Langasek <vorlon@debian.org> writes:
> > On Mon, Aug 22, 2005 at 08:56:23PM -0700, Steve Langasek wrote:
> >> Simple test case:
> >
> >> int main() {
> >>
> >> unsigned long a= 1UL << 63;
> >> unsigned long b= 1UL << 63;
> >>
> >> exit (a/b != 1);
> >> }
> >
> >> Appears to be a bug in the implementation of __divqu. Upgrading to 2.3.5-4,
> >> to confirm whether the bug still exists.
> >
> > Yep, bug still present in 2.3.5-4. Someone who speaks alpha assembly will
> > have to look at this, I think, to pinpoint the error.
> probably something like
> --- divqu.S~ 2005-07-09 21:55:07.000000000 +0200
> +++ divqu.S 2005-08-23 10:04:09.000000000 +0200
> @@ -240,7 +240,7 @@
> /* If we get here, Y is so big that bit 63 is set. The results
> from the divide will be completely wrong. Fortunately, the
> quotient must be either 0 or 1, so just compute it directly. */
> - cmpult Y, X, RV
> + cmpule Y, X, RV
> excb
> mt_fpcr $f3
> ldt $f0, 0(sp)
> but I don't have time for testing.
Thanks, after looking at the diff between divq.S and divqu.S and doing a
little googling (aka, "the Babelfish methodology for learning assembly"),
I came to the same conclusion, and my test build of glibc just finished up
-- this one-liner does indeed fix the problem.
Cheers,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
vorlon@debian.org http://www.debian.org/
Attachment:
signature.asc
Description: Digital signature