Messages in this thread | | | Date | Fri, 29 Oct 2004 20:58:15 +0200 | From | Andreas Steinmetz <> | Subject | Re: Semaphore assembly-code bug |
| |
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 - 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/
| |