Changeset 9488
 Timestamp:
 May 15, 2008, 4:50:14 PM (13 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/ia32/level0/X86/X8632/x8632bignum.lisp
r9400 r9488 372 372 (xx mm3) 373 373 (yy mm4) 374 (rr mm5) 374 375 (j imm0)) 375 376 (movl (@ x (% esp)) (% temp0)) … … 382 383 (movd (@ x8632::miscdataoffset (% temp0) (% j)) (% yy)) ;y[j] 383 384 (pmuludq (% xx) (% yy)) 384 (paddq (% cc) (% yy)) 385 (movd (% yy) (@ x8632::miscdataoffset (% temp1) (% i))) ;store r[i] 386 (movq (% yy) (% cc)) 387 (psrlq ($ 32) (% cc)) ;carry high digit 385 ;; 64bit product now in %yy 386 (movd (@ x8632::miscdataoffset (% temp1) (% i)) (% rr)) 387 ;; add in digit from r[i] 388 (paddq (% yy) (% rr)) 389 ;; add in carry 390 (paddq (% cc) (% rr)) 391 (movd (% rr) (@ x8632::miscdataoffset (% temp1) (% i))) ;update r[i] 392 (movq (% rr) (% cc)) 393 (psrlq ($ 32) (% cc)) ;get carry digit into low word 388 394 (addl ($ '1) (% i)) 389 395 (addl ($ '1) (% j)) … … 802 808 (int ($ 3))) 803 809 810 ;;; If x[i] = y[j], return the all ones digit (as two halves). 811 ;;; Otherwise, compute floor x[i]x[i1] / y[j]. 804 812 (defx8632lapfunction %floor99 ((xstk 8) (xidx 4) #(ra 0)# 805 813 (yptr arg_y) (yidx arg_z)) 806 (int ($ 3))) 814 (pop (% temp0)) 815 (pop (% imm0)) 816 (pop (% temp1)) 817 (discardreservedframe) 818 (push (% temp1)) 819 (movl (% imm0) (% temp1)) 820 (movl (@ (% temp0) (% temp1)) (% imm0)) ;x[i] 821 (cmpl (% imm0) (@ (% yptr) (% yidx))) ;y[j] 822 (jne @more) 823 (pushl ($ '#xffff)) 824 (pushl ($ '#xffff)) 825 (lea (@ '2 (% esp)) (% temp0)) 826 (setnargs 2) 827 (jmpsubprim .SPvalues) 828 @more 829 (markasimm edx) ;aka temp1 (contains a fixnum) 830 (movl (@ 4 (% temp0) (% temp1)) (% eax)) ;low digit 831 (movl (@ (% temp0) (% temp1)) (% edx)) ;high digit 832 (divl (@ (% yptr) (% yidx))) 833 (markasnode edx) 834 ;; extract and push high half of quotient 835 (movl ($ ( #x10000)) (% arg_y)) 836 (andl (% eax) (% arg_y)) 837 (shrl ($ ( 16 x8632::fixnumshift)) (% arg_y)) 838 (push (% arg_y)) 839 ;; extract and push low half 840 (shrl ($ 16) (% eax)) 841 (shll ($ x8632::fixnumshift) (% eax)) 842 (push (% eax)) 843 (setnargs 2) 844 (lea (@ '2 (% esp)) (% temp0)) 845 (jmpsubprim .SPvalues)) 807 846 808 847 (defx8632lapfunction %multiplyandadd1 ((xhigh 16)
Note: See TracChangeset
for help on using the changeset viewer.