Changeset 8216 for branches/ia32/level-0


Ignore:
Timestamp:
Jan 18, 2008, 10:04:21 AM (12 years ago)
Author:
rme
Message:

Rewrite %tcr-toplevel-function/%set-tcr-toplevel-function to get by
on just 1 imm reg.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ia32/level-0/X86/X8632/x8632-misc.lisp

    r8006 r8216  
    324324(defx8632lapfunction %tcr-toplevel-function ((tcr arg_z))
    325325  (check-nargs 1)
    326   (mark-as-imm temp1)
    327   (let ((imm1 temp1))
    328     (cmpl (% tcr) (@ (% :rcontext) x8632::tcr.linear))
    329     (movl (% esp) (% imm0))
    330     (movl (@ x8632::tcr.vs-area (% tcr)) (% temp0))
    331     (movl (@ x8632::area.high (% temp0)) (% imm1))
    332     (jz @room)
    333     (movl (@ x8632::area.active (% temp0)) (% imm0))
    334     @room
    335     (cmpl (% imm1) (% imm0))
    336     (movl ($ x8632::nil-value) (% arg_z))
    337     (cmovnel (@ (- x8632::node-size) (% imm1)) (% arg_z)))
    338   (mark-as-node temp1)
    339   (single-value-return))
    340 
     326  (movl (@ x8632::tcr.vs-area (% tcr)) (% temp0))
     327  (movl (@ x8632::area.high (% temp0)) (% imm0)) ;bottom of vstack
     328  (cmpl (% tcr) (@ (% :rcontext) x8632::tcr.linear))
     329  (jz @myself)
     330  (cmpl (% imm0) (@ x8632::area.active (% temp0)))
     331  (jmp @finish)
     332  @myself
     333  (cmpl (% imm0) (% esp))
     334  @finish
     335  (movl ($ x8632::nil-value) (% arg_z))
     336  (cmovnel (@ (- x8632::node-size) (% imm0)) (% arg_z))
     337  (single-value-return))
     338 
    341339(defx8632lapfunction %set-tcr-toplevel-function ((tcr arg_y) (fun arg_z))
    342340  (check-nargs 2)
    343   (mark-as-imm temp1)
    344   (let ((imm1 temp1))
    345     (cmpl (% tcr) (@ (% :rcontext) x8632::tcr.linear))
    346     (movl (% esp) (% imm0))
    347     (movl (@ x8632::tcr.vs-area (% tcr)) (% temp0))
    348     (movl (@ x8632::area.high (% temp0)) (% imm1))
    349     (jz @room)
    350     (movl (@ x8632::area.active (% temp0)) (% imm0))
    351     @room
    352     (cmpl (% imm1) (% imm0))
    353     (leal (@ (- x8632::node-size) (% imm1)) (% imm1))
    354     (movl ($ 0) (@ (% imm1)))
    355     (jne @have-room)
    356     (movl (% imm1) (@ x8632::area.active (% temp0)))
    357     (movl (% imm1) (@ x8632::tcr.save-vsp (% tcr)))
    358     @have-room
    359     (movl (% fun) (@ (% imm1))))
    360   (mark-as-node temp1)
     341  (movl (@ x8632::tcr.vs-area (% tcr)) (% temp0))
     342  (movl (@ x8632::area.high (% temp0)) (% imm0))
     343  (cmpl (% tcr) (@ (% :rcontext) x8632::tcr.linear))
     344  (jz @myself)
     345  (cmpl (% imm0) (@ x8632::area.active (% temp0))) ;vstack empty?
     346  (jmp @room)
     347  @myself
     348  (cmpl (% imm0) (% esp))
     349  @room
     350  (leal (@ (- x8632::node-size) (% imm0)) (% imm0))
     351  (movl ($ 0) (@ (% imm0)))
     352  (jne @have-room)
     353  (movl (% imm0) (@ x8632::area.active (% temp0)))
     354  (movl (% imm0) (@ x8632::tcr.save-vsp (% tcr)))
     355  (jmp @have-room)
     356  @have-room
     357  (movl (% fun) (@ (% imm0)))
    361358  (single-value-return))
    362359
Note: See TracChangeset for help on using the changeset viewer.