Changeset 7907
 Timestamp:
 Dec 13, 2007, 8:40:00 PM (13 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/ia32/level0/X86/X8632/x8632bignum.lisp
r7904 r7907 36 36 (movl ($ x8632::nilvalue) (% arg_z)) 37 37 (testl (% imm0) (% imm0)) 38 (cmov el (% imm0) (% arg_z))38 (cmovzl (% imm0) (% arg_z)) 39 39 (singlevaluereturn)) 40 40 … … 76 76 77 77 (defx8632lapfunction %digit0orplusp ((bignum arg_y) (idx arg_z)) 78 ( testl (@ x8632::miscdataoffset (% bignum) (% idx)) (% imm0))78 (movl (@ x8632::miscdataoffset (% bignum) (% idx)) (% imm0)) 79 79 (movl ($ x8632::nilvalue) (% temp0)) 80 (cmovbl (% temp0) (% arg_z)) 80 (testl (% imm0) (% imm0)) 81 (cmovsl (% temp0) (% arg_z)) 81 82 (singlevaluereturn)) 82 83 83 84 ;;; For oddp, evenp 84 85 (defx8632lapfunction %bignumoddp ((bignum arg_z)) 85 ( testb ($ 1) (@ x8632::miscdataoffset (% bignum)))86 (movl (@ x8632::miscdataoffset (% bignum)) (% imm0)) 86 87 (movl ($ x8632::nilvalue) (% temp0)) 87 (cmovel (% temp0) (% arg_z)) 88 (btl ($ 0) (% imm0)) ;copy bit 0 to carry flag 89 (cmovncl (% temp0) (% arg_z)) 88 90 (singlevaluereturn)) 89 91 … … 91 93 (vectorlength bignum imm0) 92 94 (movl (@ ( 4 x8632::miscdataoffset) (% bignum)) (% imm0)) 93 (testl ($ #x8000000) (% imm0))94 95 (movl ($ x8632::nilvalue) (% temp0)) 95 (cmovnel (% temp0) (% arg_z)) 96 (cmpl ($ 1) (% imm0)) 97 (cmovbl (% temp0) (% arg_z)) 96 98 (singlevaluereturn)) 97 99 … … 104 106 (vectorlength bignum imm0) 105 107 (movl (@ ( 4 x8632::miscdataoffset) (% bignum) (% imm0)) (% imm0)) 106 (testl ($ #x8000000) (% imm0))107 108 (movl ($ x8632::nilvalue) (% temp0)) 108 (cmovel (% temp0) (% arg_z)) 109 (testl (% imm0) (% imm0)) 110 (cmovnsl (% temp0) (% arg_z)) 109 111 (singlevaluereturn)) 110 112 … … 128 130 ;; unboxed a or a[i] now in temp0 129 131 ;; unboxed b or b[j] now in imm0 130 ( xorl (% arg_z) (% arg_z))132 (movl ($ x8632::fixnumone) (% arg_z)) ;for outgoing carry 131 133 (movl (@ c (% esp)) (% arg_y)) 132 134 (testl (% arg_y) (% arg_y)) ;clears carry flag 133 135 (jz @add) 136 (xorl (% arg_y) (% arg_y)) 134 137 (stc) 135 138 @add 139 ;; arg_y = 0, arg_z = fixnum 1 136 140 (adc (% temp0) (% imm0)) 137 141 (movl (@ r (% esp)) (% temp0)) 138 142 (movl (@ k (% esp)) (% temp1)) 139 143 (movl (% imm0) (@ x8632::miscdataoffset (% temp0) (% temp1))) 140 (adc ($ 0) (% imm0)) ;propagate carry flag 141 (boxfixnum imm0 arg_z) 144 (cmovnc (% arg_y) (% arg_z)) ;outgoing carry 142 145 (markasnode temp0) 143 146 (singlevaluereturn 7)) … … 161 164 ;; unboxed a or a[i] now in temp0 162 165 ;; unboxed b or b[j] now in imm0 163 ( xorl (% arg_z) (% arg_z))166 (movl ($ x8632::fixnumone) (% arg_z)) ;for outgoing carry 164 167 (movl (@ borrow (% esp)) (% arg_y)) 165 168 (testl (% arg_y) (% arg_y)) ;clears carry flag 166 169 (jz @sub) 170 (xorl (% arg_y) (% arg_y)) 167 171 (stc) 168 172 @sub 173 ;; arg_y = 0, arg_z = fixnum 1 169 174 (sbb (% imm0) (% temp0)) 170 175 (movl (@ r (% esp)) (% temp0)) 171 176 (movl (@ k (% esp)) (% temp1)) 172 177 (movl (% imm0) (@ x8632::miscdataoffset (% temp0) (% temp1))) 173 (adc ($ 0) (% imm0)) ;propagate carry flag 174 (boxfixnum imm0 arg_z) 178 (cmovnc (% arg_y) (% arg_z)) ;outgoing carry 175 179 (markasnode temp0) 176 180 (singlevaluereturn 7))
Note: See TracChangeset
for help on using the changeset viewer.