Commit [7fccd3] Maximize Restore History

Micro-optimization: Avoid byte register writes on x86-64 in LOAD-TYPE.

The optimization guide for AMD's x86-64 processors recommends not
to write a partial register but instead to use MOVZX to write the
corresponding 32/64-bit register. Otherwise the instruction would have
an unnecessary dependency on the most recent write to the register,
reducing the available instruction level parallelism. On Intel's
processors this is not necessary but doesn't hurt.

To follow this recommendation, modify LOAD-TYPE to use MOVZX instead of
a byte MOV and adapt the VOPs that call it: FUN-SUBTYPE, SET-FDEFN-FUN,
and WIDETAG-OF. This additionally spares a temporary register in
FUN-SUBTYPE and allows to shorten all paths through WIDETAG-OF by one
instruction.

The effect on code size is small and mixed.

Lutz Euler Lutz Euler 2012-06-08

changed src/compiler/x86-64/cell.lisp
changed src/compiler/x86-64/macros.lisp
changed src/compiler/x86-64/system.lisp
src/compiler/x86-64/cell.lisp Diff Switch to side-by-side view
Loading...
src/compiler/x86-64/macros.lisp Diff Switch to side-by-side view
Loading...
src/compiler/x86-64/system.lisp Diff Switch to side-by-side view
Loading...