Changeset 14104


Ignore:
Timestamp:
Aug 1, 2010, 3:58:51 PM (9 years ago)
Author:
gb
Message:

Don't use "ba" pseudo-instruction.

Location:
branches/arm/level-0/ARM
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/arm/level-0/ARM/arm-array.lisp

    r14081 r14104  
    142142  (beq @word-set-loop)
    143143  @bad
     144  (load-subprim temp0 .SPksignalerr)
    144145  (mov arg_x  '#.$xnotelt)
    145146  (set-nargs 3)
    146   (bl .SPksignalerr)
     147  (blx temp0)
    147148  @fixnum
    148149  (tst val (:$ arm::fixnum-mask))
     
    240241      (setf (uvref new j) (uvref oldv i)))))
    241242
    242 #+later
    243 (defarmlapfunction %extend-vector ((start-arg arg_x) (oldv-arg arg_y) (newsize arg_z))
    244   (let ((oldv save0)
    245         (oldsize save1)
    246         (oldsubtag save2)
    247         (start-offset save3))
    248     (save-lisp-context)
    249     (:regsave save3 0)
    250     (vpush save0)
    251     (vpush save1)
    252     (vpush save2)
    253     (vpush save3)
    254     (mov oldv oldv-arg)
    255     (mov start-offset start-arg)
    256     (getvheader imm0 oldv)
    257     (header-length oldsize imm0)
    258     (header-subtag[fixnum] oldsubtag imm0)
    259     (mov arg_y newsize)
    260     (mov arg_z oldsubtag)
    261     (bla .SPmisc-alloc)
    262     (extrwi imm0 oldsubtag arm::ntagbits (- 32 (+  arm::fixnumshift arm::ntagbits)))
    263     (cmpwi cr0 oldsize 0)
    264     (cmpwi cr1 imm0 arm::fulltag-nodeheader)
    265     (cmpwi cr2 oldsubtag '#.arm::max-32-bit-ivector-subtag)
    266     (la imm1 arm::misc-data-offset start-offset)
    267     (mov imm3 (:$ arm::misc-data-offset))
    268     (beq cr0 @done)
    269     (bne cr1 @imm)
    270     ;; copy nodes.  New vector is "new", so no memoization required.
    271     @node-loop
    272     (cmpwi cr0 oldsize '1)
    273     (lwzx temp0 oldv imm1)
    274     (addi imm1 imm1 4)
    275     (subi oldsize oldsize '1)
    276     (stwx temp0 arg_z imm3)
    277     (addi imm3 imm3 4)
    278     (bne cr0 @node-loop)
    279     ;;Restore registers.  New vector's been in arg_z all this time.
    280     @done
    281     (lwz save3 0 vsp)
    282     (lwz save2 4 vsp)
    283     (lwz save1 8 vsp)
    284     (lwz save0 12 vsp)
    285     (restore-full-lisp-context)
    286     (blr)
    287     @imm
    288     (unbox-fixnum imm2 oldsize)
    289     (unbox-fixnum imm3 start-offset)
    290     (mov imm1 (:$ arm::misc-data-offset))
    291     (la imm4 arm::misc-data-offset start-offset)
    292     (cmpwi cr1 oldsubtag '#.arm::max-8-bit-ivector-subtag)
    293     (cmpwi cr0 oldsubtag '#.arm::max-16-bit-ivector-subtag)
    294     (ble cr2 @fullword-loop)
    295     (cmpwi cr2 oldsubtag '#.arm::subtag-bit-vector)
    296     (ble cr1 @8-bit)
    297     (ble cr0 @16-bit)
    298     (beq cr2 @1-bit)
    299     ;; 64-bit (double-float) vectors.  There's a different
    300     ;; initial offset, but we're always word-aligned, so that
    301     ;; part's easy.
    302     (mov imm1 (:$ arm::misc-dfloat-offset))   ; scaled destination pointer
    303     (slwi imm2 imm2 1)                  ; twice as many fullwords
    304     (slwi imm3 imm3 3)                  ; convert dword count to byte offset
    305     (la imm4 arm::misc-dfloat-offset imm3)      ; scaled source pointer
    306     (b @fullword-loop)
    307     ;; The bitvector case is hard if START-OFFSET isn't on an 8-bit boundary,
    308     ;;  and can be turned into the 8-bit case otherwise.
    309     ;; The 8-bit case is hard if START-OFFSET isn't on a 16-bit boundary,
    310     ;;  and can be turned into the 16-bit case otherwise.
    311     ;; The 16-bit case is hard if START-OFFSET isn't on a 32-bit boundary,
    312     ;;  and can be turned into the 32-bit case otherwise.
    313     ;; Hmm.
    314     @1-bit
    315     (clrlwi. imm0 imm3 (- 32 3))
    316     (bne- cr0 @hard-1-bit)
    317     (srwi imm3 imm3 3)                  ; bit offset to byte offset
    318     (addi imm2 imm2 7)
    319     (srwi imm2 imm2 3)                  ; bit count to byte count
    320     @8-bit
    321     ; If the byte offset's even, copy half as many halfwords
    322     (clrlwi. imm0 imm3 (- 32 1))
    323     (bne- cr0 @hard-8-bit)
    324     (addi imm2 imm2 1)
    325     (srwi imm2 imm2 1)                  ; byte count to halfword count
    326     (srwi imm3 imm3 1)                  ; byte offset to halfword offset
    327     @16-bit
    328     ; If the halfword offset's even, copy half as many fullwords
    329     (clrlwi. imm0 imm3 (- 32 1))
    330     (bne- cr0 @hard-16-bit)
    331     (addi imm2 imm2 1)
    332     (srwi imm2 imm2 1)                  ; halfword count to fullword count
    333     (mov imm1 (:$ arm::misc-data-offset))   
    334     @fullword-loop
    335     (cmpwi cr0 imm2 1)
    336     (lwzx imm0 oldv imm4)
    337     (addi imm4 imm4 4)
    338     (subi imm2 imm2 1)
    339     (stwx imm0 arg_z imm1)
    340     (addi imm1 imm1 4)
    341     (bne cr0 @fullword-loop)
    342     (b @done)
    343     ;;; This can just do a uvref/uvset loop.  Cases that can
    344     ;;; cons (x32, double-float) have already been dealt with.
    345     @hard-1-bit
    346     @hard-8-bit
    347     @hard-16-bit
    348     (let ((newv save4)
    349           (outi save5)
    350           (oldlen save6))
    351       (vpush save4)
    352       (vpush save5)
    353       (vpush save6)
    354       (mov newv arg_z)
    355       (sub oldlen oldsize start-offset)
    356       (mov outi (:$ 0))
    357       @hard-loop
    358       (mov arg_y oldv)
    359       (mov arg_z start-offset)
    360       (bla .SPmisc-ref)
    361       (mov arg_x newv)
    362       (mov arg_y outi)
    363       (bla .SPmisc-set)
    364       (la outi '1 outi)
    365       (cmpw cr0 outi oldlen)
    366       (la start-offset '1 start-offset)
    367       (bne @hard-loop)
    368       (mov arg_z newv)
    369       (vpop save6)
    370       (vpop save5)
    371       (vpop save4)
    372       (b @done))))
     243
     244
    373245
    374246;;; argument is a vector header or an array header.  Or else.
     
    387259    (add offset offset disp)
    388260    (ble  @loop)
     261    (load-subprim imm0 .SPvalues)
    389262    (mov temp0 vsp)
    390263    (vpush1 a)
    391264    (vpush1 offset)
    392265    (set-nargs 2)
    393     (ba .SPvalues)))
     266    (bx imm0)))
    394267
    395268(defarmlapfunction %boole-clr ((len 0) (b0 arg_x) (b1 arg_y) (dest arg_z))
     
    658531
    659532(defarmlapfunction %aref2 ((array arg_x) (i arg_y) (j arg_z))
     533  (load-subprim imm0 .SParef2)
    660534  (check-nargs 3)
    661   (ba .SParef2))
     535  (bx imm0))
    662536
    663537(defarmlapfunction %aref3 ((array 0) (i arg_x) (j arg_y) (k arg_z))
     538  (load-subprim imm0 .SParef3)
    664539  (check-nargs 4)
    665540  (vpop1 temp0)
    666   (ba .SParef3))
     541  (bx imm0))
    667542
    668543
    669544(defarmlapfunction %aset2 ((array 0) (i arg_x) (j arg_y) (newval arg_z))
     545  (load-subprim imm0 .SPaset2)
    670546  (check-nargs 4)
    671547  (vpop1 temp0)
    672   (ba .SPaset2))
     548  (bx imm0))
    673549
    674550(defarmlapfunction %aset3 ((array #.target::node-size) (i 0) (j arg_x) (k arg_y)  (newval arg_z))
     551  (load-subprim imm0 .SPaset3)
    675552  (check-nargs 5)
    676553  (vpop1 temp0)
    677554  (vpop1 temp1)
    678   (ba .SPaset3))
     555  (bx imm0))
    679556 
    680557
  • branches/arm/level-0/ARM/arm-bignum.lisp

    r14089 r14104  
    3232  (digit-h temp0 imm0)
    3333  (digit-l temp1 imm0)
     34  (load-subprim imm0 .SPvalues)
    3435  (vpush1 temp0)
    3536  (vpush1 temp1)
    3637  (add temp0 vsp (:$ 8))                 
    3738  (set-nargs 2)                         
    38   (ba .SPvalues))
     39  (bx imm0))
    3940
    4041
     
    157158    (digit-h temp0 b)
    158159    (digit-l temp1 b)
     160    (load-subprim imm0 .SPvalues)
    159161    (vpush1 temp0)
    160162    (vpush1 temp1)
    161163    (add temp0 vsp '2)
    162164    (set-nargs 2)
    163     (ba .SPvalues)))
     165    (bx imm0)))
    164166
    165167
     
    292294    (digit-h temp0 b)
    293295    (digit-l temp1 b)
     296    (load-subprim imm0 .SPvalues)
    294297    (vpush temp0)
    295298    (vpush temp1)
    296299    (add temp0 vsp (:$ 8))
    297300    (set-nargs 2)
    298     (ba .SPvalues)))
     301    (bx imm0)))
    299302
    300303
     
    331334    (vpush1 temp1)
    332335    (vpush1 c)
     336    (load-subprim imm0 .SPvalues)
    333337    (add temp0 vsp (:$ 20))
    334338    (set-nargs 3)
    335     (ba .SPvalues)))
     339    (bx imm0)))
    336340
    337341
     
    343347    (vpush1 temp0)
    344348    (digit-l temp0 a)
     349    (load-subprim imm0 .SPvalues)
    345350    (vpush1 temp0)
    346351    (add temp0 vsp (:$ 8))
    347352    (set-nargs 2)
    348     (ba .spvalues)))
     353    (bx imm0)))
    349354
    350355
     
    390395    (digit-h temp2 lo)
    391396    (digit-l arg_z lo)
     397    (load-subprim imm0 .SPvalues)
    392398    (vpush1 temp0)
    393399    (vpush1 temp1)
     
    396402    (set-nargs 4)
    397403    (add temp0 vsp (:$ 16))
    398     (ba .SPvalues)))
     404    (bx imm0)))
    399405
    400406
     
    932938    (vpush1 temp0)
    933939    (digit-l temp0 guess)
     940    (load-subprim imm0 .SPvalues)
    934941    (vpush1 temp0)
    935942    (add temp0 vsp (:$ 20))
    936943    (add sp sp (:$ 32))
    937944    (set-nargs 2)
    938     (ba .spvalues)))
     945    (bx imm0)))
    939946
    940947(defarmlapfunction normalize-bignum-loop ((sign arg_x)(res arg_y)(len arg_z))
     
    10151022    (beq @set-header)
    10161023    ;; zero from len inclusive to oldlen exclusive
    1017     (mov imm1 (:$ 0))
    10181024    (add idx len (:$ arm::misc-data-offset))
    10191025    @loop2
     1026    (tst len (:$ arm::fixnumone))
     1027    (add len len '1)
     1028    (movwne imm1 (:$ arm::one-digit-bignum-header))
     1029    (moveq imm1 (:$ #x80000000))
     1030    (cmp len oldlen)
    10201031    (str imm1 (:@ idx res))
    1021     (add len len '1)
    1022     (cmp len oldlen)
    10231032    (add idx idx '1)
    10241033    (blt @loop2)
     
    11151124    (vector-length len bignum imm0)
    11161125    (mov imm2 (:$ 0))
     1126    (load-subprim temp1 .SPudiv64by32)
    11171127    (b @next)
    11181128    @loop
     
    11211131    (mov imm1 imm2)
    11221132    (compose-digit imm2 yhi ylo)
    1123     (bl .SPudiv64by32)
     1133    (blx temp1)
    11241134    (add imm1 len (:$ arm::misc-data-offset))
    11251135    (str imm0 (:@ res imm1))
     
    11291139    (digit-h yhi imm2)
    11301140    (digit-l ylo imm2)
     1141    (load-subprim imm0 .SPnvalret)
    11311142    (vpush1 yhi)
    11321143    (vpush1 ylo)
    11331144    (set-nargs 2)
    1134     (ba .SPnvalret)))
     1145    (bx imm0)))
    11351146
    11361147;;; For TRUNCATE-BY-FIXNUM et al.
     
    11411152    (vector-length len x imm0)
    11421153    (mov imm2 (:$ 0))
     1154    (load-subprim temp0 .SPudiv64by32)
    11431155    (b @next)
    11441156    @loop
     
    11471159    (mov imm1 imm2)
    11481160    (compose-digit imm2 yhi ylo)
    1149     (bl .SPudiv64by32)
     1161    (blx temp0)
    11501162    @next
    11511163    (subs len len '1)
     
    11531165    (digit-h yhi imm2)
    11541166    (digit-l ylo imm2)
     1167    (load-subprim imm0 .SPnvalret)
    11551168    (vpush1 yhi)
    11561169    (vpush1 ylo)
    11571170    (set-nargs 2)
    1158     (ba .SPnvalret)))
     1171    (bx imm0)))
    11591172   
    11601173   
     
    12661279  (add imm1 vsp (:$ 4))
    12671280  (build-lisp-frame imm0 imm1)
     1281  (mov fn nfn)
     1282  (load-subprim temp1 .SPnvalret)
     1283  (load-subprim temp2 .SPudiv64by32)
    12681284  (ldr temp0 (:@ vsp (:$ x-stk)))
    12691285  (add imm0 xidx (:$ arm::misc-data-offset))
     
    12781294  (vpush1 imm0)
    12791295  (set-nargs 2)
    1280   (ba .SPnvalret)
     1296  (bx temp1)
    12811297  @more
    12821298  (add imm1 xidx (:$ (- arm::misc-data-offset arm::node-size)))
     
    12841300  (add imm1 imm1 (:$ arm::node-size))
    12851301  (ldr imm1 (:@ temp0 imm1))
    1286   (bl .SPudiv64by32)
     1302  (blx temp2)
    12871303  (mov arg_y '-1)
    12881304  (and arg_y arg_y (:lsr imm0 (:$ (- 16 arm::fixnumshift))))
     
    12921308  (stmdb (:! vsp) (arg_z arg_y))
    12931309  (set-nargs 2)
    1294   (ba .SPnvalret))
     1310  (bx temp1))
    12951311
    12961312;;; Karatsuba multiplication stuff. NYI.
  • branches/arm/level-0/ARM/arm-clos.lisp

    r13865 r14104  
    199199(defarmlapfunction unset-fin-trampoline ()
    200200  (build-lisp-frame)
    201   (bl .SPheap-rest-arg)                ; cons up an &rest arg, vpush it
     201  (load-subprim imm0 .SPheap-rest-arg)
     202  (blx imm0)                ; cons up an &rest arg, vpush it
    202203  (vpop1 arg_z)                          ; whoops, didn't really want to
     204  (load-subprim imm0 .SPksignalerr)
    203205  (mov arg_x '#.$XNOFINFUNCTION)
    204206  (mov arg_y nfn)
    205207  (set-nargs 3)
    206   (bl .SPksignalerr)
     208  (blx imm0)
    207209  (mov arg_z 'nil)
    208210  (return-lisp-frame))
  • branches/arm/level-0/ARM/arm-def.lisp

    r14073 r14104  
    6969(defarmlapfunction %fixnum-ref-natural ((fixnum arg_y) #| &optional |# (offset arg_z))
    7070  (:arglist (fixnum &optional offset))
     71  (load-subprim imm1 .SPmakeu32)
    7172  (check-nargs 1 2)
    7273  (cmp nargs '1)
     
    7576  (unbox-fixnum imm0 offset)
    7677  (ldr imm0 (:@ imm0 fixnum))
    77   (ba .SPmakeu32))
     78  (bx imm1))
    7879
    7980
     
    205206  (cmp imm0 (:$ arm::subtag-function))
    206207  (ldr lr (:@ p (:$ arm::lisp-frame.savelr)))
     208  (load-subprim temp0 .SPnvalret)
    207209  (bne @no)
    208210  (ldr arg_x (:@ arg_y (:$ (+ arm::node-size arm::misc-data-offset))))
     
    218220  @go
    219221  (set-nargs 2)
    220   (ba .SPnvalret)
     222  (bx temp0)
    221223  @no
    222224  (mov imm0 'nil)
     
    956958      (bx lr)
    957959      @unsigned-doubleword
    958       (ba .SPmakeu64)
     960      (load-subprim temp0 .SPmakeu64)
     961      (bx temp0)
    959962      @signed-doubleword
    960       (ba .SPmakes64))
     963      (load-subprim temp0 .SPmakes64)
     964      (bx temp0))
    961965
    962966  ;;; This is just here so that we can jump to a subprim from lisp.
     
    11131117  (mov arm::next-method-context magic)
    11141118  (mov arm::nfn function)
     1119  (load-subprim temp0 .SPspread-lexprz)
    11151120  (set-nargs 0)
    11161121  (build-lisp-frame)
    1117   (bl .SPspread-lexprz)
     1122  (blx temp0)
    11181123  (ldr lr (:@ sp (:$ arm::lisp-frame.savelr)))
    11191124  ;; Nothing's changed FN.
     
    11341139  (mov arm::next-method-context magic)
    11351140  (mov arm::nfn function)
     1141  (load-subprim temp0 .SPspreadargZ)
    11361142  (set-nargs 0)
    11371143  (build-lisp-frame)
    1138   (bl .SPspreadargZ)
     1144  (blx temp0)
    11391145  (ldr lr (:@ sp (:$ arm::lisp-frame.savelr)))
    11401146  ;; Nothing's changed FN.
     
    12161222  (sub nargs nargs '2)                  ; remove count for butlast & last
    12171223  (build-lisp-frame)
    1218   (bl .SPspreadargz)
     1224  (load-subprim imm0 .SPspreadargz)
     1225  (blx imm0)
    12191226  (cmp nargs '3)
    12201227  (ldr lr (:@ sp (:$ arm::lisp-frame.savelr)))
    12211228  (discard-lisp-frame)
     1229  (load-subprim imm0 .SPfuncall)
    12221230  (add nargs nargs '1)                  ; count for last
    12231231  (strhs arg_x (:@! vsp (:$ -4)))
     
    12261234  (mov arg_z temp0)
    12271235  (ldr nfn (:@ nfn 'funcall))
    1228   (ba .SPfuncall))
     1236  (bx imm0))
    12291237
    12301238
  • branches/arm/level-0/ARM/arm-float.lisp

    r14082 r14104  
    110110  (vpush1 imm0)   ; hi 25 bits of mantissa (includes implied 1)
    111111  (vpush1 imm1)   ; lo 28 bits of mantissa
     112  (load-subprim imm0 .SPvalues)
    112113  (vpush1 temp1)  ; exp
    113114  (vpush1 temp0)  ; sign
    114115  (set-nargs 4)
    115116  (add temp0 vsp '4)
    116   (ba .SPvalues))
     117  (bx imm0))
    117118
    118119
     
    531532(defarmlapfunction %single-float-sqrt! ((src arg_y) (dest arg_z))
    532533  (build-lisp-frame)
     534  (load-subprim temp0 .SPcheck-fpu-exception)
    533535  (get-single-float s0 src imm0)
    534536  (fmrx imm0 fpscr)
     
    536538  (fmxr fpscr imm0)
    537539  (fsqrts s1 s0)
    538   (bl .SPcheck-fpu-exception)
     540  (blx temp0)
    539541  (put-single-float s1 dest imm0)
    540542  (return-lisp-frame))
     
    544546(defarmlapfunction %double-float-sqrt! ((src arg_y) (dest arg_z))
    545547  (build-lisp-frame)
     548  (load-subprim temp0 .SPcheck-fpu-exception)
    546549  (get-double-float d0 src)
    547550  (fmrx imm0 fpscr)
     
    549552  (fmxr fpscr imm0)
    550553  (fsqrtd d1 d0)
    551   (bl .SPcheck-fpu-exception)
     554  (blx temp0)
    552555  (put-double-float d1 dest)
    553556  (return-lisp-frame))
  • branches/arm/level-0/ARM/arm-hash.lisp

    r13820 r14104  
    3030(defarmlapfunction fast-mod ((number arg_y) (divisor arg_z))
    3131  (build-lisp-frame imm0)
     32  (load-subprim temp0 .SPudiv32)
    3233  (mov imm0 (:lsr number (:$ arm::fixnumshift)))
    3334  (mov imm1 (:lsr divisor (:$ arm::fixnumshift)))
    34   (bl .SPudiv32)
     35  (blx temp0)
    3536  (box-fixnum arg_z imm1)
    3637  (return-lisp-frame imm0))
     
    105106;;; ensure that the vector header gets memoized as well
    106107(defarmlapfunction %set-hash-table-vector-key ((vector arg_x) (index arg_y) (value arg_z))
    107   (ba .SPset-hash-key))
     108  (load-subprim imm0 .SPset-hash-key)
     109  (bx imm0))
    108110
    109111(defarmlapfunction %set-hash-table-vector-key-conditional ((offset 0) (vector arg_x) (old arg_y) (new arg_z))
    110   (ba .SPset-hash-key-conditional))
     112  (load-subprim imm0 .SPset-hash-key-conditional)
     113  (bx imm0))
    111114
    112115;;; Strip the tag bits to turn x into a fixnum
  • branches/arm/level-0/ARM/arm-misc.lisp

    r13955 r14104  
    200200
    201201(defarmlapfunction %heap-bytes-allocated ()
     202  (load-subprim temp0 .SPmakeu64)
    202203  (ldr imm2 (:@ rcontext (:$ arm::tcr.last-allocptr)))
    203204  (ldr imm1 (:@ rcontext (:$ arm::tcr.total-bytes-allocated-high)))
     
    211212  (adc imm1 imm1 (:$ 0))
    212213  @go
    213   (b .SPmakeu64))
     214  (bx temp0))
    214215
    215216
     
    218219(defarmlapfunction values ()
    219220  (:arglist (&rest values))
     221  (load-subprim imm0 .SPvalues)
    220222  (vpush-argregs)
    221223  (add temp0 nargs vsp)
    222   (ba .SPvalues))
     224  (bx imm0))
    223225
    224226;; It would be nice if (%setf-macptr macptr (ash (the fixnum value)
     
    239241
    240242(defarmlapfunction %%get-unsigned-longlong ((ptr arg_y) (offset arg_z))
     243  (load-subprim temp0 .SPmakeu64)
    241244  (trap-unless-xtype= ptr arm::subtag-macptr)
    242245  (macptr-ptr imm1 ptr)
     
    245248  (ldr imm0 (:@ imm2 (:$ 0)))
    246249  (ldr imm1 (:@ imm2 (:$ 4)))
    247   (ba .SPmakeu64))
     250  (bx temp0))
    248251
    249252
    250253
    251254(defarmlapfunction %%get-signed-longlong ((ptr arg_y) (offset arg_z))
     255  (load-subprim temp0 .SPmakes64)
    252256  (trap-unless-xtype= ptr arm::subtag-macptr)
    253257  (macptr-ptr imm1 ptr)
     
    256260  (ldr imm0 (:@ imm2 (:$ 0)))           ;low
    257261  (ldr imm1 (:@ imm2 (:$ 1)))           ;high
    258   (ba .SPmakes64))
     262  (bx temp0))
    259263
    260264
     
    263267                                            (offset arg_y)
    264268                                            (val arg_z))
     269  (load-subprim temp0 .SPgetu64)
    265270  (build-lisp-frame imm0)
    266271  (mov fn nfn)
    267272  (trap-unless-xtype= ptr arm::subtag-macptr)
    268   (bl .SPgetu64)
     273  (blx temp0)
    269274  (macptr-ptr imm2 ptr)
    270275  (add imm2 imm2 (:asr offset (:$ arm::fixnumshift)))
     
    278283                                          (offset arg_y)
    279284                                          (val arg_z))
     285  (load-subprim temp0 .SPgets64)
    280286  (build-lisp-frame imm0)
    281287  (mov fn nfn)
    282288  (trap-unless-xtype= ptr arm::subtag-macptr)
    283   (bl .SPgets64)
     289  (blx temp0)
    284290  (macptr-ptr imm2 ptr)
    285291  (add imm2 imm2 (:asr offset (:$ arm::fixnumshift)))
     
    339345;;; This needs to be done out-of-line, to handle EGC memoization.
    340346(defarmlapfunction %store-node-conditional ((offset 0) (object arg_x) (old arg_y) (new arg_z))
    341   (ba .SPstore-node-conditional))
     347  (load-subprim temp0 .SPstore-node-conditional)
     348  (bx temp0))
    342349
    343350#+notyet                                ; needs a subprim on ARM
     
    413420
    414421(defarmlapfunction %atomic-incf-node ((by arg_x) (node arg_y) (disp arg_z))
    415   (ba .SPatomic-incf-node))
     422  (load-subprim imm0 .SPatomic-incf-node)
     423  (bx imm0))
    416424
    417425(defarmlapfunction %atomic-incf-ptr ((ptr arg_z))
  • branches/arm/level-0/ARM/arm-numbers.lisp

    r14088 r14104  
    6262  (digit-h temp0 imm0)
    6363  (digit-l temp1 imm0)
     64  (load-subprim imm0 .SPvalues)
    6465  (vpush1 temp0)
    6566  (vpush1 temp1)
    6667  (add temp0 vsp '2)
    6768  (set-nargs 2)
    68   (ba .SPvalues))
     69  (bx imm0))
    6970
    7071
     
    139140        (remainder arg_z))
    140141    (build-lisp-frame)
     142    (load-subprim temp0 .SPsdiv32)
     143    (load-subprim temp1 .SPnvalret)
    141144    (mov fn nfn)
    142145    (cmp divisor '-1)   
     
    144147    (unbox-fixnum unboxed-divisor divisor)
    145148    (beq @neg)
    146     (bl .SPsdiv32)
     149    (blx temp0)
    147150    (box-fixnum quotient unboxed-quotient)
    148151    (box-fixnum remainder unboxed-remainder)
    149152    (stmdb (:! vsp) (quotient remainder))
    150153    (set-nargs 2)
    151     (ba .SPnvalret)
     154    (bx temp1)
    152155    @neg
    153156    (ldr arg_z (:@ fn '*least-positive-bignum*))
     
    159162    (vpush1 temp0)
    160163    (set-nargs 2)
    161     (ba .SPnvalret)))
     164    (bx temp1)))
    162165
    163166
  • branches/arm/level-0/ARM/arm-symbol.lisp

    r13789 r14104  
    6868
    6969(defarmlapfunction %symptr-value ((symptr arg_z))
    70   (ba .SPspecref))
     70  (load-subprim imm0 .SPspecref)
     71  (bx imm0))
    7172
    7273(defarmlapfunction %set-symptr-value ((symptr arg_y) (val arg_z))
    73   (ba .SPspecset))
     74  (load-subprim imm0 .SPspecset)
     75  (bx imm0))
    7476
    7577(defarmlapfunction %symptr-binding-address ((symptr arg_z))
     
    8284  (cmp temp0 (:$ arm::subtag-no-thread-local-binding))
    8385  (unbox-fixnum imm0 imm0)
     86  (load-subprim temp1 .SPvalues)
    8487  (beq @sym)
    8588  (vpush1 imm1)
     
    8790  (set-nargs 2)
    8891  (add temp0 vsp '2)
    89   (ba .SPvalues)
     92  (bx temp1)
    9093  @sym
    9194  (mov arg_y '#.arm::symbol.vcell)
     
    9497  (set-nargs 2)
    9598  (add temp0 vsp '2)
    96   (ba .SPvalues))
     99  (bx temp1))
    97100
    98101(defarmlapfunction %tcr-binding-location ((tcr arg_y) (sym arg_z))
  • branches/arm/level-0/ARM/arm-utils.lisp

    r13962 r14104  
    2222  ;; %address-of anything else is the address of that thing as an integer.
    2323  (test-fixnum arg)
     24  (load-subprim imm1 .SPmakeu32)
    2425  (mov imm0 arg_z)
    2526  (bxeq lr)
     
    2728  (box-fixnum arg_z imm0)               ; assume it did
    2829  (bxeq lr)                             ; else arg_z tagged ok, but missing bits
    29   (ba .SPmakeu32)         ; put all bits in bignum.
     30  (bx imm1)         ; put all bits in bignum.
    3031)
    3132
     
    111112    (set-nargs 1)
    112113    (stmdb (:! vsp) (fun obj limit))
     114    (load-subprim imm1 .SPfuncall)
    113115    (mov nfn fun)
    114     (bl .SPFuncall)
     116    (blx imm1)
    115117    (ldmia (:! vsp) (fun obj limit))
    116118    (add obj obj (:$ arm::cons.size))
     
    119121    (add arg_z obj (:$ arm::fulltag-misc))
    120122    (stmdb (:! vsp) (fun obj limit))
     123    (load-subprim imm1 .SPfuncall)
    121124    (set-nargs 1)
    122125    (mov nfn fun)
    123     (bl .SPFuncall)
     126    (blx imm1)
    124127    (ldmia (:! vsp) (fun obj limit))
    125128    (ldr header (:@ obj (:$ 0)))
     
    206209    (bhs @done)
    207210    (set-nargs 1)
     211    (load-subprim imm1 .SPfuncall)
    208212    (stmdb (:! vsp) (arg_z fun sentinel))
    209213    (mov nfn fun)
    210     (bl .SPFuncall)
     214    (blx imm1)
    211215    (ldmia (:! vsp) (obj fun sentinel))
    212216    (add obj obj (:$ (- arm::cons.size arm::fulltag-cons)))
     
    215219    (add arg_z obj (:$ arm::fulltag-misc))
    216220    (stmdb (:! vsp) (arg_z fun sentinel))
     221    (load-subprim imm1 .SPfuncall)
    217222    (set-nargs 1)
    218223    (mov nfn fun)
    219     (bl .SPFuncall)
     224    (blx imm1)
    220225    (ldmia (:! vsp) (obj fun sentinel))
    221226    (sub obj obj (:$ arm::fulltag-misc))
     
    327332  (mov fn nfn)
    328333  (uuo-kernel-service (:? al) (:$ arch::error-allocate-list))
     334  (load-subprim imm0 .SPnvalret)
    329335  (vpush1 arg_z)
    330336  (vpush1 arg_y)
    331337  (set-nargs 2)
    332   (ba .SPnvalret))
     338  (bx imm0))
    333339
    334340
     
    374380  (mov imm0 (:$ arch::gc-trap-function-get-lisp-heap-threshold))
    375381  (uuo-gc-trap (:? al))
    376   (ba .SPmakeu32))
     382  (load-subprim imm1 .SPmakeu32)
     383  (bx imm1))
    377384
    378385(defarmlapfunction set-lisp-heap-gc-threshold ((new arg_z))
     
    380387space to leave in the heap after full GC to new-value, which should be a
    381388non-negative fixnum. Returns the value of that kernel variable (which may
    382 be somewhat larger than what was specified)."
     389be somewhat larger than what was specified)." 
    383390  (check-nargs 1)
    384391  (build-lisp-frame)
    385   (bl .SPgetu32)
     392  (load-subprim imm0 .SPgetu32)
     393  (blx imm0)
    386394  (mov imm1 imm0)
    387395  (mov imm0 (:$ arch::gc-trap-function-set-lisp-heap-threshold))
     396  (load-subprim temp0 .SPmakeu32)
    388397  (uuo-gc-trap (:? al))
    389398  (restore-lisp-frame imm1)
    390   (ba .SPmakeu32))
     399  (bx temp0))
    391400
    392401
     
    403412  "Do a full GC, then consider all heap-allocated objects which survive to be non-relocatable."
    404413  (check-nargs 0)
     414  (load-subprim temp0 .SPmakeu32)
    405415  (mov imm0 (:$ arch::gc-trap-function-freeze))
    406416  (uuo-gc-trap (:? al))
    407   (ba .SPmakeu32))
     417  (bx temp0))
    408418
    409419(defarmlapfunction flash-freeze ()
    410420  "Like FREEZE, but don't GC first."
    411421  (check-nargs 0)
     422  (load-subprim temp0 .SPmakeu32)
    412423  (mov imm0 (:$ arch::gc-trap-function-flash-freeze))
    413424  (uuo-gc-trap (:? al))
    414   (ba .SPmakeu32))
     425  (bx temp0))
    415426
    416427(defun %watch (uvector)
Note: See TracChangeset for help on using the changeset viewer.