Micro-optimization: Shorter encoding of MOVZX in more cases on x86-64
authorLutz Euler <lutz.euler@freenet.de>
Tue, 17 Apr 2012 17:42:54 +0000 (19:42 +0200)
committerLutz Euler <lutz.euler@freenet.de>
Tue, 17 Apr 2012 17:42:54 +0000 (19:42 +0200)
commit8deb4b7ca12aff6955d9cf3fc4de8fd688d3a773
tree06b453203941ec8bd9ae6c12d74b646adefc5560
parent8105eb908700dfc868cfc00d106981845d954594
Micro-optimization: Shorter encoding of MOVZX in more cases on x86-64

The assembler instruction MOVZX is already assembled as a straight
32-bit MOV when it is used to zero-extend a 32-bit source into a 64-bit
register, taking advantage of the processor's implicit zero extension,
sparing the REX prefix (if it was only needed to indicate the 64-bit
size) and thus reducing code size. Towards the same goal, change
zero-extensions of 8- or 16-bit sources into a 64-bit register to use
the corresponding 32-bit register as the destination instead, in the
process refactoring EMIT-MOVE-WITH-EXTENSION for more OAOO-ness.
src/compiler/x86-64/insts.lisp