Changeset 13747


Ignore:
Timestamp:
May 30, 2010, 1:55:52 PM (10 years ago)
Author:
gb
Message:

Lots of changes. More to come.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/arm/lisp-kernel/arm-spentry.s

    r13737 r13747  
    343343        __(jump_builtin(_builtin_aset1,3))
    344344                       
    345 _spentry(jmpsym)
    346         __(jump_fname())
    347 
    348 _spentry(jmpnfn)
    349         __(jump_nfn())
    350345
    351346        /*  Call nfn if it's either a symbol or function */
     
    361356        __(bx lr)
    362357
    363 _spentry(mkunwind)
    364         __(mov arg_z,#unbound_marker)
    365         __(mov imm2,#fixnum_one)
    366         __(mkcatch())
    367         __(bx lr)
    368358
    369359_spentry(mkcatchmv)
     
    371361        __(mkcatch())
    372362        __(bx lr)
     363
     364_spentry(mkunwind)
     365        __(mov imm2,#-fixnumone)
     366        __(mov imm1,#INTERRUPT_LEVEL_BINDING_INDEX)
     367        __(ldr temp0,[rcontext,#tcr.tlb_pointer])
     368        __(ldr arg_y,[temp0,#INTERRUPT_LEVEL_BINDING_INDEX])
     369        __(ldr imm0,[rcontext,#tcr.db_link])
     370        __(vpush1(arg_y))
     371        __(vpush1(imm1))
     372        __(vpush1(imm0))
     373        __(str imm2,[temp0,#INTERRUPT_LEVEL_BINDING_INDEX])
     374        __(str vsp,[rcontext,#tcr.db_link])
     375        __(mov arg_z,#unbound_marker)
     376        __(mov imm2,#fixnum_one)
     377        __(mkcatch())
     378        __(mov arg_z,arg_y)
     379        __(b _SPbind_interrupt_level)
     380       
    373381
    374382/* This never affects the symbol's vcell  */
     
    885893dnl /* as well. */
    886894        .globl C(egc_set_hash_key)       
    887 dnl _spentry(set_hash_key)
     895_spentry(set_hash_key)
    888896C(egc_set_hash_key):
    889897dnl         __(cmplr(cr2,arg_z,arg_x))
     
    951959            .globl C(egc_store_node_conditional)
    952960            .globl C(egc_write_barrier_end)
    953 dnl _spentry(store_node_conditional)
     961_spentry(store_node_conditional)
    954962C(egc_store_node_conditional):
    955963dnl         __(cmplr(cr2,arg_z,arg_x))
     
    988996dnl    Interrupt-related issues are as in store_node_conditional, but
    989997dnl    we have to do more work to actually do the memoization.*/
    990 dnl _spentry(set_hash_key_conditional)
     998_spentry(set_hash_key_conditional)
    991999        .globl C(egc_set_hash_key_conditional)
    9921000C(egc_set_hash_key_conditional):
     
    11111119
    11121120
    1113 dnl _spentry(progvsave)
     1121_spentry(progvsave)
    11141122dnl  /* Error if arg_z isn't a proper list.  That's unlikely, */
    11151123dnl  /* but it's better to check now than to crash later. */
     
    13721380
    13731381
    1374 dnl _spentry(simple_keywords)
     1382_spentry(simple_keywords)
    13751383dnl  __(mov imm0,#0)
    13761384dnl         __(vpush_argregs())
    13771385dnl         __(b _SPkeyword_bind)
    13781386dnl                 
    1379 dnl _spentry(keyword_args)
     1387_spentry(keyword_args)
    13801388dnl  __(vpush_argregs())
    13811389dnl         __(b _SPkeyword_bind)
     
    14031411dnl define(`limit',`save2')
    14041412dnl
    1405 dnl _spentry(keyword_bind)
     1413_spentry(keyword_bind)
    14061414dnl         /* Before we can really do anything, we have to  */
    14071415dnl         /* save the caller's context.  To do so, we need to know  */
     
    18381846        __(jump_fname)
    18391847
    1840 /* No args were vpushed; recover saved context & call symbol  */
    1841 _spentry(tcallsymvsp)
    1842         __(restore_lisp_frame(imm0))
    1843         __(jump_fname)
    18441848
    18451849/* Tail-recursively call the function in nfn.  */
     
    18471851_spentry(tcallnfngen)
    18481852        __(cmp nargs,#nargregs<<fixnumshift)
    1849         __(ble _SPtcallnfnvsp)
    1850         __(b _SPtcallnfnslide)
    1851  
     1853        __(bgt _SPtcallnfnslide)
     1854        __(restore_lisp_frame(imm0))
     1855        __(jump_nfn())
     1856         
    18521857/* Some args were vpushed.  Slide them down to the base of  */
    18531858/* the current frame, then do funcall.  */
     
    18681873        __(jump_nfn())
    18691874
    1870 _spentry(tcallnfnvsp)
    1871         __(restore_lisp_frame(imm0))
    1872         __(jump_nfn())
    18731875
    18741876/* Reference index arg_z of a misc-tagged object (arg_y).  */
     
    21022104dnl /* Discard the tsp frame; leave values atop the vsp.  */
    21032105dnl
    2104 dnl _spentry(recover_values)
     2106_spentry(recover_values)
    21052107dnl
    21062108dnl /* First, walk the segments reversing the pointer to previous segment pointers  */
     
    21402142
    21412143
    2142 /* Go out of line to do this.  Sheesh.  */
    2143 _spentry(vpopargregs)
    2144         __(cmp nargs,#0)
    2145         __(bxeq lr)
    2146         __(vpop_argregs_nz)
    2147         __(bx lr)
    21482144
    21492145/* If arg_z is an integer, return in imm0 something whose sign  */
     
    22912287dnl /* .SPrecover_values is therefore pretty simple.  */
    22922288dnl
    2293 dnl _spentry(save_values)
     2289_spentry(save_values)
    22942290dnl  __(mov imm1,tsp)
    22952291dnl
     
    23262322dnl /* values. This makes recover_values harder.  */
    23272323dnl
    2328 dnl _spentry(add_values)
     2324_spentry(add_values)
    23292325dnl  __(cmpri(nargs,0))
    23302326dnl  __(ldr imm1,[tsp,#0])
     
    23862382        __(return_lisp_frame(imm0))
    23872383
    2388 dnl
    2389 dnl _spentry(restorefullcontext)
    2390 dnl  __(mflr loc_pc)
    2391 dnl  __(mtctr loc_pc)
    2392 dnl  __(ldr loc_pc,[sp,#lisp_frame.savelr])
    2393 dnl  __(mtlr loc_pc)
    2394 dnl  __(ldr vsp,[sp,#lisp_frame.savevsp])
    2395 dnl  __(ldr fn,[sp,#lisp_frame.savefn])
    2396 dnl  __(discard_lisp_frame())
    2397 dnl  __(bctr)
    2398 dnl
    23992384
    24002385dnl
     
    24062391dnl /* If we can detect that the caller's caller didn't expect  */
    24072392dnl /* multiple values, then things are even simpler.  */
    2408 dnl _spentry(lexpr_entry)
     2393_spentry(lexpr_entry)
    24092394dnl  __(ref_global(imm1,ret1val_addr))
    24102395dnl  __(cmpr(imm1,loc_pc))
     
    24282413dnl  __(bx lr)
    24292414
    2430 
    2431 
    2432 
    2433 /* Enter the debugger  */
    2434 _spentry(breakpoint)
    2435         __(mov r3,#0)
    2436         __(uuo_debug_trap(al))
    2437         __(bx lr)  /* if handler didn't  */
    24382415
    24392416
     
    25612538/*  */
    25622539
    2563  _spentry(getu32)
     2540_spentry(getu32)
    25642541        __(test_fixnum(arg_z))
    25652542        __(moveq imm0,arg_z,asr #fixnumshift)
     
    27092686/* any interrupt polling  */
    27102687         
    2711  _spentry(unbind_interrupt_level)
     2688_spentry(unbind_interrupt_level)
    27122689        __(ldr imm0,[rcontext,#tcr.flags])
    27132690        __(ldr temp2,[rcontext,#tcr.tlb_pointer])
     
    28792856
    28802857
    2881 _spentry(nmkunwind)
    2882         __(mov imm2,#-fixnumone)
    2883         __(mov imm1,#INTERRUPT_LEVEL_BINDING_INDEX)
    2884         __(ldr temp0,[rcontext,#tcr.tlb_pointer])
    2885         __(ldr arg_y,[temp0,#INTERRUPT_LEVEL_BINDING_INDEX])
    2886         __(ldr imm0,[rcontext,#tcr.db_link])
    2887         __(vpush1(arg_y))
    2888         __(vpush1(imm1))
    2889         __(vpush1(imm0))
    2890         __(str imm2,[temp0,#INTERRUPT_LEVEL_BINDING_INDEX])
    2891         __(str vsp,[rcontext,#tcr.db_link])
    2892         __(mov arg_z,#unbound_marker)
    2893         __(mov imm2,#fixnum_one)
    2894         __(mkcatch())
    2895         __(mov arg_z,arg_y)
    2896         __(b _SPbind_interrupt_level)
    28972858
    28982859/*  EOF, basically  */
Note: See TracChangeset for help on using the changeset viewer.