[lkml]   [2004]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Semaphore assembly-code bug

    On Fri, 29 Oct 2004, Andreas Steinmetz wrote:

    > 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"

    Does it say this about %esp?

    The stack pointer is SPECIAL, guys. It's special exactly because there is
    potentially extra hardware in CPU's that track its value _independently_
    of the actual physical register.

    Just for fun, google for 'x86 "stack engine"', and you'll hit for example which talks
    about this and perhaps explains it in ways that I apparently haven't been
    able to.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2009-11-18 23:46    [W:0.030 / U:4.240 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site