Ignore:
Timestamp:
Jan 13, 2013, 11:52:02 AM (7 years ago)
Author:
gb
Message:

Faster bignum x fixnum multiplication for 32-bit architectures.

File:
1 edited

Legend:

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

    r15555 r15578  
    261261  (str imm1 (:@ arg_z  (:$ arm::misc-data-offset)))
    262262  (bx lr))
    263  
     263
     264(defarmlapfunction %multiply-and-add-fixnum-loop ((len 0) (x arg_x) (y arg_y) (result arg_z))
     265  (let ((rlen temp0)
     266        (idx rcontext)
     267        (carry imm2)
     268        (lo imm0)
     269        (hi imm1))
     270    (ldr rlen (:@ vsp (:$ len)))
     271    (str rcontext (:@ vsp (:$ 0)))
     272    (mov idx (:$ arm::misc-data-offset))
     273    (mov carry (:$ 0))
     274    (b @test)
     275    @loop
     276    (unbox-fixnum imm0 y)
     277    (ldr imm1 (:@ x idx))
     278    (umull lo hi imm0 imm1)
     279    (adds lo lo carry)
     280    (adc carry hi (:$ 0))
     281    (str lo (:@ result idx))
     282    (add idx idx (:$ 4))
     283    @test
     284    (subs rlen rlen '1)
     285    (bge @loop)
     286    (str carry (:@ result idx))
     287    (vpop1 rcontext)
     288    (bx lr)))
     289
     290
     291   
     292   
    264293
    265294
Note: See TracChangeset for help on using the changeset viewer.