Changeset 13706


Ignore:
Timestamp:
May 18, 2010, 1:33:06 PM (10 years ago)
Author:
gb
Message:

Pick at low-hanging fruit, try to assemble some of it.

Location:
branches/arm/level-0/ARM
Files:
2 added
1 edited

Legend:

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

    r13699 r13706  
    4242    (macptr-ptr src-reg src-node-reg)
    4343    (ldr src-byteptr (:@ vsp (:$ src-byte-offset)))
    44     (add src-reg src-reg (:asr src-byte-ptr (:$ arm::fixnumshift)))
     44    (add src-reg src-reg (:asr src-byteptr (:$ arm::fixnumshift)))
    4545    (unbox-fixnum dest-byteptr dest-byte-offset)
    4646    (add dest-byteptr dest-byteptr (:$ arm::misc-data-offset))
     
    4949    (subs nbytes nbytes '1)
    5050    (ldrb val (:@+ src-reg (:$ 1)))
    51     (strb val (:@ dest (:$ dest-byteptr)))
     51    (strb val (:@ dest dest-byteptr))
    5252    (add dest-byteptr dest-byteptr (:$ 1))
    5353    @test
     
    5858
    5959(defarmlapfunction %copy-ivector-to-ptr ((src (* 1 arm::node-size))
    60                                          (src-byte-offset 0) 
     60                                         (src-byte-offset 0)
    6161                                         (dest arg_x)
    6262                                         (dest-byte-offset arg_y)
    6363                                         (nbytes arg_z))
    64   (ldr temp0 (:@ vsp (:$ src))
     64  (ldr temp0 (:@ vsp (:$ src)))
    6565  (cmp nbytes (:$ 0))
    66   (ldr imm0 (:@ vsp (:$ src-byte-offset))
     66  (ldr imm0 (:@ vsp (:$ src-byte-offset)))
    6767  (unbox-fixnum imm0 imm0)
    6868  (add imm0 imm0 (:$ arm::misc-data-offset))
     
    7676  (strb imm2 (:@+ imm1 (:$ 1)))
    7777  @test
    78   (bne cr0 @loop)
     78  (bne @loop)
    7979  (mov arg_z dest)
    8080  (add vsp vsp '2)
    8181  (bx lr))
    8282
     83#+notyet
    8384(defarmlapfunction %copy-ivector-to-ivector ((src 4)
    8485                                             (src-byte-offset 0)
     
    157158
    158159 
    159 
     160#+notyet
    160161(defarmlapfunction %copy-gvector-to-gvector ((src (* 1 arm::node-size))
    161162                                             (src-element 0)
     
    208209 
    209210
    210 
    211 
    212 #+ppc32-target
    213211(defarmlapfunction %heap-bytes-allocated ()
    214   (lwz imm2 arm::tcr.last-allocptr ppc32::rcontext)
    215   (cmpwi cr1 imm2 0)
    216   (cmpwi allocptr -8)                   ;void_allocptr
    217   (lwz imm0 arm::tcr.total-bytes-allocated-high ppc32::rcontext)
    218   (lwz imm1 arm::tcr.total-bytes-allocated-low ppc32::rcontext)
     212  (ldr imm2 (:@ rcontext (:$ arm::tcr.last-allocptr)))
     213  (ldr imm1 (:@ rcontext (:$ arm::tcr.total-bytes-allocated-high)))
     214  (ldr imm0 (:@ rcontext (:$ arm::tcr.total-bytes-allocated-low)))
     215  (cmp imm2 (:$ 0))
    219216  (sub imm2 imm2 allocptr)
    220   (beq cr1 @go)
    221217  (beq @go)
    222   (addc imm1 imm1 imm2)
    223   (addze imm0 imm0)
     218  (cmp allocptr (:$ -8))
     219  (beq @go)
     220  (adds imm1 imm1 imm2)
     221  (adc imm0 imm0 (:$ 0))
    224222  @go
    225   (ba .SPmakeu64))
     223  (b .SPmakeu64))
    226224
    227225
     
    236234;; It would be nice if (%setf-macptr macptr (ash (the fixnum value)
    237235;; ash::fixnumshift)) would do this inline.
    238 #+ppc-target
    239236(defarmlapfunction %setf-macptr-to-object ((macptr arg_y) (object arg_z))
    240237  (check-nargs 2)
    241   (trap-unless-typecode= arg_y arm::subtag-macptr)
    242   (str arg_z arm::macptr.address arg_y)
     238  (trap-unless-xtype= arg_y arm::subtag-macptr)
     239  (str arg_z (:@ arg_y (:$ arm::macptr.address)))
    243240  (bx lr))
    244241
    245242(defarmlapfunction %fixnum-from-macptr ((macptr arg_z))
    246243  (check-nargs 1)
    247   (trap-unless-typecode= arg_z arm::subtag-macptr)
    248   (ldr imm0 arm::macptr.address arg_z)
    249   (trap-unless-lisptag= imm0 arm::tag-fixnum imm1)
    250   (mr arg_z imm0)
     244  (trap-unless-xtype= arg_z arm::subtag-macptr)
     245  (ldr imm0 (:@ arg_z (:$ arm::macptr.address)))
     246  (trap-unless-fixnum imm0)
     247  (mov arg_z imm0)
    251248  (bx lr))
    252249
    253250(defarmlapfunction %%get-unsigned-longlong ((ptr arg_y) (offset arg_z))
    254   (trap-unless-typecode= ptr ppc32::subtag-macptr)
     251  (trap-unless-xtype= ptr arm::subtag-macptr)
    255252  (macptr-ptr imm1 ptr)
    256253  (unbox-fixnum imm2 offset)
    257254  (add imm2 imm2 imm1)
    258   (lwz imm0 0 imm2)
    259   (lwz imm1 4 imm2)
     255  (ldr imm0 (:@ imm2 (:$ 0)))
     256  (ldr imm1 (:@ imm2 (:$ 4)))
    260257  (ba .SPmakeu64))
    261258
     
    263260
    264261(defarmlapfunction %%get-signed-longlong ((ptr arg_y) (offset arg_z))
    265   (trap-unless-typecode= ptr ppc32::subtag-macptr)
     262  (trap-unless-xtype= ptr arm::subtag-macptr)
    266263  (macptr-ptr imm1 ptr)
    267264  (unbox-fixnum imm2 offset)
    268265  (add imm2 imm2 imm1)
    269   (lwz imm0 0 imm2)
    270   (lwz imm1 4 imm2)
     266  (ldr imm0 (:@ imm2 (:$ 0)))           ;low
     267  (ldr imm1 (:@ imm2 (:$ 1)))           ;high
    271268  (ba .SPmakes64))
    272269
    273 #+ppc64-target
    274 (defarmlapfunction %%get-signed-longlong ((ptr arg_y) (offset arg_z))
    275   (trap-unless-typecode= ptr ppc64::subtag-macptr)
    276   (macptr-ptr imm1 ptr)
    277   (unbox-fixnum imm2 offset)
    278   (ldx imm0 imm2 imm1)
    279   (ba .SPmakes64))
    280 
    281 #+ppc32-target
    282 (defarmlapfunction %%set-unsigned-longlong ((ptr arg_x)
    283                                               (offset arg_y)
    284                                               (val arg_z))
    285   (save-lisp-context)
    286   (trap-unless-typecode= ptr ppc32::subtag-macptr)
    287   (bla .SPgetu64)
    288   (macptr-ptr imm2 ptr)
    289   (unbox-fixnum imm3 offset)
    290   (add imm2 imm3 imm2)
    291   (stw imm0 0 imm2)
    292   (stw imm1 4 imm2)
    293   (ba .SPpopj))
    294 
    295 #+ppc64-target
     270
     271
    296272(defarmlapfunction %%set-unsigned-longlong ((ptr arg_x)
    297273                                            (offset arg_y)
    298274                                            (val arg_z))
    299   (save-lisp-context)
    300   (trap-unless-typecode= ptr ppc64::subtag-macptr)
    301   (bla .SPgetu64)
     275  (build-lisp-frame imm0)
     276  (mov fn nfn)
     277  (trap-unless-xtype= ptr arm::subtag-macptr)
     278  (bl .SPgetu64)
    302279  (macptr-ptr imm2 ptr)
    303   (unbox-fixnum imm3 offset)
    304   (stdx imm0 imm3 imm2)
    305   (ba .SPpopj))
    306 
    307 #+ppc32-target
    308 (defarmlapfunction %%set-signed-longlong ((ptr arg_x)
    309                                             (offset arg_y)
    310                                             (val arg_z))
    311   (save-lisp-context)
    312   (trap-unless-typecode= ptr ppc32::subtag-macptr)
    313   (bla .SPgets64)
    314   (macptr-ptr imm2 ptr)
    315   (unbox-fixnum imm3 offset)
    316   (add imm2 imm3 imm2)
    317   (stw imm0 0 imm2)
    318   (stw imm1 4 imm2)
    319   (ba .SPpopj))
    320 
    321 #+ppc64-target
     280  (add imm2 imm2 (:asr offset (:$ arm::fixnumshift)))
     281  (str imm0 (:@ imm2 (:$ 0)))
     282  (str imm1 (:@ imm2 (:$ 4)))
     283  (return-lisp-frame imm0))
     284
     285
     286
    322287(defarmlapfunction %%set-signed-longlong ((ptr arg_x)
    323288                                          (offset arg_y)
    324289                                          (val arg_z))
    325   (save-lisp-context)
    326   (trap-unless-typecode= ptr arm::subtag-macptr)
    327   (bla .SPgets64)
     290  (build-lisp-frame imm0)
     291  (mov fn nfn)
     292  (trap-unless-xtype= ptr arm::subtag-macptr)
     293  (bl .SPgets64)
    328294  (macptr-ptr imm2 ptr)
    329   (unbox-fixnum imm3 offset)
    330   (stdx imm0 imm3 imm2)
    331   (ba .SPpopj))
     295  (add imm2 imm2 (:asr offset (:$ arm::fixnumshift)))
     296  (str imm0 (:@ imm2 (:$ 0)))
     297  (str imm1 (:@ imm2 (:$ 4)))
     298  (return-lisp-frame imm0))
     299
     300
    332301
    333302(defarmlapfunction interrupt-level ()
    334   (ldr arg_z arm::tcr.tlb-pointer arm::rcontext)
    335   (ldr arg_z arm::interrupt-level-binding-index arg_z)
     303  (ldr arg_z (:@ arm::rcontext (:$ arm::tcr.tlb-pointer)))
     304  (ldr arg_z (:@ arg_z (:$ arm::interrupt-level-binding-index)))
    336305  (bx lr))
    337306
     
    340309
    341310(defarmlapfunction set-interrupt-level ((new arg_z))
    342   (ldr imm1 arm::tcr.tlb-pointer arm::rcontext)
    343   (trap-unless-lisptag= new arm::tag-fixnum imm0)
    344   (str new arm::interrupt-level-binding-index imm1)
     311  (ldr imm1 (:@ arm::rcontext (:$ arm::tcr.tlb-pointer)))
     312  (trap-unless-fixnum new)
     313  (str new (:@ imm1 (:$ arm::interrupt-level-binding-index)))
    345314  (bx lr))
    346315
     
    353322(defarmlapfunction %tcr-toplevel-function ((tcr arg_z))
    354323  (check-nargs 1)
    355   (cmpr tcr arm::rcontext)
    356   (mr imm0 vsp)
    357   (ldr temp0 arm::tcr.vs-area tcr)
    358   (ldr imm1 arm::area.high temp0)
    359   (beq @room)
    360   (ldr imm0 arm::area.active temp0)
    361   @room
    362   (cmpr imm1 imm0)
    363   (li arg_z nil)
    364   (beqlr)
    365   (ldr arg_z (- arm::node-size) imm1)
     324  (cmp tcr arm::rcontext)
     325  (mov imm0 vsp)
     326  (ldr temp0 (:@ tcr (:$ arm::tcr.vs-area)))
     327  (ldr imm1 (:@ temp0 (:$ arm::area.high)))
     328  (ldrne imm0 (:@ temp0 (:$ arm::area.active)))
     329  (cmp imm1 imm0)
     330  (moveq arg_z 'nil)
     331  (ldrne arg_z (:@ imm1 (:$ (- arm::node-size))))
    366332  (bx lr))
    367333
    368334(defarmlapfunction %set-tcr-toplevel-function ((tcr arg_y) (fun arg_z))
    369335  (check-nargs 2)
    370   (cmpr tcr arm::rcontext)
    371   (mr imm0 vsp)
    372   (ldr temp0 arm::tcr.vs-area tcr)
    373   (ldr imm1 arm::area.high temp0)
    374   (beq @check-room)
    375   (ldr imm0 arm::area.active temp0)
    376   @check-room
    377   (cmpr imm1 imm0)
    378   (push rzero imm1)
    379   (bne @have-room)
    380   (str imm1 arm::area.active temp0)
    381   (str imm1 arm::tcr.save-vsp tcr)
    382   @have-room
    383   (str fun 0 imm1)
     336  (cmp tcr arm::rcontext)
     337  (mov imm0 vsp)
     338  (ldr temp0 (:@ tcr (:$ arm::tcr.vs-area)))
     339  (ldr imm1 (:@ temp0 (:$ arm::area.high)))
     340  (ldrne  imm0 (:@ temp0 (:$ arm::area.active)))
     341  (cmp imm1 imm0)
     342  (mov imm0 ($ 0))
     343  (push1 imm0 imm1)
     344  (streq imm1 (:@ temp0 (:$ arm::area.active)))
     345  (streq imm1 (:@ tcr (:$ arm::tcr.save-vsp)))
     346  (str fun (:@ imm1 (:$ 0)))
    384347  (bx lr))
    385348
     
    388351  (ba .SPstore-node-conditional))
    389352
     353#+notyet                                ; needs a subprim on ARM
    390354(defarmlapfunction %store-immediate-conditional ((offset 0) (object arg_x) (old arg_y) (new arg_z))
    391355  (vpop temp0)
     
    407371    (bx lr)))
    408372
     373#+notyet                                ; needs ARM subprim ?
    409374(defarmlapfunction set-%gcable-macptrs% ((ptr arm::arg_z))
    410375  (li imm0 (+ (target-nil-value) (arm::kernel-global gcable-pointers)))
     
    419384;;; Atomically increment or decrement the gc-inhibit-count kernel-global
    420385;;; (It's decremented if it's currently negative, incremented otherwise.)
     386#+notyet                                ;needs ARM subprim ?
    421387(defarmlapfunction %lock-gc-lock ()
    422388  (li imm0 (+ (target-nil-value) (arm::kernel-global gc-inhibit-count)))
     
    436402;;; (It's incremented if it's currently negative, incremented otherwise.)
    437403;;; If it's incremented from -1 to 0, try to GC (maybe just a little.)
     404#+notyet                                ;Needs ARM subprim ?
    438405(defarmlapfunction %unlock-gc-lock ()
    439406;;  (sync)
     
    456423
    457424
    458 
     425#+notyet                                ;needs ARM subprim ?
    459426(defarmlapfunction %atomic-incf-node ((by arg_x) (node arg_y) (disp arg_z))
    460427  (check-nargs 3)
     
    468435  (bx lr))
    469436
     437#+notyet                                ;needs ARM subprim ?
    470438(defarmlapfunction %atomic-incf-ptr ((ptr arg_z))
    471439  (macptr-ptr imm1 ptr)
     
    479447  (bx lr))
    480448
     449#+notyet                                ;needs ARM subprim ?
    481450(defarmlapfunction %atomic-incf-ptr-by ((ptr arg_y) (by arg_z))
    482451  (macptr-ptr imm1 ptr)
     
    491460  (bx lr))
    492461
     462#+notyet                                ;needs ARM subprim
    493463(defarmlapfunction %atomic-decf-ptr ((ptr arg_z))
    494464  (macptr-ptr imm1 ptr)
     
    502472  (bx lr))
    503473
     474#+notyet                                ;Needs ARM subprim ?
    504475(defarmlapfunction %atomic-decf-ptr-if-positive ((ptr arg_z))
    505476  (macptr-ptr imm1 ptr)
     
    520491  (bx lr))
    521492
     493#+notyet                                ;guess why not ?
    522494(defarmlapfunction %atomic-swap-ptr ((ptr arg_y) (newval arg_z))
    523495  (sync)
     
    534506;;; Try to store the fixnum NEWVAL at PTR, if and only if the old value
    535507;;; was equal to OLDVAL.  Return the old value
     508#notyet                                 ;still
    536509(defarmlapfunction %ptr-store-conditional ((ptr arg_x) (expected-oldval arg_y) (newval arg_z))
    537510  (macptr-ptr imm0 ptr)
     
    553526  (bx lr))
    554527
     528#+notyet                                ; Yet ?  Not.
    555529(defarmlapfunction %ptr-store-fixnum-conditional ((ptr arg_x) (expected-oldval arg_y) (newval arg_z))
    556530  (let ((address imm0)
     
    564538    (bne- @again)
    565539    (isync)
    566     (mr arg_z actual-oldval)
     540    (mov arg_z actual-oldval)
    567541    (bx lr)
    568542    @done
    569543    (li address arm::reservation-discharge)
    570     (mr arg_z actual-oldval)
     544    (mov arg_z actual-oldval)
    571545    (strcx. rzero 0 address)
    572546    (bx lr)))
     
    577551(defarmlapfunction %macptr->dead-macptr ((macptr arg_z))
    578552  (check-nargs 1)
    579   (li imm0 arm::subtag-dead-macptr)
    580   (stb imm0 arm::misc-subtag-offset macptr)
    581   (bx lr))
    582 
     553  (mov imm0 (:$ arm::subtag-dead-macptr))
     554  (strb imm0 (:@ macptr (:$ arm::misc-subtag-offset)))
     555  (bx lr))
     556
     557#+notyet                                ;for different reasons
    583558(defarmlapfunction %%apply-in-frame ((catch-count imm0) (srv temp0) (tsp-count imm0) (db-link imm0)
    584559                                     (parent arg_x) (function arg_y) (arglist arg_z))
     
    682657      (stw loc-pc arm::lisp-frame.savelr sp))
    683658    ;; Parent is a real stack frame
    684     (mr sp parent))
     659    (mov sp parent))
    685660  (set-nargs 0)
    686661  (bla .SPspreadargz)
    687662  (ba .SPtfuncallgen))
    688663
    689 #+ppc32-target
    690 ;;; Easiest to do this in lap, to avoid consing bignums and/or
    691 ;;; multiple-value hair.
    692 ;;; Bang through code-vector until the end or a 0 (traceback table
    693 ;;; header) is found.  Return high-half, low-half of last instruction
    694 ;;; and index where found.
    695 (defarmlapfunction %code-vector-last-instruction ((cv arg_z))
    696   (let ((previ imm0)
    697         (nexti imm1)
    698         (idx imm2)
    699         (offset imm3)
    700         (len imm4))
    701     (vector-length len cv len)
    702     (li idx 0)
    703     (cmpw cr0 idx len)
    704     (li offset arm::misc-data-offset)
    705     (li nexti 0)
    706     (b @test)
    707     @loop
    708     (mr previ nexti)
    709     (lwzx nexti cv offset)
    710     (cmpwi cr1 nexti 0)
    711     (addi idx idx '1)
    712     (cmpw cr0 idx len)
    713     (addi offset offset '1)
    714     (beq cr1 @done)
    715     @test
    716     (bne cr0 @loop)
    717     (mr previ nexti)
    718     @done
    719     (digit-h temp0 previ)
    720     (digit-l temp1 previ)
    721     (subi idx idx '1)
    722     (vpush temp0)
    723     (vpush temp1)
    724     (vpush idx)
    725     (set-nargs 3)
    726     (la temp0 '3 vsp)
    727     (ba .SPvalues)))
    728 
    729 #+ppc64-target
    730 (defun %code-vector-last-instruction (cv)
    731   (do* ((i 1 (1+ i))
    732         (instr nil)
    733         (n (uvsize cv)))
    734        ((= i n) instr)
    735     (declare (fixnum i n))
    736     (let* ((next (uvref cv i)))
    737       (declare (type (unsigned-byte 32) next))
    738       (if (zerop next)
    739         (return instr)
    740         (setq instr next)))))
     664
    741665
    742666       
     
    754678(defarmlapfunction %misc-address-fixnum ((misc-object arg_z))
    755679  (check-nargs 1)
    756   (la arg_z arm::misc-data-offset misc-object)
     680  (add arg_z misc-object (:$ arm::misc-data-offset))
    757681  (bx lr))
    758682
     
    761685  (check-nargs 3)
    762686  (macptr-ptr imm1 ptr) ; address in macptr
    763   (addi imm0 imm1 9)     ; 2 for delta + 7 for alignment
    764   (clrrwi imm0 imm0 3)   ; Clear low three bits to align
    765   (subf imm1 imm1 imm0)  ; imm1 = delta
    766   (sth imm1 -2 imm0)     ; save delta halfword
     687  (add imm0 imm1 (:$ 9))     ; 2 for delta + 7 for alignment
     688  (bic imm0 imm0 (:$ 7))   ; Clear low three bits to align
     689  (rsb imm1 imm1 imm0)  ; imm1 = delta
     690  (strh imm1 (:@  imm0 (:$ -2)))     ; save delta halfword
    767691  (unbox-fixnum imm1 subtype)  ; subtype at low end of imm1
    768   (rlwimi imm1 len (- arm::num-subtag-bits arm::fixnum-shift) 0 (- 31 arm::num-subtag-bits))
    769   (stw imm1 0 imm0)       ; store subtype & length
    770   (addi arg_z imm0 arm::fulltag-misc) ; tag it, return it
     692  (orr imm1 imm1 (:lsl len (:$ (- arm::num-subtag-bits arm::fixnum-shift))))
     693  (str imm1 (:@ imm0 (:$ 0)))       ; store subtype & length
     694  (add arg_z imm0 (:$ arm::fulltag-misc)) ; tag it, return it
    771695  (bx lr))
    772696
     
    775699(defarmlapfunction %%make-disposable ((ptr arg_y) (vector arg_z))
    776700  (check-nargs 2)
    777   (subi imm0 vector arm::fulltag-misc) ; imm0 is addr = vect less tag
    778   (lhz imm1 -2 imm0)   ; get delta
     701  (sub imm0 vector (:$ arm::fulltag-misc)) ; imm0 is addr = vect less tag
     702  (ldrh imm1 (:@ imm0 (:$ -2)))   ; get delta
    779703  (sub imm0 imm0 imm1)  ; vector addr (less tag)  - delta is orig addr
    780   (str imm0 arm::macptr.address ptr)
    781   (bx lr))
    782 
    783 #+arm-target
     704  (str imm0 (:@ ptr (:$ arm::macptr.address)))
     705  (bx lr))
     706
    784707(defarmlapfunction %vect-data-to-macptr ((vect arg_y) (ptr arg_z))
    785708  ;; put address of vect data in macptr.  For all vector types
    786709  ;; other than DOUBLE-FLOAT (or vectors thereof), the first byte
    787   ;; of data is at PPC32::MISC-DATA-OFFSET; for the double-float
    788   ;; types, it's at PPC32::MISC-DFLOAT-OFFSET.
     710  ;; of data is at ARM::MISC-DATA-OFFSET; for the double-float
     711  ;; types, it's at ARM::MISC-DFLOAT-OFFSET.
    789712  (extract-subtag imm0 vect)
    790   (cmpwi cr0 imm0 ppc32::subtag-double-float-vector)
    791   (cmpwi cr1 imm0 ppc32::subtag-double-float)
    792   (addi temp0 vect ppc32::misc-data-offset)
    793   (beq cr0 @dfloat)
    794   (beq cr1 @dfloat)
    795   (stw temp0 ppc32::macptr.address arg_z)
    796   (bx lr)
    797   @dfloat
    798   (addi temp0 vect ppc32::misc-dfloat-offset)
    799   (stw temp0 ppc32::macptr.address arg_z)
    800   (bx lr))
    801 
    802 
    803 
    804 
     713  (cmp imm0 (:$ arm::subtag-double-float-vector))
     714  (cmpne imm0 (:$ arm::subtag-double-float))
     715  (addne temp0 vect (:$ arm::misc-data-offset))
     716  (addeq temp0 vect (:$ arm::misc-dfloat-offset))
     717  (str temp0 (:@ arg_z (:$ arm::macptr.address)))
     718  (bx lr))
    805719
    806720
    807721(defarmlapfunction %current-db-link ()
    808   (ldr arg_z arm::tcr.db-link arm::rcontext)
     722  (ldr arg_z (:@ arm::rcontext (:$ arm::tcr.db-link)))
    809723  (bx lr))
    810724
    811725(defarmlapfunction %no-thread-local-binding-marker ()
    812   (li arg_z arm::subtag-no-thread-local-binding)
    813   (bx lr))
    814 
    815 
     726  (mov arg_z (:$ arm::subtag-no-thread-local-binding))
     727  (bx lr))
    816728
    817729
     
    821733  (check-nargs 2)
    822734  (macptr-ptr imm0 src)
    823   (str imm0 arm::tcr.safe-ref-address arm::rcontext)
    824   (ldr imm0 0 imm0)                     ; may fault
    825   (str imm0 arm::macptr.address dest)
     735  (str imm0 (:@ arm::rcontext (:$ arm::tcr.safe-ref-address)))
     736  (ldr imm0 (:@ imm0 (:$ 0)))                     ; may fault
     737  (str imm0 (:@ dest (:$ arm::macptr.address)))
    826738  (bx lr))
    827739
     
    831743;;; That's maintained in r2 on LinuxPPC32, and not maintained
    832744;;; in a GPR on DarwinPPC32
     745#+huh
    833746(defarmlapfunction %get-os-context ()
    834   #+ppc64-target (mr arg_z 13)
    835   #+linuxppc32-target (mr arg_z 2)
    836   #+darinppc32-target (mr arg_z 0)
    837   (bx lr))
    838 
     747  #+ppc64-target (mov arg_z 13)
     748  #+linuxppc32-target (mov arg_z 2)
     749  #+darinppc32-target (mov arg_z 0)
     750  (bx lr))
     751
     752#+bad-idea
    839753(defarmlapfunction %check-deferred-gc ()
    840754  (ldr imm0 arm::tcr.flags arm::rcontext)
     
    845759  (li arg_z t)
    846760  (bx lr))
     761
     762#+later
     763(progn
    847764
    848765(defarmlapfunction %%tcr-interrupt ((target arg_z))
     
    942859  (li arg_z nil)
    943860  (bx lr))
    944  
     861); #+later
     862
    945863
    946864; end of arm-misc.lisp
Note: See TracChangeset for help on using the changeset viewer.