Changeset 8649


Ignore:
Timestamp:
Mar 4, 2008, 5:15:34 AM (12 years ago)
Author:
gb
Message:

Use (:rcontext tcr-field) syntax to reference TCR fields.
Don't use SAVE3 (was used for debugging of heap-walking code; might
be used in %%APPLY-IN-FRAME-PROTO if caller sets it.)

Location:
branches/win64/level-0/X86
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/win64/level-0/X86/x86-def.lisp

    r8356 r8649  
    216216(defx86lapfunction %current-tsp ()
    217217  (check-nargs 0)
    218   (movq (@ (% :rcontext) x8664::tcr.save-tsp) (% arg_z))
     218  (movq (:rcontext x8664::tcr.save-tsp) (% arg_z))
    219219  (single-value-return))
    220220
     
    279279  (check-nargs 1)
    280280  (movl ($ x8664::nil-value) (%l arg_y))
    281   (movq (@ (% :rcontext) x8664::tcr.catch-top) (% arg_z))
     281  (movq (:rcontext x8664::tcr.catch-top) (% arg_z))
    282282  (testb (%b arg_z) (%b arg_z))
    283283  (cmoveq (% arg_y) (% arg_z))
     
    301301
    302302(defx86lapfunction %save-standard-binding-list ((bindings arg_z))
    303   (movq (@ (% :rcontext) x8664::tcr.vs-area) (% imm0))
     303  (movq (:rcontext x8664::tcr.vs-area) (% imm0))
    304304  (movq (@ x8664::area.high (% imm0)) (% imm1))
    305305  (subq ($ x8664::node-size) (% imm1))
     
    308308
    309309(defx86lapfunction %saved-bindings-address ()
    310   (movq (@ (% :rcontext) x8664::tcr.vs-area) (% imm0))
     310  (movq (:rcontext x8664::tcr.vs-area) (% imm0))
    311311  (movq (@ x8664::area.high (% imm0)) (% imm1))
    312312  (lea (@ (- x8664::node-size) (% imm1)) (% arg_z))
     
    561561  (movq (@ 56 (% temp0)) (% fp7))
    562562  (call-subprim .SPffcall)
    563   (movq (@ (% :rcontext) x8664::tcr.foreign-sp) (% mm5))
     563  (movq (:rcontext x8664::tcr.foreign-sp) (% mm5))
    564564  (movq (% mm5) (@ (% frame)))
    565   (movq (% frame) (@ (% :rcontext) x8664::tcr.foreign-sp))
     565  (movq (% frame) (:rcontext x8664::tcr.foreign-sp))
    566566  (movq (% rax) (@ 8 (% frame)))
    567567  (movq (% fp0) (@ 16 (% frame)))
  • branches/win64/level-0/X86/x86-float.lisp

    r6479 r8649  
    198198(defx86lapfunction %get-post-ffi-mxcsr ()
    199199  (xor (% arg_z) (% arg_z))
    200   (movl (@ (% :rcontext) x8664::tcr.ffi-exception) (%l imm0))
    201   (movl (%l arg_z) (@ (% :rcontext) x8664::tcr.ffi-exception))
     200  (movl (:rcontext x8664::tcr.ffi-exception) (%l imm0))
     201  (movl (%l arg_z) (:rcontext x8664::tcr.ffi-exception))
    202202  (box-fixnum imm0 arg_z)
    203203  (single-value-return))
  • branches/win64/level-0/X86/x86-io.lisp

    r8196 r8649  
    2222
    2323(defx86lapfunction %get-errno ()
    24   (movq (@ (% :rcontext) x8664::tcr.errno-loc) (% imm1))
     24  (movq (:rcontext x8664::tcr.errno-loc) (% imm1))
    2525  (movslq (@ (% imm1)) (% imm0))
    2626  (movss (% fpzero) (@ (% imm1)))
  • branches/win64/level-0/X86/x86-misc.lisp

    r8582 r8649  
    174174
    175175(defx86lapfunction %heap-bytes-allocated ()
    176   (movq (@ (% :rcontext) x8664::tcr.save-allocptr) (% temp1))
    177   (movq (@ (% :rcontext) x8664::tcr.last-allocptr) (% temp0))
     176  (movq (:rcontext x8664::tcr.save-allocptr) (% temp1))
     177  (movq (:rcontext x8664::tcr.last-allocptr) (% temp0))
    178178  (cmpq ($ -16) (% temp1))
    179   (movq (@ (% :rcontext) x8664::tcr.total-bytes-allocated) (% imm0))
     179  (movq (:rcontext x8664::tcr.total-bytes-allocated) (% imm0))
    180180  (jz @go)
    181181  (movq (% temp0) (% temp2))
     
    273273
    274274(defx86lapfunction interrupt-level ()
    275   (movq (@ (% :rcontext) x8664::tcr.tlb-pointer) (% imm1))
     275  (movq (:rcontext x8664::tcr.tlb-pointer) (% imm1))
    276276  (movq (@ x8664::interrupt-level-binding-index (% imm1)) (% arg_z))
    277277  (single-value-return))
    278278
    279279(defx86lapfunction set-interrupt-level ((new arg_z))
    280   (movq (@ (% :rcontext) x8664::tcr.tlb-pointer) (% imm1))
     280  (movq (:rcontext x8664::tcr.tlb-pointer) (% imm1))
    281281  (trap-unless-fixnum new)
    282282  (movq (% new) (@ x8664::interrupt-level-binding-index (% imm1)))
     
    284284
    285285(defx86lapfunction %current-tcr ()
    286   (movq (@ (% :rcontext) x8664::tcr.linear) (% arg_z))
     286  (movq (:rcontext x8664::tcr.linear) (% arg_z))
    287287  (single-value-return))
    288288
    289289(defx86lapfunction %tcr-toplevel-function ((tcr arg_z))
    290290  (check-nargs 1)
    291   (cmpq (% tcr) (@ (% :rcontext) x8664::tcr.linear))
     291  (cmpq (% tcr) (:rcontext x8664::tcr.linear))
    292292  (movq (% rsp) (% imm0))
    293293  (movq (@ x8664::tcr.vs-area (% tcr)) (% temp0))
     
    303303(defx86lapfunction %set-tcr-toplevel-function ((tcr arg_y) (fun arg_z))
    304304  (check-nargs 2)
    305   (cmpq (% tcr) (@ (% :rcontext) x8664::tcr.linear))
     305  (cmpq (% tcr) (:rcontext x8664::tcr.linear))
    306306  (movq (% rsp) (% imm0))
    307307  (movq (@ x8664::tcr.vs-area (% tcr)) (% temp0))
     
    566566  (push (% save1))
    567567  (push (% save2))
    568   (push (% save3))
     568  (push (% save3))                      ; this'd be the TCR on Win64.
    569569  (set-nargs 4)
    570570  (jmp-subprim .SPvalues))
     
    572572
    573573(defx86lapfunction %current-db-link ()
    574   (movq (@ (% :rcontext) x8664::tcr.db-link) (% arg_z))
     574  (movq (:rcontext x8664::tcr.db-link) (% arg_z))
    575575  (single-value-return))
    576576
     
    601601  (macptr-ptr src imm0)
    602602  (leaq (@ (:^ done) (% fn)) (% ra0))
    603   (movq (% imm0) (@ (% :rcontext) x8664::tcr.safe-ref-address))
     603  (movq (% imm0) (:rcontext x8664::tcr.safe-ref-address))
    604604  (movq (@ (% imm0)) (% imm0))
    605605  (jmp done)
    606606  (:tra done)
    607607  (recover-fn-from-rip)
    608   (movq ($ 0) (@ (% :rcontext) x8664::tcr.safe-ref-address))
     608  (movq ($ 0) (:rcontext x8664::tcr.safe-ref-address))
    609609  (movq (% imm0) (@ x8664::macptr.address (% dest)))
    610610  (restore-simple-frame)
     
    616616
    617617(defx86lapfunction %check-deferred-gc ()
    618   (btq ($ (+ arch::tcr-flag-bit-pending-suspend target::fixnumshift)) (@ (% :rcontext) x8664::tcr.flags))
     618  (btq ($ (+ arch::tcr-flag-bit-pending-suspend target::fixnumshift)) (:rcontext x8664::tcr.flags))
    619619  (movl ($ x8664::nil-value) (% arg_z.l))
    620620  (jae @done)
     
    672672  (movq (@ '*spin-lock-timeouts* (% fn)) (% temp1))
    673673  (movq (@ target::symbol.vcell (% temp0)) (% temp0))
    674   (movq (@ (% :rcontext) x8664::tcr.linear) (% arg_y))
     674  (movq (:rcontext x8664::tcr.linear) (% arg_y))
    675675  @try-swap
    676676  (xorq (% rax) (% rax))
     
    699699;;; and this protoype is cloned (with the right parameters).
    700700
     701;;; For win64 (which doesn't really have a "save3" register), the code
     702;;; which instantiates this should always set save3-offset to 0.
    701703(defx86lapfunction %%apply-in-frame-proto ()
    702   (:fixed-constants (target-frame target-catch target-db-link target-xcf target-tsp target-foreign-sp save0-offset save1-offset save2-offset save3-offset function args))
     704  (:fixed-constants (target-frame target-catch target-db-link target-xcf target-tsp target-foreign-sp save0-offset save1-offset save2-offset  save3-offset function args))
    703705  (check-nargs 0)
    704706  ;;(uuo-error-debug-trap)
     
    706708  (xorl (%l imm0) (%l imm0))
    707709  (cmpb ($ x8664::fulltag-nil) (%b temp0))
    708   (movq (@ (% :rcontext) target::tcr.catch-top) (% arg_z))
     710  (movq (:rcontext target::tcr.catch-top) (% arg_z))
    709711  (jz @did-catch)
    710712  @find-catch
     
    775777  (movq (@ target::xcf.prev-xframe (% arg_z)) (% temp0))
    776778  (movq (@ target::xcf.foreign-sp (% arg_z)) (% imm0))
    777   (movq (% temp0) (@ (% :rcontext) target::tcr.xframe))
    778   (movq (% imm0) (@ (% :rcontext) target::tcr.foreign-sp))
     779  (movq (% temp0) (:rcontext target::tcr.xframe))
     780  (movq (% imm0) (:rcontext target::tcr.foreign-sp))
    779781  ;; All done processing the xcf.  NVRs may have been
    780782  ;; saved between the last catch/last xcf and the
     
    788790  (movq (@ 'target-foreign-sp (% fn)) (% temp0))
    789791  (je @no-tsp)
    790   (movq (% imm0) (@ (% :rcontext) target::tcr.save-tsp))
    791   (movq (% imm0) (@ (% :rcontext) target::tcr.next-tsp))
     792  (movq (% imm0) (:rcontext target::tcr.save-tsp))
     793  (movq (% imm0) (:rcontext target::tcr.next-tsp))
    792794  @no-tsp
    793795  (cmpb ($ x8664::fulltag-nil) (%b temp0))
    794796  (je @no-sp)
    795   (movq (% temp0) (@ (% :rcontext) target::tcr.foreign-sp))
     797  (movq (% temp0) (:rcontext target::tcr.foreign-sp))
    796798  @no-sp
    797799  (movq (@ 'target-frame (% fn)) (% rbp))
     
    806808  (testq (% arg_z) (% arg_z))
    807809  (cmovneq (@ (% rbp) (% arg_x)) (% save2))
    808   (testq (% temp0) (% temp0))
    809   (cmovneq (@ (% rbp) (% arg_x)) (% save3))
     810  (progn
     811    (testq (% temp0) (% temp0))
     812    (cmovneq (@ (% rbp) (% arg_x)) (% save3)))
     813
    810814  (leave)
    811815  (pop (% temp0))                       ; return address, not used by subprim
  • branches/win64/level-0/X86/x86-symbol.lisp

    r7942 r8649  
    9090(defx86lapfunction %symptr-binding-address ((symptr arg_z))
    9191  (movq (@ x8664::symbol.binding-index (% symptr)) (% arg_y))
    92   (rcmp (% arg_y) (@ (% :rcontext) x8664::tcr.tlb-limit))
    93   (movq (@ (% :rcontext) x8664::tcr.tlb-pointer) (% arg_x))
     92  (rcmp (% arg_y) (:rcontext x8664::tcr.tlb-limit))
     93  (movq (:rcontext x8664::tcr.tlb-pointer) (% arg_x))
    9494  (jae @sym)
    9595  (cmpb ($ x8664::no-thread-local-binding-marker) (@ (% arg_x) (% arg_y)))
  • branches/win64/level-0/X86/x86-utils.lisp

    r8356 r8649  
    4444
    4545    ; update active pointer for tsp area.
    46     (movq (@ (% :rcontext) x8664::tcr.ts-area) (% address))
    47     (movq (@ (% :rcontext) x8664::tcr.save-tsp) (% temp))
     46    (movq (:rcontext x8664::tcr.ts-area) (% address))
     47    (movq (:rcontext x8664::tcr.save-tsp) (% temp))
    4848    (movq (% temp) (@ x8664::area.active (% address)))
    4949   
    5050    ;; Update active pointer for vsp area.
    51     (movq (@ (% :rcontext) x8664::tcr.vs-area) (% address))
     51    (movq (:rcontext x8664::tcr.vs-area) (% address))
    5252    (movq (% rsp) (@ x8664::area.active (% address)))
    5353
     
    8787
    8888
    89 
    9089(defx86lapfunction walk-static-area ((a arg_y) (f arg_z))
    9190  (let ((fun save0)
    9291        (obj save1)
    93         (limit save2)
    94         (prev save3))
     92        (limit save2))
    9593    (save-simple-frame)
    9694    (push (% fun))
    9795    (push (% obj))
    9896    (push (% limit))
    99     (push (% prev))
    100     (xorl (%l prev) (%l prev))
    10197    (movq (% f) (% fun))
    10298    (movq (@ x8664::area.active (% a)) (% limit))
     
    118114    @misc
    119115    (lea (@ x8664::fulltag-misc (% obj)) (% obj))
    120     (movq (% obj) (% prev))
    121116    (movq (% obj) (% arg_z))
    122117    (set-nargs 1)
     
    161156    @cons
    162157    (addq ($ x8664::fulltag-cons) (% obj))
    163     (movq (% obj) (% prev))
    164158    (movq (% obj) (% arg_z))
    165159    (set-nargs 1)
     
    178172    (cmpq (% limit) (% obj))
    179173    (jb @loop)
    180     (pop (% prev))
    181174    (pop (% limit))
    182175    (pop (% obj))
     
    203196  (let ((fun save0)
    204197        (obj save1)
    205         (limit save2)
    206         (prev save3))
     198        (limit save2))
    207199    (save-simple-frame)
    208200    (push (% fun))
    209201    (push (% obj))
    210202    (push (% limit))
    211     (push (% prev))
    212203    (movq (% f) (% fun))
    213     (xorl (%l prev) (%l prev))
    214204    (ref-global tenured-area a)
    215205    (movq (@ x8664::area.low (% a)) (% obj))
    216206    (subq ($ (- x8664::cons.size x8664::fulltag-cons))
    217           (@ (% :rcontext) x8664::tcr.save-allocptr))
    218     (movq (@ (% :rcontext) x8664::tcr.save-allocptr) (% allocptr))
    219     (cmpq (@ (% :rcontext) x8664::tcr.save-allocbase) (% allocptr))
     207          (:rcontext x8664::tcr.save-allocptr))
     208    (movq (:rcontext x8664::tcr.save-allocptr) (% allocptr))
     209    (cmpq (:rcontext x8664::tcr.save-allocbase) (% allocptr))
    220210    (jg @ok)
    221211    (uuo-alloc)
    222212    @ok
    223213    (andb ($ (lognot x8664::fulltagmask))
    224           (@ (% :rcontext) x8664::tcr.save-allocptr))
     214          (:rcontext x8664::tcr.save-allocptr))
    225215    (movq (% allocptr) (% limit))
    226216    (jmp @test)
     
    241231    (lea (@ x8664::fulltag-misc (% obj)) (% obj))
    242232    (movq (% obj) (% arg_z))
    243     (movq (% obj) (% prev))
    244233    (set-nargs 1)
    245234    (:talign 4)
     
    286275    (movq (% obj) (% arg_z))
    287276    (je @done)
    288     (movq (% obj) (% prev))
    289277    (set-nargs 1)
    290278    (:talign 4)
     
    303291    (jb @loop)
    304292    @done
    305     (pop (% prev))
    306293    (pop (% limit))
    307294    (pop (% obj))
Note: See TracChangeset for help on using the changeset viewer.