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.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.