Better calls to static functions on x86-64.
[sbcl.git] / src / compiler / x86-64 / static-fn.lisp
index bf3c6ea..ec4809a 100644 (file)
@@ -73,7 +73,6 @@
                     static-fun-template)
         (:args ,@(args))
         ,@(temps)
-        (:temporary (:sc unsigned-reg) call-target)
         (:results ,@(results))
         (:node-var ,node)
         (:generator ,(+ 50 num-args num-results)
          ;; longer executed? Does it not depend on the
          ;; 1+3=4=fdefn_raw_address_offset relationship above?
          ;; Is something else going on?)
-
-         ;; Need to load the target address into a register, since
-         ;; immediate call arguments are just a 32-bit displacement,
-         ;; which obviously can't work with >4G spaces.
-         (inst mov call-target
-               (make-ea :qword
-                        :disp (+ nil-value (static-fun-offset function))))
-         (inst call call-target)
+         (call-indirect (+ nil-value (static-fun-offset function)))
          ,(collect ((bindings) (links))
                    (do ((temp (temp-names) (cdr temp))
                         (name 'values (gensym))