From aa7b669779e8e88349938ca962229f31ead08af2 Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Wed, 4 Sep 2013 13:30:17 +0400 Subject: [PATCH] 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. --- src/compiler/x86-64/macros.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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))) -- 1.7.10.4