Changeset 10923 for trunk/source/level-0/X86/X8632/x8632-bignum.lisp
- Timestamp:
- Sep 30, 2008, 8:50:09 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/level-0/X86/X8632/x8632-bignum.lisp
r10575 r10923 217 217 218 218 (defx8632lapfunction %subtract-one ((high arg_y) (low arg_z)) 219 ( mark-as-imm temp0)219 (shll ($ (- 16 x8632::fixnumshift)) (% arg_y)) 220 220 (unbox-fixnum low imm0) 221 (movl (% high) (% temp0)) 222 (shll ($ (- 16 x8632::fixnumshift)) (% temp0)) 223 (orl (% imm0) (% temp0)) 224 (subl ($ 1) (% temp0)) 225 (movzwl (% temp0.w) (% imm0)) 226 (box-fixnum imm0 low) 227 (sarl ($ 16) (% temp0)) 228 (box-fixnum temp0 high) 229 (mark-as-node temp0) 221 ;; high half should always be clear... 222 ;;(movzwl (% imm0.w) (% imm0)) 223 (orl (% arg_y) (% imm0)) 224 (decl (% imm0)) 230 225 (movl (% esp) (% temp0)) 231 (push (% high)) 232 (push (% low)) 226 ;; extract and push high half 227 (movl ($ (- #x10000)) (% arg_y)) 228 (andl (% imm0) (% arg_y)) 229 (shrl ($ (- 16 x8632::fixnumshift)) (% arg_y)) 230 (push (% arg_y)) 231 ;; low half 232 (andl ($ #xffff) (% imm0)) 233 (shll ($ x8632::fixnumshift) (% imm0)) 234 (push (% imm0)) 235 (set-nargs 2) 233 236 (jmp-subprim .SPvalues)) 234 237 … … 261 264 (sbbl (% temp0) (% temp1)) 262 265 (setae (%b imm0)) ;resulting borrow (1 for no, 0 for yes) 266 (movzbl (%b imm0) (% imm0)) 263 267 (box-fixnum imm0 arg_z) 264 268 (movl (% temp1) (% imm0)) … … 935 939 (defx8632lapfunction %floor-99 ((x-stk 8) (xidx 4) #|(ra 0)|# 936 940 (yptr arg_y) (yidx arg_z)) 941 (pop (% temp1)) 942 (pop (% imm0)) 937 943 (pop (% temp0)) 938 (pop (% imm0))939 (pop (% temp1))940 944 (discard-reserved-frame) 941 (push (% temp 0))942 (movl (% imm0) (% temp 0))943 (movl (@ x8632::misc-data-offset (% temp 1) (% temp0)) (% imm0)) ;x[i]945 (push (% temp1)) 946 (movl (% imm0) (% temp1)) 947 (movl (@ x8632::misc-data-offset (% temp0) (% temp1)) (% imm0)) ;x[i] 944 948 (cmpl (% imm0) (@ x8632::misc-data-offset (% yptr) (% yidx))) ;y[j] 945 949 (jne @more) … … 951 955 @more 952 956 (mark-as-imm edx) ;aka temp1 (contains a fixnum) 953 (movl (@ (- x8632::misc-data-offset 4) (% temp 1) (% temp0)) (% eax)) ;low954 (movl (@ x8632::misc-data-offset (% temp 1) (% temp0)) (% edx)) ;high digit957 (movl (@ (- x8632::misc-data-offset 4) (% temp0) (% temp1)) (% eax)) ;low 958 (movl (@ x8632::misc-data-offset (% temp0) (% temp1)) (% edx)) ;high digit 955 959 (divl (@ x8632::misc-data-offset (% yptr) (% yidx))) 956 960 (mark-as-node edx)
Note: See TracChangeset
for help on using the changeset viewer.