[CST-2] Comp.arch 1997 p7 q3
Martin Harper
mcnh2@cam.ac.uk
Thu, 31 May 2001 23:14:55 +0100
Andrei Legostaev wrote:
> http://www.cl.cam.ac.uk/tripos/y1997p7q3.pdf
>
> Last paragraph: "What special instruction set features or compiler
> optimisations might be used to reduce the overhead of sub-word accesses".
>
> There is only a reference to these "features" in the slides, no details.
> Presumably there is more in the Additional Material handout. Could somebody
> please point me to the right page or just tell me the answer?
>
> :-)
>
> Thanks in advance!
Compiler optimisations: padding to remove them. This might be
cheating... ;-)
The following: loop i, doing { a[i] = b[i] XOR c[i] }, where a, b, c are
(possibly unaligned) arrays of unpadded bytes, and i is large; can be
optimised by rewriting it to do word loads, stores, XORs, and dealing
with the stuff at the start and the end of the loop specially {but
probably still by doing word-sized reads and writes, depending on the ISA}
Obviously there are similar rewrites that can be used on other pieces of
code.
Special instruction features I'm not sure of. Does this perhaps refer to
Load Word Right(LWR) and the like?
Martin