Changeset 13419
- Timestamp:
- Jan 28, 2010, 4:56:41 PM (15 years ago)
- Location:
- trunk/source/level-0
- Files:
-
- 2 edited
-
X86/X8664/x8664-bignum.lisp (modified) (1 diff)
-
l0-bignum64.lisp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/level-0/X86/X8664/x8664-bignum.lisp
r13067 r13419 332 332 (single-value-return))) 333 333 334 335 334 ;;; Do LOGIOR on the N 32-bit words in A and B, storing the result in 335 ;;; C. (It's legal and desirable to do this more than 32 bits at a time.) 336 337 (defx86lapfunction %bignum-logior ((n 8) #|ra 0|# (a arg_x) (b arg_y) (c arg)z) 338 (movq (@ n (% rsp)) (% imm0)) 339 (shrq (% imm0)) 340 (jmp @test) 341 @loop 342 (movl (@ x8664::misc-data-offset (% a) (% imm0)) (%l imm1)) 343 (orl (@ x8664::misc-data-offset (% b) (% imm0)) (%l imm1)) 344 (movl (%l imm1) (@ x8664::misc-data-offset (% c) (% imm0))) 345 (subq ($ 4) (% imm0)) 346 @test 347 (jne @loop) 348 (single-value-return 3)) 349 350 351 352 ;;; Do LOGAND on the N 32-bit words in A and B, storing the result in 353 ;;; C. (It's legal and desirable to do this more than 32 bits at a time.) 354 355 (defx86lapfunction %bignum-logand ((n 8) #|ra 0|# (a arg_x) (b arg_y) (c arg)z) 356 (movq (@ n (% rsp)) (% imm0)) 357 (shrq (% imm0)) 358 (jmp @test) 359 @loop 360 (movl (@ x8664::misc-data-offset (% a) (% imm0)) (%l imm1)) 361 (andl (@ x8664::misc-data-offset (% b) (% imm0)) (%l imm1)) 362 (movl (%l imm1) (@ x8664::misc-data-offset (% c) (% imm0))) 363 (subq ($ 4) (% imm0)) 364 @test 365 (jne @loop) 366 (single-value-return 3)) 367 -
trunk/source/level-0/l0-bignum64.lisp
r13327 r13419 1286 1286 (declare (type bignum-type a b res) 1287 1287 (type bignum-index len-a)) 1288 (dotimes (i len-a) 1289 (setf (bignum-ref res i) 1290 (logand (the fixnum (bignum-ref a i)) 1291 (the fixnum (bignum-ref b i))))) 1288 (%bignum-logand len-a a b res) 1292 1289 (%normalize-bignum-macro res)) 1293 1290 … … 1301 1298 (declare (type bignum-type a b res) 1302 1299 (type bignum-index len-a len-b)) 1303 (dotimes (i len-a) 1304 (setf (bignum-ref res i) 1305 (logand (the fixnum (bignum-ref a i)) 1306 (the fixnum (bignum-ref b i))))) 1300 (%bignum-logand len-a a b res) 1307 1301 (bignum-replace res b :start1 len-a :start2 len-a :end1 len-b :end2 len-b) 1308 1302 (%normalize-bignum-macro res)) … … 1432 1426 (declare (type bignum-type a b res) 1433 1427 (type bignum-index len-a len-b)) 1434 (dotimes (i len-a) 1435 (setf (bignum-ref res i) 1436 (logior (the fixnum (bignum-ref a i)) 1437 (the fixnum (bignum-ref b i))))) 1428 (%bignum-logior len-a a b res) 1438 1429 (if (not (eql len-a len-b)) 1439 1430 (bignum-replace res b :start1 len-a :start2 len-a :end1 len-b :end2 len-b)) … … 1449 1440 (declare (type bignum-type a b res) 1450 1441 (type bignum-index len-a len-b)) 1451 (dotimes (i len-a) 1452 (setf (bignum-ref res i) 1453 (logior (the fixnum (bignum-ref a i)) 1454 (the fixnum (bignum-ref b i))))) 1442 (%bignum-logior len-a a b res) 1455 1443 (do ((i len-a (1+ i))) 1456 1444 ((= i len-b))
Note:
See TracChangeset
for help on using the changeset viewer.
