Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264797AbTGBGsA (ORCPT ); Wed, 2 Jul 2003 02:48:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264786AbTGBGsA (ORCPT ); Wed, 2 Jul 2003 02:48:00 -0400 Received: from adsl-110-19.38-151.net24.it ([151.38.19.110]:46568 "HELO develer.com") by vger.kernel.org with SMTP id S264797AbTGBGr7 (ORCPT ); Wed, 2 Jul 2003 02:47:59 -0400 From: Bernardo Innocenti Organization: Develer To: Linus Torvalds , Andrew Morton Subject: Re: [PATCH] Kill div64.h dupes, parenthesize do_div() macro params Date: Wed, 2 Jul 2003 09:02:05 +0200 User-Agent: KMail/1.5.9 Cc: , References: In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200307020902.05522.bernie@develer.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1028 Lines: 27 On Wednesday 02 July 2003 07:09, Linus Torvalds wrote: > > Why 64-bit divides in particular were victimised in this manner is a > > matter for speculation ;) > > Because gcc historically _cannot_ generate an efficient 64/32->64 > divide. It ends up doing a full 64/64 divide thing. You're right here. I've been too quick in putting my faith in gcc ;-) Shouldn't we complain to the gcc people? The 64/32 division is a rather common operation in many applications besides the kernel, so you'd expect gcc to get it right without polluting every single project with reimplementations of do_div(). -- // Bernardo Innocenti - Develer S.r.l., R&D dept. \X/ http://www.develer.com/ Please don't send Word attachments - http://www.gnu.org/philosophy/no-word-attachments.html - 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/