Index: /trunk/source/level-0/X86/X8664/x8664-bignum.lisp
===================================================================
--- /trunk/source/level-0/X86/X8664/x8664-bignum.lisp	(revision 13418)
+++ /trunk/source/level-0/X86/X8664/x8664-bignum.lisp	(revision 13419)
@@ -332,4 +332,36 @@
     (single-value-return)))
 
-
-
+;;; Do LOGIOR on the N 32-bit words in A and B, storing the result in
+;;; C.  (It's legal and desirable to do this more than 32 bits at a time.)
+
+(defx86lapfunction %bignum-logior ((n 8) #|ra 0|# (a arg_x) (b arg_y) (c arg)z)
+  (movq (@ n (% rsp)) (% imm0))
+  (shrq (% imm0))
+  (jmp @test)
+  @loop
+  (movl (@ x8664::misc-data-offset (% a) (% imm0)) (%l imm1))
+  (orl (@ x8664::misc-data-offset (% b) (% imm0)) (%l imm1))
+  (movl (%l imm1) (@ x8664::misc-data-offset (% c) (% imm0)))
+  (subq ($  4) (% imm0))
+  @test
+  (jne @loop)
+  (single-value-return 3))
+
+
+
+;;; Do LOGAND on the N 32-bit words in A and B, storing the result in
+;;; C.  (It's legal and desirable to do this more than 32 bits at a time.)
+
+(defx86lapfunction %bignum-logand ((n 8) #|ra 0|# (a arg_x) (b arg_y) (c arg)z)
+  (movq (@ n (% rsp)) (% imm0))
+  (shrq (% imm0))
+  (jmp @test)
+  @loop
+  (movl (@ x8664::misc-data-offset (% a) (% imm0)) (%l imm1))
+  (andl (@ x8664::misc-data-offset (% b) (% imm0)) (%l imm1))
+  (movl (%l imm1) (@ x8664::misc-data-offset (% c) (% imm0)))
+  (subq ($  4) (% imm0))
+  @test
+  (jne @loop)
+  (single-value-return 3))
+
Index: /trunk/source/level-0/l0-bignum64.lisp
===================================================================
--- /trunk/source/level-0/l0-bignum64.lisp	(revision 13418)
+++ /trunk/source/level-0/l0-bignum64.lisp	(revision 13419)
@@ -1286,8 +1286,5 @@
   (declare (type bignum-type a b res)
 	   (type bignum-index len-a))
-  (dotimes (i len-a)
-    (setf (bignum-ref res i)
-          (logand (the fixnum (bignum-ref a i))
-                  (the fixnum (bignum-ref b i)))))
+  (%bignum-logand len-a a b res)
   (%normalize-bignum-macro res))
 
@@ -1301,8 +1298,5 @@
   (declare (type bignum-type a b res)
 	   (type bignum-index len-a len-b))
-  (dotimes (i len-a)
-    (setf (bignum-ref res i)
-          (logand (the fixnum (bignum-ref a i))
-                              (the fixnum (bignum-ref b i)))))
+  (%bignum-logand len-a a b res)
   (bignum-replace res b :start1 len-a :start2 len-a :end1 len-b :end2 len-b)
   (%normalize-bignum-macro res))
@@ -1432,8 +1426,5 @@
   (declare (type bignum-type a b res)
 	   (type bignum-index len-a len-b))
-  (dotimes (i len-a)
-    (setf (bignum-ref res i)
-          (logior (the fixnum (bignum-ref a i))
-                  (the fixnum (bignum-ref b i)))))
+  (%bignum-logior len-a a b res)
   (if (not (eql len-a len-b))
     (bignum-replace res b :start1 len-a :start2 len-a :end1 len-b :end2 len-b))
@@ -1449,8 +1440,5 @@
   (declare (type bignum-type a b res)
 	   (type bignum-index len-a len-b))
-  (dotimes (i len-a)
-    (setf (bignum-ref res i)
-          (logior (the fixnum (bignum-ref a i))
-                  (the fixnum (bignum-ref b i)))))
+  (%bignum-logior len-a a b res)
   (do ((i len-a (1+ i)))
       ((= i len-b))
