Changeset 9174
 Timestamp:
 Apr 17, 2008, 6:35:30 PM (11 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/ia32/level0/X86/X8632/x8632bignum.lisp
r9044 r9174 559 559 (singlevaluereturn 3)) 560 560 561 (defx8632lapfunction fixdigitlogand ((fix 4) #(ra 0)# (big arg_y) (dest arg_z)) ; index 0 562 (markasimm temp0) 563 (movl (@ fix (% esp)) (% temp0)) 564 (sarl ($ x8632::fixnumshift) (% temp0)) 565 (movl (@ x8632::miscdataoffset (% big)) (% imm0)) 566 (andl (% temp0) (% imm0)) 567 (markasnode temp0) 568 (cmpl ($ x8632::nilvalue) (% dest)) 569 (jne @store) 570 (boxfixnum imm0 arg_z) 571 (singlevaluereturn 3) 572 @store 573 (movl (% imm0) (@ x8632::miscdataoffset (% dest))) 574 (singlevaluereturn 3)) 575 576 561 577 (defx8632lapfunction digitlognotmove ((index 4) #(ra 0)# (source arg_y) (dest arg_z)) 562 578 (movl (@ index (% esp)) (% temp0)) … … 612 628 (singlevaluereturn 3))) 613 629 614 ;;; called from bignumashiftleftunaligned 615 (defx8632lapfunction bignumshiftleftloop ((nbits 12) (result 8) (bignum 4) #(ra 0)# (reslen1 arg_y) (j arg_z)) 616 (let ((r temp0) 617 (b temp1) 618 (bb mm2) 619 (bits mm3) 620 (tt mm4) 621 (remainingbits mm5)) 622 (movl (% j) (% imm0)) 623 (subl ($ '1) (% imm0)) 624 (pushl (% imm0)) ;digits 625 (movl (@ nbits (% esp)) (% imm0)) 626 (unboxfixnum imm0 imm0) 627 (movd (% imm0) (% bits)) ;shift count 628 (negl (% imm0)) 629 (addl ($ 32) (% imm0)) 630 (movd (% imm0) (% remainingbits)) 631 (movl (@ result (% esp)) (% r)) 632 (movl (@ bignum (% esp)) (% b)) 633 (xorl (% imm0) (% imm0)) 634 @loop 635 ;; bignum[i] 636 (movd (@ x8632::miscdataoffset (% b) (% imm0)) (% bb)) 637 (psrlq (% remainingbits) (% bb)) 638 ;; bignum[i+1] 639 (movd (@ (+ x8632::miscdataoffset 4) (% b) (% imm0)) (% tt)) 640 (psllq (% bits) (% tt)) 641 (por (% tt) (% bb)) 642 (movd (% bb) (@ x8632::miscdataoffset (% r) (% j))) 643 (addl ($ '1) (% imm0)) 644 (addl ($ '1) (% j)) 645 (cmpl (% j) (% reslen1)) 646 (jne @loop) 647 (movd (@ x8632::miscdataoffset (% bignum)) (% bb)) ;bignum[0] 648 (psllq (% bits) (% bb)) 649 (popl (% arg_y)) ;digits 650 (movd (% bb) (@ x8632::miscdataoffset (% r) (% arg_y))) 651 (movd (@ x8632::miscdataoffset (% bignum) (% imm0)) (% bb)) ;bignum[i] 652 (psrlq (% remainingbits) (% bb)) 653 (movd (% bb) (@ x8632::miscdataoffset (% r) (% j))) 654 (singlevaluereturn 5))) 630 (defx8632lapfunction bignumshiftleftloop ((nbits 12) (result 8) 631 (bignum 4) #(ra 0)# 632 (reslen1 arg_y) (j arg_z)) 633 (movl (@ nbits (% esp)) (% imm0)) 634 (sarl ($ x8632::fixnumshift) (% imm0)) 635 (movd (% imm0) (% mm7)) ;shift count 636 (subl ($ 32) (% imm0)) 637 (movd (% imm0) (% mm6)) ;remaining bits 638 (movl (@ result (% esp)) (% temp0)) 639 (movl (@ bignum (% esp)) (% temp1)) 640 (push (% arg_y)) 641 (xorl (% arg_y) (% arg_y)) ;i 642 (jmp @test) 643 @loop 644 (movd (@ x8632::miscdataoffset (% temp1) (% arg_y)) (% mm0)) ;b[i] 645 (psrlq (% mm6) (% mm0)) 646 (movd (@ (+ 4 x8632::miscdataoffset) (% temp1) (% arg_y)) (% mm1)) ;b[i+1] 647 (psllq (% mm7) (% mm1)) 648 (por (% mm1) (% mm0)) 649 (movd (% mm0) (@ x8632::miscdataoffset (% temp0) (% arg_z))) ;r[j] 650 (addl ($ '1) (% arg_y)) 651 (addl ($ '1) (% arg_z)) 652 @test 653 (cmpl (@ (% esp)) (% j)) ;pity reslen1 can't stay in a reg 654 (jne @loop) 655 (movd (@ x8632::miscdataoffset (% temp1) (% arg_y)) (% mm0)) ;b[i] 656 (psrlq (% mm6) (% mm0)) 657 (movd (% mm0) (@ x8632::miscdataoffset (% temp0) (% arg_z))) ;r[j] 658 ;; reconsititute "digits" arg to bignumashiftleftunaligned 659 (pop (% arg_z)) 660 (subl ($ '1) (% arg_z)) 661 (movd (@ x8632::miscdataoffset (% temp1)) (% mm0)) ;b[0] 662 (psllq (% mm7) (% mm0)) 663 (movd (% mm0) (@ x8632::miscdataoffset (% temp0) (% arg_z))) ;b[digits] 664 (singlevaluereturn 5)) 655 665 656 666 (defx8632lapfunction %logcountcomplement ((bignum arg_y) (i arg_z))
Note: See TracChangeset
for help on using the changeset viewer.