Changeset 15578 for trunk/source/level0
 Timestamp:
 Jan 13, 2013, 11:52:02 AM (7 years ago)
 Location:
 trunk/source/level0
 Files:

 4 edited
Legend:
 Unmodified
 Added
 Removed

trunk/source/level0/ARM/armbignum.lisp
r15555 r15578 261 261 (str imm1 (:@ arg_z (:$ arm::miscdataoffset))) 262 262 (bx lr)) 263 263 264 (defarmlapfunction %multiplyandaddfixnumloop ((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::miscdataoffset)) 273 (mov carry (:$ 0)) 274 (b @test) 275 @loop 276 (unboxfixnum 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 264 293 265 294 
trunk/source/level0/PPC/PPC32/ppc32bignum.lisp
r13067 r15578 299 299 (stw imm1 ppc32::miscdataoffset arg_z) 300 300 (blr)) 301 302 (defppclapfunction %multiplyandaddfixnumloop ((len64 0) (x arg_x) (y arg_y) (result arg_z)) 303 (let ((carry imm4) 304 (iidx imm3) 305 (unboxedy imm0) 306 (i temp0) 307 (hi imm2) 308 (rlen temp1)) 309 (vpop rlen) 310 (li carry 0) 311 (li iidx ppc32::miscdataoffset) 312 (li i 0) 313 (b @test) 314 @loop 315 (unboxfixnum unboxedy y) 316 (lwzx imm1 x iidx) 317 (mulhwu hi imm1 unboxedy) 318 (mullw imm0 imm1 unboxedy) 319 (addc imm0 imm0 carry) 320 (addze carry hi) 321 (stwx imm0 result iidx) 322 (la iidx 4 iidx) 323 (la i '1 i) 324 @test 325 (cmpw i rlen) 326 (blt @loop) 327 (stwx carry result iidx) 328 (blr))) 301 329 302 330 (defppclapfunction %floor ((q 4) (r 0) (numhigh arg_x) (numlow arg_y) (denomarg arg_z)) 
trunk/source/level0/X86/X8632/x8632bignum.lisp
r15454 r15578 387 387 (singlevaluereturn 5))) 388 388 389 390 (defx8632lapfunction %multiplyandaddfixnumloop ((len 8) (x 4) #(ra 0)# (y arg_y) (result arg_z)) 391 (let ((savey mm0) 392 (savei mm1) 393 (carry temp0) 394 (i temp1) 395 (rx arg_y)) 396 (unboxfixnum y imm0) 397 (movd (% imm0) (% savey)) 398 (markasimm edx) 399 (markasimm ebx) 400 (mov (@ x (% esp)) (% rx)) 401 (xorl (% carry) (% carry)) 402 (xorl (% i) (% i)) 403 @loop 404 (movd (% i) (% savei)) 405 (movd (% savey) (% eax)) 406 (mull (@ x8632::miscdataoffset (% rx) (% i))) 407 (addl (% carry) (% eax)) 408 (adcl ($ 0) (% edx)) 409 (movl (% edx) (% carry)) 410 (movd (% savei) (% i)) 411 (movl (% eax) (@ x8632::miscdataoffset (% result) (% i))) 412 (addl ($ 4) (% i)) 413 (cmpl (% i) (@ len (% esp))) 414 (jne @loop) 415 (movl (% carry) (@ x8632::miscdataoffset (% result) (% i))) 416 (markasnode temp1) 417 (markasnode temp0) 418 (singlevaluereturn 4))) 419 420 389 421 ;; multiply x[i] by y and add to result starting at digit i 390 422 (defx8632lapfunction %multiplyandaddharderloop2 
trunk/source/level0/l0bignum32.lisp
r14119 r15578 734 734 (declare (type bignumtype bignum) 735 735 (type bignumindex bignumlen)) 736 (withsmallbignumbuffers ((carrydigit) 737 (resultdigit)) 738 (dotimes (i bignumlen (%setdigit result bignumlen carrydigit)) 739 (%setdigit result i 740 (%multiplyandadd resultdigit carrydigit bignum i fixnum)))) 736 (%multiplyandaddfixnumloop bignumlen bignum fixnum result) 741 737 (when negateres 742 738 (negatebignuminplace result))
Note: See TracChangeset
for help on using the changeset viewer.