Index: /trunk/ccl/compiler/X86/X8664/x8664-vinsns.lisp
===================================================================
--- /trunk/ccl/compiler/X86/X8664/x8664-vinsns.lisp	(revision 5262)
+++ /trunk/ccl/compiler/X86/X8664/x8664-vinsns.lisp	(revision 5263)
@@ -2036,9 +2036,5 @@
 
 
-(define-x8664-vinsn mem-set-constant-doubleword (()
-                                                   ((val :s32const)
-                                                    (dest :address)
-                                                    (offset :s64)))
-   (movq (:$l val) (:@ (:%q dest) (:%q offset))))
+
 
 
Index: /trunk/ccl/compiler/X86/x862.lisp
===================================================================
--- /trunk/ccl/compiler/X86/x862.lisp	(revision 5262)
+++ /trunk/ccl/compiler/X86/x862.lisp	(revision 5263)
@@ -3925,4 +3925,10 @@
           (and offval (%i> (integer-length offval) 31) (setq offval nil))
           (and intval (%i> (integer-length intval) 31) (setq intval nil))
+          (and intval
+               (case size
+                 (2
+                  (if (>= intval 32768) (setq intval (- intval 65536))))
+                 (1
+                  (if (>= intval 128) (setq intval (- intval 256))))))
           (cond (intval
                  (cond (offval
Index: /trunk/ccl/compiler/optimizers.lisp
===================================================================
--- /trunk/ccl/compiler/optimizers.lisp	(revision 5262)
+++ /trunk/ccl/compiler/optimizers.lisp	(revision 5263)
@@ -517,5 +517,5 @@
             (cond ((nx-form-typep integer 'fixnum env)
                    `(logand ,(byte-mask size)
-                            (ash ,integer ,(- position))))
+                     (the fixnum (ash ,integer ,(- position)))))
                   (t `(load-byte ,size ,position ,integer)))))
          ((and (consp byte)
@@ -526,5 +526,5 @@
             (if (and (nx-form-typep integer 'fixnum env) (fixnump position))
               ;; I'm not sure this is worth doing
-              `(logand (byte-mask ,size) (ash ,integer ,(- position)))
+              `(logand (byte-mask ,size) (the fixnum (ash ,integer ,(- position))))
               ;; this IS worth doing
               `(load-byte ,size ,position ,integer))))
