Changeset 10500


Ignore:
Timestamp:
Aug 20, 2008, 2:27:23 AM (11 years ago)
Author:
gb
Message:

Use check_cstack_alignment() in a few places. It caught a case
where cstack was not aligned when entering lisp code in _SPcallback,
so fix that (align to 16-byte boundary there.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/x86-spentry32.s

    r10273 r10500  
    26432643/* on entry; macptr in arg_z on exit. */
    26442644_spentry(makestackblock)
     2645        __(check_cstack_alignment())
    26452646        __(unbox_fixnum(%arg_z,%imm0))
    26462647        __(dnode_align(%imm0,tsp_frame.fixed_overhead+macptr.size,%imm0))
     
    41704171        /* linear TCR addr now in %eax */
    41714172        __(movw tcr.ldt_selector(%eax), %rcontext_reg)
    4172         __(push rcontext(tcr.foreign_sp))
     4173
     4174        /* ebp is 16-byte aligned, and we've pushed 4 words.  Make
     4175          sure that when we push old foreign_sp, %esp will be 16-byte
     4176          aligned again */
     4177        __(subl $12,%esp)       
     4178        __(push rcontext(tcr.foreign_sp))
    41734179        __(movl %esp,rcontext(tcr.foreign_sp))
    41744180        __(clr %arg_z)
     
    41884194        __(push $local_label(back_from_callback))
    41894195        __(set_nargs(2))
     4196        __(check_cstack_alignment())
    41904197        __(jump_fname())
    41914198__(tra(local_label(back_from_callback)))
     
    41974204        __(emms)
    41984205        __(pop rcontext(tcr.foreign_sp))
     4206        __(addl $12,%esp)       /* discard alignment padding */
    41994207        __(ldmxcsr rcontext(tcr.foreign_mxcsr))
    42004208        __(pop %ebp)
Note: See TracChangeset for help on using the changeset viewer.