X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86-64%2Fstatic-fn.lisp;h=20e808ec1f319de650fbc5501041e6fa6370b22a;hb=ffa9a31f62e3e2abab8ebcbb3bfdab9725feaf7f;hp=1842dffade64b3a427517b883086b142fad329db;hpb=4ebdc81b1a9c6dbed6e98b112afc8dd32b17a2dd;p=sbcl.git diff --git a/src/compiler/x86-64/static-fn.lisp b/src/compiler/x86-64/static-fn.lisp index 1842dff..20e808e 100644 --- a/src/compiler/x86-64/static-fn.lisp +++ b/src/compiler/x86-64/static-fn.lisp @@ -71,6 +71,7 @@ static-fun-template) (:args ,@(args)) ,@(temps) + (:temporary (:sc unsigned-reg) call-target) (:results ,@(results)) (:generator ,(+ 50 num-args num-results) ,@(moves (temp-names) (arg-names)) @@ -111,9 +112,14 @@ ;; longer executed? Does it not depend on the ;; 1+3=4=fdefn_raw_address_offset relationship above? ;; Is something else going on?) - (inst call (make-ea :qword - :disp (+ nil-value - (static-fun-offset function)))) + + ;; 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) ,(collect ((bindings) (links)) (do ((temp (temp-names) (cdr temp)) (name 'values (gensym))