Index: /trunk/ccl/lisp-kernel/x86-spentry64.s
===================================================================
--- /trunk/ccl/lisp-kernel/x86-spentry64.s	(revision 5571)
+++ /trunk/ccl/lisp-kernel/x86-spentry64.s	(revision 5572)
@@ -172,9 +172,9 @@
 	__(je,pt 1f)
 	__(uuo_error_reg_not_fixnum(Rarg_z))
-1:	__(movq %arg_z,%imm0)
-	__(shlq $num_subtag_bits-fixnumshift,%imm0)
-	__(movb $-1,%imm0_b)
-	__(cmpq misc_header_offset(%arg_y),%imm0)
-	__(jb 2f)
+1:	__(movq misc_header_offset(%arg_y),%imm0)
+        __(xorb %imm0_b,%imm0_b)
+	__(shrq $num_subtag_bits-fixnumshift,%imm0)
+	__(cmpq %imm0,%arg_z)
+	__(jb,pt 2f)
 	__(uuo_error_vector_bounds(Rarg_z,Rarg_y))
 2:	__(movb misc_subtag_offset(%arg_y),%imm1_b)
@@ -578,8 +578,8 @@
 	__(je,pt 1f)
 	__(uuo_error_reg_not_fixnum(Rarg_z))
-1:	__(movq %arg_z,%imm0)
-	__(shlq $num_subtag_bits-fixnumshift,%imm0)
-	__(movb $255,%imm0_b)
-	__(cmpq misc_header_offset(%arg_y),%imm0)
+1:      __(movq misc_header_offset(%arg_y),%imm0)
+        __(xorb %imm0_b,%imm0_b)
+	__(shrq $num_subtag_bits-fixnumshift,%imm0)
+	__(cmpq %imm0,%arg_z)
 	__(jb 2f)
 	__(uuo_error_vector_bounds(Rarg_z,Rarg_y))
@@ -597,8 +597,8 @@
 	__(je,pt 1f)
 	__(uuo_error_reg_not_fixnum(Rarg_y))
-1:	__(movq %arg_y,%imm0)
-	__(shlq $num_subtag_bits-fixnumshift,%imm0)
-	__(movb $255,%imm0_b)
-	__(cmpq misc_header_offset(%arg_x),%imm0)
+1:	__(movq misc_header_offset(%arg_x),%imm0)
+        __(xorb %imm0_b,%imm0_b)
+	__(shrq $num_subtag_bits-fixnumshift,%imm0)
+	__(cmpq %imm0,%arg_y)
 	__(jb 2f)
 	__(uuo_error_vector_bounds(Rarg_y,Rarg_x))
@@ -616,8 +616,8 @@
 	__(je,pt 1f)
 	__(uuo_error_reg_not_fixnum(Rarg_y))
-1:	__(movq %arg_y,%imm0)
-	__(shlq $num_subtag_bits-fixnumshift,%imm0)
-	__(movb $255,%imm0_b)
-	__(cmpq misc_header_offset(%arg_x),%imm0)
+1:	__(movq misc_header_offset(%arg_x),%imm0)
+        __(xorb %imm0_b,%imm0_b)
+	__(shrq $num_subtag_bits-fixnumshift,%imm0)
+	__(cmpq %imm0,%arg_y)
 	__(jb 2f)
 	__(uuo_error_vector_bounds(Rarg_y,Rarg_x))
