Index: /branches/ia32/compiler/X86/X8632/x8632-vinsns.lisp
===================================================================
--- /branches/ia32/compiler/X86/X8632/x8632-vinsns.lisp	(revision 8230)
+++ /branches/ia32/compiler/X86/X8632/x8632-vinsns.lisp	(revision 8231)
@@ -502,19 +502,13 @@
   ((:pred = (:apply %hard-regspec-value tag) x8632::eax)
    ;; accumulator
-   (andb (:$b x8632::tagmask) (:%accb tag))
-   (cmpb (:$b x8632::tag-misc) (:%accb tag)))
-  ((:and (:pred > (:apply %hard-regspec-value tag) x8632::eax)
-	 (:pred <= (:apply %hard-regspec-value tag) x8632::ebx))
-   ;; other register that can be treated as a byte
-   (andb (:$b x8632::tagmask) (:%b tag))
-   (cmpb (:$b x8632::tag-misc) (:%b tag)))
-  ((:pred > (:apply %hard-regspec-value tag) x8632::ebx)
-   ;; non-byte register
-   (andl (:$l x8632::tagmask) (:%l tag))
+   (andl (:$b x8632::tagmask) (:%accl tag))
+   (cmpl (:$b x8632::tag-misc) (:%accl tag)))
+  ((:pred > (:apply %hard-regspec-value tag) x8632::eax)
+   (andl (:$b x8632::tagmask) (:%l tag))
    (cmpl (:$b x8632::tag-misc) (:%l tag)))
   (jne :have-tag)
-  (movl (:@ x8632::misc-subtag-offset (:%l object)) (:%l tag))
+  (movb (:@ x8632::misc-subtag-offset (:%l object)) (:%b tag))
   :have-tag
-  (cmpl (:$b tagval) (:%l tag))
+  (cmpb (:$b tagval) (:%b tag))
   (je.pt :ok)
   (uuo-error-reg-not-tag (:%l object) (:$ub tagval))
@@ -2950,27 +2944,25 @@
                              ((tag :u8)
                               (entry (:label 1))))
+  ;; tag is almost certainly going to be eax, which is
+  ;; the same as nargs.  we need to preserve nargs.
+  (pushl (:%l x8632::nargs.l))
   (movl (:%l x8632::temp0) (:%l tag))
   ((:pred = (:apply %hard-regspec-value tag) x8632::eax)
    ;; accumulator
-   (andb (:$b x8632::tagmask) (:%accb tag))
-   (cmpb (:$b x8632::tag-misc) (:%accb tag)))
-  ((:and (:pred > (:apply %hard-regspec-value tag) x8632::eax)
-	 (:pred <= (:apply %hard-regspec-value tag) x8632::ebx))
-   ;; other register that can be treated as a byte
-   (andb (:$b x8632::tagmask) (:%b tag))
-   (cmpb (:$b x8632::tag-misc) (:%b tag)))
-  ((:pred > (:apply %hard-regspec-value tag) x8632::ebx)
-   ;; non-byte register
-   (andl (:$l x8632::tagmask) (:%l tag))
+   (andl (:$b x8632::tagmask) (:%accl tag))
+   (cmpl (:$b x8632::tag-misc) (:%accl tag)))
+  ((:pred > (:apply %hard-regspec-value tag) x8632::eax)
+   (andl (:$b x8632::tagmask) (:%l tag))
    (cmpl (:$b x8632::tag-misc) (:%l tag)))
   (jne :bad)
-  (movl (:@ x8632::misc-subtag-offset (:%l x8632::temp0)) (:%l tag))
-  (cmpl (:$b x8632::subtag-function) (:%l tag))
+  (movb (:@ x8632::misc-subtag-offset (:%l x8632::temp0)) (:%b tag))
+  (cmpb (:$b x8632::subtag-function) (:%b tag))
   (cmovel (:%l x8632::temp0) (:%l x8632::xfn))
   (je :call)
-  (cmpl (:$b x8632::subtag-symbol) (:%l tag))
+  (cmpb (:$b x8632::subtag-symbol) (:%b tag))
   (cmovel (:%l x8632::symbol.fcell (:%l x8632::fname)) (:%l x8632::xfn))
   (jne :bad)
   :call
+  (popl (:%l x8632::nargs))
   (:talign 5)
   (call (:%l x8632::xfn))
@@ -2982,27 +2974,22 @@
                                   ()
                                   ((tag :u8)))
+  (pushl (:%l x8632::nargs.l))
   (movl (:%l x8632::temp0) (:%l tag))
   ((:pred = (:apply %hard-regspec-value tag) x8632::eax)
-   ;; accumulator
-   (andb (:$b x8632::tagmask) (:%accb tag))
-   (cmpb (:$b x8632::tag-misc) (:%accb tag)))
-  ((:and (:pred > (:apply %hard-regspec-value tag) x8632::eax)
-	 (:pred <= (:apply %hard-regspec-value tag) x8632::ebx))
-   ;; other register that can be treated as a byte
-   (andb (:$b x8632::tagmask) (:%b tag))
-   (cmpb (:$b x8632::tag-misc) (:%b tag)))
-  ((:pred > (:apply %hard-regspec-value tag) x8632::ebx)
-   ;; non-byte register
-   (andl (:$l x8632::tagmask) (:%l tag))
+   (andl (:$b x8632::tagmask) (:%accl tag))
+   (cmpl (:$b x8632::tag-misc) (:%accl tag)))
+  ((:pred > (:apply %hard-regspec-value tag) x8632::eax)
+   (andl (:$b x8632::tagmask) (:%l tag))
    (cmpl (:$b x8632::tag-misc) (:%l tag)))
   (jne :bad)
-  (movl (:@ x8632::misc-subtag-offset (:%l x8632::temp0)) (:%l tag))
-  (cmpl (:$b x8632::subtag-function) (:%l tag))
+  (movb (:@ x8632::misc-subtag-offset (:%l x8632::temp0)) (:%b tag))
+  (cmpb (:$b x8632::subtag-function) (:%b tag))
   (cmovel (:%l x8632::temp0) (:%l x8632::xfn))
   (je :go)
-  (cmpl (:$b x8632::subtag-symbol) (:%l tag))
+  (cmpb (:$b x8632::subtag-symbol) (:%b tag))
   (cmovel (:%l x8632::symbol.fcell (:%l x8632::fname)) (:%l x8632::xfn))
   (jne :bad)
   :go
+  (popl (:%l x8632::nargs.l))
   (jmp (:%l x8632::xfn))
   :bad
