X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcompiler%2Fx86-64%2Fmacros.lisp;h=2883d289e8a487d710508c51ef592f0f4cd873a3;hb=02f7f85a6554b1ec233e9a515c4c511fe092565e;hp=04d7ae535e8f3d0e0c71784c4d4092b3913ba11b;hpb=3031b264496451e796282d7309c2221d89ee62c1;p=sbcl.git diff --git a/src/compiler/x86-64/macros.lisp b/src/compiler/x86-64/macros.lisp index 04d7ae5..2883d28 100644 --- a/src/compiler/x86-64/macros.lisp +++ b/src/compiler/x86-64/macros.lisp @@ -61,6 +61,14 @@ (defmacro popw (ptr &optional (slot 0) (lowtag 0)) `(inst pop (make-ea-for-object-slot ,ptr ,slot ,lowtag))) + +(defun call-indirect (offset) + (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