[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(m) Re: [f-cpu] More Instruction Set Trouble



hello;

Michael Riepe wrote:
> Hi *,
> today I found another dark corner...

<snip>

> From a compiler's point of view, the loadaddr instruction is pretty
> useless except for module-local jumps and calls, and access to jump tables
> or other data that resides in the same (code) section of the same module.
> 
> Any other ideas how we can reduce/avoid the `address load penalty'?
i have one proposition : a "new" addition instruction dedicated to pointer
computation. no SIMD flag etc, but other flags for prefetch etc.

when used, the add instruction will perform the addition of two operands
and check the result in the specified TLB (instruction/data), prefetch the
lines and associate them to the specified destination register.

i think that it will do the beginning of something for us.

another thing that i have thought from your C++ example :
when doing "pointer chasing", it is useless to prefetch unless you
chase several pointers at once. in fact when there is nothing to interleave,
the prefetch instructions will induce some code bloat and a proportional
(small) slowdown. prefetch is good when a loop is sufficiently unrolled,
not when it's too tight.


>  Michael "Tired" Riepe <Michael.Riepe@stud.uni-hannover.de>
WHYGEE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/