From 03e8baab974e52e86df105ee269e83efd65e3d8e Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Sun, 5 May 2013 02:54:51 +0400 Subject: [PATCH] Micro-optimize values-list. Compare a register with nil-value directly, without going through a temporary register. --- src/compiler/x86-64/values.lisp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/compiler/x86-64/values.lisp b/src/compiler/x86-64/values.lisp index 658815f..bea46f9 100644 --- a/src/compiler/x86-64/values.lisp +++ b/src/compiler/x86-64/values.lisp @@ -75,17 +75,15 @@ (:results (start :scs (any-reg)) (count :scs (any-reg))) (:temporary (:sc descriptor-reg :from (:argument 0) :to (:result 1)) list) - (:temporary (:sc descriptor-reg :to (:result 1)) nil-temp) (:temporary (:sc dword-reg :offset eax-offset :to (:result 1)) eax) (:vop-var vop) (:save-p :compute-only) (:generator 0 (move list arg) (move start rsp-tn) ; WARN pointing 1 below - (inst mov nil-temp nil-value) LOOP - (inst cmp list nil-temp) + (inst cmp list nil-value) (inst jmp :e DONE) (pushw list cons-car-slot list-pointer-lowtag) (loadw list list cons-cdr-slot list-pointer-lowtag) -- 1.7.10.4