mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Matti Aarnio <matti.aarnio@zmailer.org>
Cc: Rogier Wolff <Swen-Trap1@BitWizard.nl>,
	Artur Klauser <Artur.Klauser@computer.org>,
	linux-kernel@vger.kernel.org
Subject: Re: div64.h:do_div() bug
Date: Tue, 30 Sep 2003 14:30:40 +0200	[thread overview]
Message-ID: <je8yo6e9vz.fsf@sykes.suse.de> (raw)
In-Reply-To: <20030930112830.GK1058@mea-ext.zmailer.org> (Matti Aarnio's message of "Tue, 30 Sep 2003 14:28:30 +0300")

Matti Aarnio <matti.aarnio@zmailer.org> writes:

> On Tue, Sep 30, 2003 at 01:14:38PM +0300, Matti Aarnio wrote:
>> On Tue, Sep 30, 2003 at 11:52:29AM +0200, Rogier Wolff wrote:
>> > On Mon, Sep 29, 2003 at 03:25:19PM +0200, Artur Klauser wrote:
>> > > I've found that a bug in asm-arm/div64.h:do_div() is preventing correct
>> > > conversion of timestamps in smbfs (and probably ntfs as well) from NT to
>> > 
>> > Nope. 
>> 
>>   Nope yourself.
>> 
>> > >   if (in.n64 != out.n64) {
>> > >     printf("FAILURE: asm/div64.h:do_div() is broken for 64-bit dividends\n");
>> > 
>> > do_div should be/is documented as not doing 64 bit dividents. It does
>> > 64/32 -> 32 divides, IIRC... 
>> 
>>   64/32 -> 64,32
>> 
>> The REMAINDER is 32 bit value.
>
> Non-native english speaker makes the mistake..  MODULUS is 32 bits as is
> DIVISOR, REMAINDER is 64 bit, as is DIVIDEND.
>
> That is:
> 	DIVIDEND / DIVISOR -> REMAINDER , MODULUS
                              ^^^^^^^^^^^^^^^^^^^
???
                              QUOTIENT, REMAINDER

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  reply	other threads:[~2003-09-30 12:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-29 13:25 Artur Klauser
2003-09-29 14:18 ` Matti Aarnio
2003-09-30  9:52 ` Rogier Wolff
2003-09-30 10:14   ` Matti Aarnio
2003-09-30 11:28     ` Matti Aarnio
2003-09-30 12:30       ` Andreas Schwab [this message]
2003-09-30 12:41         ` Artur Klauser
2003-09-30 12:53 ` div64.h:do_div() bug - SPARC, SH anbody? Artur Klauser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=je8yo6e9vz.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=Artur.Klauser@computer.org \
    --cc=Swen-Trap1@BitWizard.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matti.aarnio@zmailer.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®