Changeset 9605 for branches/ia32/level-0


Ignore:
Timestamp:
May 28, 2008, 2:01:35 AM (11 years ago)
Author:
rme
Message:

%bignum-count-trailing-zero-bits: compute something that actually
resembles a count of trailing zero bits.

File:
1 edited

Legend:

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

    r9567 r9605  
    431431    (vector-length bignum temp0)
    432432    (xorl (% i) (% i))
    433     (movl ($ '32) (% zeros))
     433    (xorl (% zeros) (% zeros))
    434434    @loop
    435435    (movl (@ x8632::misc-data-offset (% bignum) (% i)) (% imm0))
     436    (testl (% imm0) (% imm0))
     437    (jnz @last)
     438    (addl ($ '32) (% zeros))
    436439    (addl ($ '1) (% i))
    437     (addl ($ '32) (% zeros))
    438     (testl (% imm0) (% imm0))
    439     (jz @loop)
     440    (cmpl (% len) (% i))
     441    (jb @loop)
     442    @last
    440443    ;; now count zero bits in digit
    441     (bsrl (% imm0) (% imm0))
    442     (box-fixnum imm0 imm0)
     444    (bsfl (% imm0) (% imm0))
     445    (shll ($ x8632::fixnumshift) (% imm0))
    443446    (addl (% imm0) (% zeros))
    444447    (movl (% zeros) (% arg_z))
Note: See TracChangeset for help on using the changeset viewer.