From: Stas Boukarev Date: Sun, 2 Jun 2013 18:22:44 +0000 (+0400) Subject: Correct call-indirect for >32-bit addresses. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=488c8d03fbd233e9c4b19a6645b3b3c1e75a1ddf;p=sbcl.git Correct call-indirect for >32-bit addresses. --- 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