Changeset 6347 for branches/x8664-call


Ignore:
Timestamp:
Apr 23, 2007, 11:16:25 AM (13 years ago)
Author:
gb
Message:

(Finally) don't need to set %fn to jump to it, can jump to symbol.fname,
etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/x8664-call/ccl/compiler/X86/X8664/x8664-vinsns.lisp

    r6342 r6347  
    280280                                               ((entry (:label 1))))
    281281  (leaq (:@ (:^ :back) (:%q x8664::fn)) (:%q x8664::ra0))
    282   (movq (:@ x8664::symbol.fcell (:% x8664::fname)) (:%q x8664::fn))
    283282  (:talign 4)
    284   (jmp (:%q x8664::fn))
     283  (jmp (:@ x8664::symbol.fcell (:% x8664::fname)))
    285284  :back
    286285  (leaq (:@ (:^ entry) (:% x8664::rip)) (:%q x8664::fn)))
     
    290289(define-x8664-vinsn (jump-known-symbol :jumplr) (()
    291290                                                 ())
    292   (movq (:%q x8664::fn) (:%q x8664::xfn))
    293   (movq (:@ x8664::symbol.fcell (:% x8664::fname)) (:%q x8664::fn))
    294   (jmp (:%q x8664::fn)))
     291
     292  (jmp (:@ x8664::symbol.fcell (:% x8664::fname))))
    295293
    296294(define-x8664-vinsn set-nargs (()
     
    15541552(define-x8664-vinsn pass-multiple-values-symbol (()
    15551553                                                 ())
    1556   (movq (:@ x8664::symbol.fcell (:% x8664::fname)) (:%q x8664::fn))
    15571554  (movq (:@ (+ x8664::nil-value (x8664::%kernel-global 'x86::ret1valaddr)))
    15581555        (:%q x8664::ra0))
    1559   (jmp (:%q x8664::fn)))
     1556  (jmp (:@ x8664::symbol.fcell (:% x8664::fname))))
    15601557
    15611558;;; It'd be good to have a variant that deals with a known function
     
    18251822                                  ()
    18261823                                  ((tag :u8)))
    1827   (movq (:%q x8664::fn) (:%q x8664::xfn))
    18281824  (movb (:%b x8664::temp0) (:%b tag))
    18291825  (andb (:$b x8664::fulltagmask) (:%b tag))
    18301826  (cmpb (:$b x8664::fulltag-symbol) (:%b tag))
    1831   (cmovgq (:%q x8664::temp0) (:%q x8664::fn))
     1827  (cmovgq (:%q x8664::temp0) (:%q x8664::xfn))
    18321828  (jl :bad)
    1833   (cmoveq (:@ x8664::symbol.fcell (:%q x8664::fname)) (:%q x8664::fn))
    1834   (jmp (:%q x8664::fn))
     1829  (cmoveq (:@ x8664::symbol.fcell (:%q x8664::fname)) (:%q x8664::xfn))
     1830  (jmp (:%q x8664::xfn))
    18351831  :bad
    18361832  (uuo-error-not-callable))
    18371833                             
    1838  
    1839 
    1840 (define-x8664-vinsn init-closure (()
    1841                                   ((closure :lisp)))
    1842   (movb (:$b 3) (:@ x8664::misc-data-offset (:%q closure))) ; code word count
    1843   (movb (:$b -1) (:@ (+ x8664::misc-data-offset 7) (:%q closure))) ; 1st byte of jmp
    1844   (movl (:$l (:apply logior #x2524 (:apply ash .SPcall-closure 16))) (:@ (+ x8664::misc-data-offset 8) (:%q closure))) ; rest of jmp instruction, low two bytes of subprim address
    1845   ((:not (:pred = 0 (:apply ash .SPcall-closure -16)))
    1846    (movb (:$b (:apply ash .SPcall-closure -16)) (:@ (+ x8664::misc-data-offset 12) (:%q closure))))
    1847   (movb (:$b x8664::function-boundary-marker) (:@ (+ x8664::misc-data-offset 16)  (:%q closure))))
     1834
    18481835
    18491836;;; Magic numbers in here include the address of .SPncall-closure.
     
    18961883     ((sym (:lisp (:ne val))))
    18971884     ((entry (:label 1))))
    1898   (leaq (:@ (:^ :back) (:%q x8664::fn)) (:%q x8664::ra0))
    18991885  (:talign 4)
    1900   (jmp (:@ .SPspecref))
     1886  (jmp (:@ .SPnspecref))
    19011887  :back
    19021888  (leaq (:@ (:^ entry) (:% x8664::rip)) (:%q x8664::fn)))
Note: See TracChangeset for help on using the changeset viewer.