Changeset 13892


Ignore:
Timestamp:
Jun 26, 2010, 8:06:47 AM (9 years ago)
Author:
gb
Message:

arm-asm.lisp: change handling of non-conditional instructions (like "clrex").

arm-vinsns.lisp: EXTRACT-TAG-FIXNUM: shift first, then mask.

arm-utils.lisp: %WALK-DYNAMIC-AREA: more sanity checks, more sane.

l0-misc.lisp: %THREAD-STACK-SPACE: no temp stack on ARM.

arm-exceptions.c : callback_to_lisp(): don't assume that TCR is in rcontext.
handle_exception(): punt if in foreign code. handle_uuo(): break.

arm-spentry.s : _SPtfuncalllgen: push the right register.
_SPatomic_incf_node: preserve unboxed offset in case we loop.

arm-subprims.s: toplevel_loop, call _SPfuncall since the macro just
jumps.

Can read toplevel forms, but TOPLEVEL-EVAL uses PROGV which isn't all
there yet.

Location:
branches/arm
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/arm/compiler/ARM/arm-asm.lisp

    r13889 r13892  
    171171  (vector
    172172
     173   (define-arm-instruction clrex ()
     174     #xf57ff01f
     175     #xffffffff
     176     (:non-conditional))
     177   
    173178;;; UUOs.
    174179
     
    748753     #x0ff00ff0
    749754     ())
    750    (define-arm-instruction clrex ()
    751      #xf57ff01f
    752      #xffffffff
    753      (:non-conditional))
    754755   (define-arm-instruction clz (:rd :rm)
    755756     #x016f0f10
     
    776777         (template (if ordinal (aref *arm-instruction-table* ordinal))))
    777778    (if template
    778       (values template (unless (logbitp (encode-arm-instruction-flag :non-conditional) (arm-instruction-template-flags template)) cond-value) nil)
     779      (if (logtest (encode-arm-instruction-flag :non-conditional) (arm-instruction-template-flags template))
     780        (let* ((cond (ldb (byte 4 28) (arm-instruction-template-val template))))
     781          (values template cond cond))
     782        (values template cond-value nil))
    779783      (if (> len 2)
    780784        (let* ((cond-name (make-string 2)))
  • branches/arm/compiler/ARM/arm-vinsns.lisp

    r13889 r13892  
    774774(define-arm-vinsn extract-tag-fixnum (((tag :imm))
    775775                                      ((object :lisp)))
    776   (and tag object (:$ arm::tagmask))
    777   (mov tag (:lsl tag (:$ arm::fixnumshift))))
     776  (mov tag (:lsl object (:$ arm::fixnumshift)))
     777  (and tag object (:$ (ash arm::tagmask arm::fixnumshift))))
    778778
    779779(define-arm-vinsn extract-fulltag (((tag :u8))
  • branches/arm/level-0/ARM/arm-utils.lisp

    r13860 r13892  
    195195    (b @test)
    196196    @loop
     197    (test-fixnum obj)
     198    (uuo-debug-trap (:? ne))
    197199    (ldr header (:@ obj (:$ 0)))
    198200    (extract-fulltag tag header)
     
    208210    (bl .SPFuncall)
    209211    (ldmia (:! vsp) (obj fun sentinel))
    210     (add obj obj (:$ arm::cons.size))
     212    (add obj obj (:$ (- arm::cons.size arm::fulltag-cons)))
    211213    (b @test)
    212214    @misc
     
    217219    (bl .SPFuncall)
    218220    (ldmia (:! vsp) (obj fun sentinel))
    219     (add obj obj (:$ arm::fulltag-misc))
     221    (sub obj obj (:$ arm::fulltag-misc))
    220222    (ldr header (:@ obj (:$ 0)))
    221223    (extract-fulltag tag header)
     
    240242    (mov header (:lsr header (:$ 3)))
    241243    @bump
     244    (mov imm2 obj)
    242245    (add header header (:$ (+ 4 7)))
    243246    (bic header header (:$ arm::fulltagmask))
  • branches/arm/level-0/l0-misc.lisp

    r13824 r13892  
    272272        (multiple-value-bind (cf cu) (free-and-used (%fixnum-ref tcr target::tcr.cs-area))
    273273          (multiple-value-bind (vf vu) (free-and-used (%fixnum-ref tcr target::tcr.vs-area))
     274            #+arm-target
     275            (values cf cu vf vu)
     276            #-arm-target
    274277            (multiple-value-bind (tf tu) (free-and-used (%fixnum-ref tcr target::tcr.ts-area ))
    275278              (values cf cu vf vu tf tu))))))))
  • branches/arm/lisp-kernel/arm-exceptions.c

    r13862 r13892  
    983983  opcode instruction = 0;
    984984
     985  if (old_valence != TCR_STATE_LISP) {
     986    return false;
     987  }
    985988
    986989  program_counter = xpPC(xp);
     
    11221125      break;
    11231126    }
     1127    break;
     1128
    11241129
    11251130  case uuo_format_error_lisptag:
     
    11841189                                               
    11851190
    1186   TCR *tcr = TCR_FROM_TSD(xpGPR(xp, rcontext));
     1191  TCR *tcr = get_tcr(true);
    11871192
    11881193  /* Put the active stack pointer where .SPcallback expects it */
  • branches/arm/lisp-kernel/arm-spentry.s

    r13889 r13892  
    15001500        __(ldr temp0,[imm1,#-node_size]!)
    15011501        __(cmp imm1,vsp)
    1502         __(push1(temp2,imm0))
     1502        __(push1(temp0,imm0))
    15031503        __(bne 1b)
    15041504        __(mov vsp,imm0)
     
    18161816   support because of the locative */
    18171817_spentry(atomic_incf_node)
    1818         __(unbox_fixnum(imm0,arg_z))
    1819 0:      __(add imm2,arg_y,imm0)
     1818        __(unbox_fixnum(imm1,arg_z))
     18190:      __(add imm2,arg_y,imm1)
    18201820        __(ldrex arg_z,[imm2])
    18211821        __(add arg_z,arg_z,arg_x)
Note: See TracChangeset for help on using the changeset viewer.