Better calls to static functions on x86-64.
[sbcl.git] / src / compiler / x86-64 / macros.lisp
index 04d7ae5..8088d43 100644 (file)
 
 (defmacro popw (ptr &optional (slot 0) (lowtag 0))
   `(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)))))
 \f
 ;;;; macros to generate useful values