Micro-optimize machine code for some register tests on x86[-64].
authorLutz Euler <lutz.euler@freenet.de>
Tue, 17 Apr 2012 18:52:09 +0000 (20:52 +0200)
committerLutz Euler <lutz.euler@freenet.de>
Tue, 17 Apr 2012 18:52:09 +0000 (20:52 +0200)
commit37b93fe46f304244d1c69c06b82a22252e393630
tree0c99c71a730fc984ebdafbee30f11a778a358ef4
parent8deb4b7ca12aff6955d9cf3fc4de8fd688d3a773
Micro-optimize machine code for some register tests on x86[-64].

Replace all occurrences of (INST OR REG REG) with (INST TEST REG REG)
in VOPs and assembly routines. This removes, for the next read of REG,
the dependency on this instruction, allowing more instruction-level
parallelism, so is potentially faster. Moreover, most of the time the
next instruction is a conditional branch, which allows processors that
support macro-op fusion to fuse the TEST (but not the OR) with this
branch instruction, reducing the resources needed to decode and execute
the two instructions, which again is potentially faster.
src/assembly/x86-64/alloc.lisp
src/assembly/x86-64/assem-rtns.lisp
src/assembly/x86/alloc.lisp
src/assembly/x86/assem-rtns.lisp
src/compiler/x86-64/arith.lisp
src/compiler/x86-64/cell.lisp
src/compiler/x86-64/type-vops.lisp
src/compiler/x86/arith.lisp
src/compiler/x86/cell.lisp
src/compiler/x86/type-vops.lisp