Changeset 6299


Ignore:
Timestamp:
Apr 18, 2007, 11:26:23 AM (15 years ago)
Author:
gb
Message:

Don't define RECOVER-FN-FROM-RA0.
Do define RECOVER-FN-FROM-RIP.
Use the latter after :tra.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/x8664-call/ccl/compiler/X86/x86-lapmacros.lisp

    r4721 r6299  
    276276  `(jmp (% ra0)))
    277277
    278 (defx86lapmacro recover-fn-from-ra0 (here)
    279   `(leaq (@ (- (:^ ,here)) (% ra0)) (% fn)))
    280 
    281278;;; Using *x8664-backend* here is wrong but expedient.
    282279(defun x86-subprim-offset (name)
     
    291288
    292289(defx86lapmacro call-subprim (name &optional (recover-fn t))
    293   (let* ((label (gensym)))
     290  (declare (ignore recover-fn))
     291  (let* ((label (gensym))
     292         (post (gensym)))
    294293    `(progn
    295294      (leaq (@ (:^ ,label) (% fn)) (% ra0))
    296295      (jmp-subprim ,name)
    297296      (:tra ,label)
    298       ,@(if recover-fn
    299             `((recover-fn-from-ra0 ,label))))))
     297      (lea (@ (- (:^ ,post)) (% rip)) (% fn))
     298      ,post)))
    300299     
    301300(defx86lapmacro %car (src dest)
     
    320319;;; to return a single value.
    321320(defx86lapmacro call-symbol (name nargs)
    322   (let* ((return (gensym)))
     321  (let* ((return (gensym))
     322         (post (gensym)))
    323323    `(progn
    324324      (load-constant ,name fname)
     
    328328      (jmp (% fn))
    329329      (:tra ,return)
    330       (recover-fn-from-ra0 ,return))))
     330      (lea (@ (- (:^ ,post)) (% rip)) (% fn))
     331      ,post)))
     332
     333(defx86lapmacro recover-fn-from-rip ()
     334  (let* ((next (gensym)))
     335    `(progn
     336      (lea (@ (- (:^ ,next)) (% rip)) (% fn))
     337      ,next)))
    331338
    332339;;;  tail call the function named by NAME with nargs NARGS.  %FN is
Note: See TracChangeset for help on using the changeset viewer.