Changeset 14089 for branches


Ignore:
Timestamp:
Jul 30, 2010, 3:46:09 PM (9 years ago)
Author:
gb
Message:

%MULTIPLY-AND-ADD-HARDER-LOOP: need to preserve X, which is kind of
the idea here.

File:
1 edited

Legend:

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

    r14013 r14089  
    204204        (xptr temp2)
    205205        (yidx temp1)
    206         (yptr temp0))
     206        (yptr temp0)
     207        (xsave 4))
     208    (mov imm1 (:$ 0))
     209    (movw imm0 (:$ (logior (ash 1 arm::num-subtag-bits) arm::subtag-u32-vector)))
     210    (stmdb (:! sp) (imm0 imm1))
    207211    (ldr xptr (:@ vsp (:$ x-ptr)))
    208212    (mov residx (:lsl residx (:$ 2)))
    209213    (add residx residx (:$ (ash arm::misc-data-offset 2)))
    210     (ldr x (:@ xptr (:asr residx (:$ 2))))
     214    (ldr x (:@ xptr (:asr residx (:$ 2))))   
    211215    (ldr yptr (:@ vsp (:$ y-ptr)))
    212216    (vpush1 rcontext)
     217    (str x (:@ sp (:$ xsave)))
    213218    (mov yidx (:$ (ash arm::misc-data-offset 2))) ; init yidx 0
    214219    (movs prod-h (:$ 0)) ; init carry 0, mumble 0
     
    219224    (umull x prod-h x y)
    220225    (adc prod-h prod-h (:$ 0))
     226    (ldr x (:@ sp (:$ xsave)))
    221227    (ldr y (:@ resptr (:asr residx (:$ 2))))
    222228    (adds prod-l prod-l y)
     
    229235    (str prod-h (:@ resptr (:asr residx (:$ 2))))
    230236    (vpop1 rcontext)
    231     (add vsp vsp (:$ 8))     
     237    (add vsp vsp (:$ 8))
     238    (add sp sp (:$ 8))
    232239    (bx lr)))
    233240
     
    404411    (add temp shift (:$ -1))
    405412    (ands shift shift temp)
    406     (add arg_z arg_z (:$ '1))
     413    (add arg_z arg_z '1)
    407414    (bne @loop)
    408415    (bx lr)))
Note: See TracChangeset for help on using the changeset viewer.