Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264696AbTGBE6l (ORCPT ); Wed, 2 Jul 2003 00:58:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264709AbTGBE6l (ORCPT ); Wed, 2 Jul 2003 00:58:41 -0400 Received: from air-2.osdl.org ([65.172.181.6]:59091 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S264696AbTGBE6k (ORCPT ); Wed, 2 Jul 2003 00:58:40 -0400 Date: Tue, 1 Jul 2003 22:12:48 -0700 (PDT) From: Linus Torvalds To: Bernardo Innocenti cc: Andrew Morton , , Subject: Re: [PATCH] Kill div64.h dupes, parenthesize do_div() macro params In-Reply-To: <200307020515.17722.bernie@develer.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 901 Lines: 28 On Wed, 2 Jul 2003, Bernardo Innocenti wrote: > > Wait! It's not documented at all that do_div() really does a > 64bit/32bit division with 32bit remainder. Oh, it's documented all right. It's even documented by the architectures that do it wrong (ie chris/arm26 say "we're not 64-bit but..") > What's worse, it has different semantics on different archictecures: only because some architectures on purpose get it wrong, because they don't care. > i386 64/32 -> 64q + 32r (inline asm + C for 64bit case) This is the only version that has ever been valid. It's a 64/32->64+32. No excuses, no nothing. There is no question about it. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/