lkml.org 
[lkml]   [2004]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: 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/

    \
     
     \ /
      Last update: 2005-03-22 14:07    [W:0.032 / U:60.060 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site