Steve Langasek <[EMAIL PROTECTED]> 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. -- Falk -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]