Changeset 9539 for branches/ia32/level-0


Ignore:
Timestamp:
May 16, 2008, 11:19:52 PM (11 years ago)
Author:
rme
Message:

Implement bignum-shift-right-loop-1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ia32/level-0/X86/X8632/x8632-bignum.lisp

    r9489 r9539  
    693693  (single-value-return 5))
    694694
     695;;; shift bignum right by i words plus nbits bits.
     696(defx8632lapfunction bignum-shift-right-loop-1 ((nbits 12) (result 8)
     697                                                (bignum 4) #|(ra 0)|#
     698                                                (res-len-1 arg_y)
     699                                                (i arg_z))
     700  (movl (@ nbits (% esp)) (% imm0))
     701  (sarl ($ x8632::fixnumshift) (% imm0))
     702  (movd (% imm0) (% mm7))               ;shift count
     703
     704  (movl (@ result (% esp)) (% temp0))
     705  (movl (@ bignum (% esp)) (% temp1))
     706  (push (% res-len-1))
     707  (xorl (% arg_y) (% arg_y))            ;index into result
     708  (jmp @test)
     709  @loop
     710  (movq (@ x8632::misc-data-offset (% temp1) (% i)) (% mm0)) ;b[i+1] || b[i]
     711  (psrlq (% mm7) (% mm0))
     712  (movd (% mm0) (@ x8632::misc-data-offset (% temp0) (% arg_y)))
     713  (addl ($ '1) (% i))
     714  (addl ($ '1) (% arg_y))
     715  @test
     716  (cmpl (@ (% esp)) (% arg_y))          ;compare to res-len-1
     717  (jne @loop)
     718  (addl ($ x8632::node-size) (% esp))
     719  @finish
     720  (movd (@ x8632::misc-data-offset (% temp1) (% i)) (% mm0)) ;last digit of b
     721  (psrad (% mm7) (% mm0))
     722  (movd (% mm0) (@ x8632::misc-data-offset (% temp0) (% arg_y)))
     723  (single-value-return 5))
     724
    695725(defx8632lapfunction %logcount-complement ((bignum arg_y) (i arg_z))
    696726  (mark-as-imm temp0)
Note: See TracChangeset for help on using the changeset viewer.