From: Stas Boukarev Date: Wed, 4 Sep 2013 09:30:17 +0000 (+0400) Subject: Micro-optimize calling alloc_tramp on x86_64. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=aa7b669779e8e88349938ca962229f31ead08af2;p=sbcl.git Micro-optimize calling alloc_tramp on x86_64. In allocation-tramp, instead of using R11 temp-reg for storing the address of alloc_tramp, use alloc-tn, because the result of alloc_tramp will be stored there and its value doesn't have to be preserved. And most of the time it will be allocated to a non-64-bit-mode register, allowing to save 2 bytes on encoding. --- diff --git a/src/compiler/x86-64/macros.lisp b/src/compiler/x86-64/macros.lisp index fe896aa..781a270 100644 --- a/src/compiler/x86-64/macros.lisp +++ b/src/compiler/x86-64/macros.lisp @@ -168,8 +168,8 @@ ;;; object. (defun allocation-tramp (alloc-tn size lowtag) (inst push size) - (inst mov temp-reg-tn (make-fixup "alloc_tramp" :foreign)) - (inst call temp-reg-tn) + (inst mov alloc-tn (make-fixup "alloc_tramp" :foreign)) + (inst call alloc-tn) (inst pop alloc-tn) (when lowtag (inst lea alloc-tn (make-ea :byte :base alloc-tn :disp lowtag)))