Re: [patch] entry.S asm improvement (removed some ugly jmp)

Kurt Garloff (garloff@kg1.ping.de)
Sat, 28 Nov 1998 01:16:15 +0100


On Sat, Nov 28, 1998 at 12:53:26AM +0100, Andrea Arcangeli wrote:
> On Sat, 28 Nov 1998, Kurt Garloff wrote:
>
> >What you might be missing is that we might be deep inside some calls. The
>
> Where can I study CPU branch prediction algorithms (eventually Intel' s
> one)?
>
> Andrea Arcangeli

This is from memory, so if you got to exchange some org with com don't flame
me.

* www.sandpile.org has a lot of docu about CPUs.
* On the Pentium gcc (www.goof.com/pcg/) pages are references to optimization
techniques used on different CPUs.
* CPU manufacturers have some optimization info on their CPUs. At least AMD
has. (www.amd.com/K6/K6docs/ ?)

here's a statement from "AMD K6(R)-2 Processor Code Optimization Application
Note", chapter 5 (p.60): (section: General K6 Processor x86 Coding
Optimizations)

Always pair CALL and RETURN
---------------------------
If CALLs and RETs are not paired, the return address stack gets out of
synchronization, increasing the latency of returns and decreasing
performance.

Hope this helps.

-- 
Kurt Garloff <K.Garloff@ping.de>  (Dortmund, FRG)
PGP key on http://student.physik.uni-dortmund.de/homepages/garloff

Microsoft is not the answer. Microsoft is the question. The answer is no.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/