From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21465 invoked by alias); 10 Dec 2001 17:09:01 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 21267 invoked from network); 10 Dec 2001 17:07:42 -0000 Received: from unknown (HELO ns.caldera.de) (212.34.180.1) by sources.redhat.com with SMTP; 10 Dec 2001 17:07:42 -0000 Received: (from hch@localhost) by ns.caldera.de (8.11.1/8.11.1) id fBAH79J10372; Mon, 10 Dec 2001 18:07:09 +0100 Date: Mon, 10 Dec 2001 09:09:00 -0000 From: Christoph Hellwig To: Corey Minyard Cc: gcc@gcc.gnu.org Subject: Re: Optimizations on long long multiply/divide on PowerPC32 don't work Message-ID: <20011210180709.A10139@caldera.de> References: <3C115A53.2070206@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3C115A53.2070206@acm.org>; from minyard@acm.org on Fri, Dec 07, 2001 at 06:09:55PM -0600 X-SW-Source: 2001-12/txt/msg00503.txt.bz2 On Fri, Dec 07, 2001 at 06:09:55PM -0600, Corey Minyard wrote: > I can see four options to solve this problem: > > 1) Add __divdi3 to the linux kernel. I don't really think this is a > good idea, and it shouldn't be required. > 2) Move the conversion of the division to the function call to the > very last stages of the compiler. IMHO, this is probably the best > option, but it's a big job to implement, I think. > 3) Make the optimizations understand the function calls. I don't even > want to think about this one. > 4) Modify the tree conversions to do the optimizations there. I have > a patch that does this (and passes all regressions), because it was > easy, but I consider it less optimal than option 2. Fix that code to use shifts instead. As far as I can see that's general linux kernel practice. Christoph -- Of course it doesn't work. We've performed a software upgrade.