From 488c8d03fbd233e9c4b19a6645b3b3c1e75a1ddf Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Sun, 2 Jun 2013 22:22:44 +0400 Subject: [PATCH] Correct call-indirect for >32-bit addresses. --- src/compiler/x86-64/macros.lisp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/compiler/x86-64/macros.lisp b/src/compiler/x86-64/macros.lisp index 8088d43..2883d28 100644 --- a/src/compiler/x86-64/macros.lisp +++ b/src/compiler/x86-64/macros.lisp @@ -63,12 +63,12 @@ `(inst pop (make-ea-for-object-slot ,ptr ,slot ,lowtag))) (defun call-indirect (offset) - (let ((ea (make-ea :qword :disp offset))) - (cond ((immediate32-p offset) - (inst call ea)) - (t - (inst mov temp-reg-tn ea) - (inst call temp-reg-tn))))) + (typecase offset + ((signed-byte 32) + (inst call (make-ea :qword :disp offset))) + (t + (inst mov temp-reg-tn offset) + (inst call (make-ea :qword :base temp-reg-tn))))) ;;;; macros to generate useful values -- 1.7.10.4