Changeset 7523 for branches/working-0710


Ignore:
Timestamp:
Oct 25, 2007, 8:31:30 PM (12 years ago)
Author:
gb
Message:

Try to ensure that rsp/rsp are lisp's whenever tcr->valence claims
to be in TCR_STATE_LISP.

(It's OK if they're also pointing to the lisp stack when in a foreign
context, as long as tcr->save_vsp and tcr->save_rbp are pointing to
the right values.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0710/ccl/lisp-kernel/x86-spentry64.s

    r7418 r7523  
    39393939        __(movq %rsp,%rcontext:tcr.save_vsp)
    39403940        __(movq %rbp,%rcontext:tcr.save_rbp)
     3941        __(movq $TCR_STATE_FOREIGN,%rcontext:tcr.valence)
    39413942        __(movq %rcontext:tcr.foreign_sp,%rsp)
    39423943        __(stmxcsr %rcontext:tcr.lisp_mxcsr)
    3943         __(movq $TCR_STATE_FOREIGN,%rcontext:tcr.valence)
    39443944        __(emms)
    39453945        __(ldmxcsr %rcontext:tcr.foreign_mxcsr)
     
    40074007         __(stmxcsr %rcontext:tcr.ffi_exception)
    40084008        __endif
    4009         __(movq $TCR_STATE_LISP,%rcontext:tcr.valence)
    40104009        __(movq %rcontext:tcr.save_vsp,%rsp)
    40114010        __(movq %rcontext:tcr.save_rbp,%rbp)
     4011        __(movq $TCR_STATE_LISP,%rcontext:tcr.valence)
    40124012        __(pop %save3)
    40134013        __(pop %save2)
     
    41374137        __(movq %rsp,%rcontext:tcr.save_vsp)
    41384138        __(movq %rbp,%rcontext:tcr.save_rbp)
     4139        __(movq $TCR_STATE_FOREIGN,%rcontext:tcr.valence)
    41394140        __(movq %rcontext:tcr.foreign_sp,%rsp)
    41404141        __(stmxcsr %rcontext:tcr.lisp_mxcsr)
    4141         __(movq $TCR_STATE_FOREIGN,%rcontext:tcr.valence)
    41424142        __(emms)
    41434143        __(ldmxcsr %rcontext:tcr.foreign_mxcsr)
     
    42094209         __(stmxcsr %rcontext:tcr.ffi_exception)
    42104210        __endif
    4211         __(movq $TCR_STATE_LISP,%rcontext:tcr.valence)
    42124211        __(movq %rcontext:tcr.save_vsp,%rsp)
    42134212        __(movq %rcontext:tcr.save_rbp,%rbp)
     4213        __(movq $TCR_STATE_LISP,%rcontext:tcr.valence)
    42144214        __(pop %fn)
    42154215        __(pop %save3)
     
    43304330        __(movq %rsp,%rcontext:tcr.save_vsp)
    43314331        __(movq %rbp,%rcontext:tcr.save_rbp)
     4332        __(movq $TCR_STATE_FOREIGN,%rcontext:tcr.valence)
    43324333        __(movq %rcontext:tcr.foreign_sp,%rsp)
    4333         __(movq $TCR_STATE_FOREIGN,%rcontext:tcr.valence)
    43344334        __(emms)
    43354335        __(movq (%rsp),%rbp)
     
    43624362        __(clr %fn)
    43634363        __(pxor %fpzero,%fpzero)
    4364         __(movq $TCR_STATE_LISP,%rcontext:tcr.valence)
    43654364        __(movq %rcontext:tcr.save_vsp,%rsp)
    43664365        __(movq %rcontext:tcr.save_rbp,%rbp)
     4366        __(movq $TCR_STATE_LISP,%rcontext:tcr.valence)
    43674367        __(pop %fn)
    43684368        __(pop %save3)
     
    45154515        __(clr %fn)
    45164516        __(pxor %fpzero,%fpzero)
     4517        __(movq %rcontext:tcr.save_vsp,%rsp)
     4518        __(box_fixnum(%rax,%arg_y))
     4519        __(movq %rbp,%arg_z)
     4520        __(movq %rcontext:tcr.save_rbp,%rbp)
    45174521        __(movq $TCR_STATE_LISP,%rcontext:tcr.valence)
    4518         __(movq %rcontext:tcr.save_vsp,%rsp)
    45194522        __(movq (%rsp),%save3)
    45204523        __(movq 8(%rsp),%save2)
     
    45244527        __(andb $~mxcsr_all_exceptions,%rcontext:tcr.foreign_mxcsr)
    45254528        __(ldmxcsr %rcontext:tcr.lisp_mxcsr)
    4526         __(box_fixnum(%rax,%arg_y))
    4527         __(movq %rbp,%arg_z)
    4528         __(movq %rcontext:tcr.save_rbp,%rbp)
    45294529        __(movq $nrs.callbacks,%fname)
    45304530        __(lea local_label(back_from_callback)(%rip),%ra0)
Note: See TracChangeset for help on using the changeset viewer.