From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261601AbUJ2Tjb (ORCPT ); Fri, 29 Oct 2004 15:39:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261446AbUJ2Tin (ORCPT ); Fri, 29 Oct 2004 15:38:43 -0400 Received: from hermes.domdv.de ([193.102.202.1]:53516 "EHLO hermes.domdv.de") by vger.kernel.org with ESMTP id S261573AbUJ2S6T (ORCPT ); Fri, 29 Oct 2004 14:58:19 -0400 Message-ID: <418292C7.2090707@domdv.de> Date: Fri, 29 Oct 2004 20:58:15 +0200 From: Andreas Steinmetz User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040918 X-Accept-Language: en-us, en, de MIME-Version: 1.0 To: Linus Torvalds CC: linux-os@analogic.com, Kernel Mailing List , Richard Henderson , Andi Kleen , Andrew Morton , Jan Hubicka Subject: Re: Semaphore assembly-code bug References: <417550FB.8020404@drdos.com> <1098218286.8675.82.camel@mentorng.gurulabs.com> <41757478.4090402@drdos.com> <20041020034524.GD10638@michonline.com> <1098245904.23628.84.camel@krustophenia.net> <1098247307.23628.91.camel@krustophenia.net> <41826A7E.6020801@domdv.de> In-Reply-To: X-Enigmail-Version: 0.86.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds wrote: > Somebody should check what the Pentium M does. It might just notice that > "lea 4(%esp),%esp" is the same as "add 4 to esp", but it's entirely > possible that lea will confuse its stack engine logic and cause > stack-related address generation stalls.. Now especially Intel tells everybody in their Pentium Optimization manuals to *use* lea whereever possible as this operation doesn't depend on the ALU and is processed in other parts of the CPU. Sample quote from said manual (P/N 248966-05): "Use the lea instruction and the full range of addressing modes to do address calculation" I would guess Intel would add caveats about such stalls in this manual if there would be any. -- Andreas Steinmetz SPAMmers use robotrap@domdv.de