Changeset 8634


Ignore:
Timestamp:
Mar 1, 2008, 8:38:01 PM (12 years ago)
Author:
rme
Message:

Cons macro for x8632; push_argregs hack for keyword arg processing;
changes to x8632-specific macros regnum and mark_as_node.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ia32/lisp-kernel/x86-macros.s

    r8391 r8634  
    327327
    328328/* $1=new_car,$2=new_cdr,$3=dest   */
     329
     330ifdef([X8632],[
     331define([Cons],[
     332        new_macro_labels()
     333/* The instructions where tcr.save_allocptr is tagged are difficult  */
     334/* to interrupt; the interrupting code has to recognize and possibly  */
     335/* emulate the instructions in between   */
     336        __(subl $cons.size-fulltag_cons,%rcontext:tcr.save_allocptr)
     337        __(movl %rcontext:tcr.save_allocptr,%allocptr)
     338        __(rcmpl(%allocptr,%rcontext:tcr.save_allocbase))
     339        __(jg macro_label(no_trap))
     340        uuo_alloc()
     341macro_label(no_trap):   
     342        __(andb $~fulltagmask,%rcontext:tcr.save_allocptr)
     343/* Easy to interrupt now that tcr.save_allocptr isn't tagged as a cons    */
     344        __(movl $2,cons.cdr(%allocptr))
     345        __(movl $1,cons.car(%allocptr))
     346        ifelse($3,[],[],[
     347         __(movl %allocptr,$3)
     348        ])
     349])],[
    329350define([Cons],[
    330351        new_macro_labels()
     
    345366         __(movq %allocptr,$3)
    346367        ])
    347 ])
     368])])
    348369
    349370ifdef([X8632],[
     
    606627define([push_argregs],[
    607628        new_macro_labels()
    608         __(cmpl [$]1*node_size,%nargs)
     629        /* xxx hack alert: when the compiler calls a keyword subprim */
     630        /* (SPsimple_keywords, SPkeyword_args, SP_keyword_bind) */
     631        /* it puts some flags in the upper half of %temp1, which
     632        /* is %nargs.  We use the cmpw here to avoid seeing those flags. */
     633        __(cmpw [$]1*node_size,%nargs_w)
    609634        __(jb macro_label(done))
    610635        __(je macro_label(z))
     
    707732
    708733ifdef([X8632],[
    709 define([regnum],[ifelse($1, [eax], [0],
    710        $1, [ecx], [1],
    711        $1, [edx], [2],
    712        $1, [ebx], [3],
    713        $1, [esp], [4],
    714        $1, [ebp], [5],
    715        $1, [esi], [6],
    716        $1, [edi], [7])dnl
     734define([regnum],[ifelse($1, [%eax], [0],
     735       $1, [%ecx], [1],
     736       $1, [%edx], [2],
     737       $1, [%ebx], [3],
     738       $1, [%esp], [4],
     739       $1, [%ebp], [5],
     740       $1, [%esi], [6],
     741       $1, [%edi], [7],
     742        "unknown register")dnl
    717743])
    718744
    719745define([mark_as_node], [
    720         __(xorl %$1, %$1)
     746        __(xorl $1,$1)
    721747        __(orb [$](1<<regnum($1)), %rcontext:tcr.node_regs_mask)
    722748])
Note: See TracChangeset for help on using the changeset viewer.