Changeset 9368 for branches/ia32/level-0


Ignore:
Timestamp:
May 6, 2008, 5:08:17 PM (11 years ago)
Author:
rme
Message:

%add-with-carry: get outgoing carry right

fix-digit-logandc1: implement

File:
1 edited

Legend:

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

    r9322 r9368  
    108108  ;; if i not nil, get a[i]
    109109  (cmovnel (@ x8632::misc-data-offset (% arg_y) (% arg_z)) (% temp0))
    110   (movl ($ '1) (% arg_z))               ;for outgoing carry
    111   (xorl (% arg_y) (% arg_y))
     110  (xorl (% arg_z) (% arg_z))
    112111  ;; I can't think of a better way to set CF at the moment.
    113112  ;; NEG would be ideal, but we don't have a free imm reg.
    114113  (btl ($ x8632::fixnumshift) (@ c (% esp))) ;CF = lsb of carry fixnum
    115114  (adc (% temp0) (% imm0))
     115  (setc (% arg_z.bh))
     116  (sarl ($ (- 8 x8632::fixnumshift)) (% arg_z)) ;outgoing carry
    116117  (mark-as-node temp0)
    117118  (movl (@ r (% esp)) (% temp0))
    118119  (movl (@ k (% esp)) (% temp1))
    119120  (movl (% imm0) (@ x8632::misc-data-offset (% temp0) (% temp1)))
    120   (cmovnc (% arg_y) (% arg_z))          ;zero outgoing carry if CF = 0
    121121  (single-value-return 7))
    122122
     
    559559  (single-value-return 3))
    560560
     561(defx8632lapfunction fix-digit-logandc1 ((fix 4) #|(ra 0)|# (big arg_y) (dest arg_z)) ; index 0
     562  (mark-as-imm temp0)
     563  (movl (@ fix (% esp)) (% temp0))
     564  (unbox-fixnum temp0 temp0)
     565  (movl (@ x8632::misc-data-offset (% big)) (% imm0))
     566  (not (% temp0))
     567  (andl (% temp0) (% imm0))
     568  (mark-as-node temp0)
     569  (cmpl ($ x8632::nil-value) (% dest))
     570  (jne @store)
     571  (box-fixnum imm0 arg_z)
     572  (single-value-return 3)
     573  @store
     574  (movl (% imm0) (@ x8632::misc-data-offset (% dest)))
     575  (single-value-return 3))
     576
    561577(defx8632lapfunction fix-digit-logand ((fix 4) #|(ra 0)|# (big arg_y) (dest arg_z)) ; index 0
    562578  (mark-as-imm temp0)
Note: See TracChangeset for help on using the changeset viewer.