1.0.28.65: fix compiling with *PROFILE-HASH-CACHE* set to T
[sbcl.git] / src / compiler / x86-64 / insts.lisp
index ec48990..ae0f2b8 100644 (file)
         (emit-mod-reg-r/m-byte segment #b11 reg (reg-tn-encoding thing)))
        (stack
         ;; Convert stack tns into an index off RBP.
-        (let ((disp (- (* (1+ (tn-offset thing)) n-word-bytes))))
+        (let ((disp (frame-byte-offset (tn-offset thing))))
           (cond ((<= -128 disp 127)
                  (emit-mod-reg-r/m-byte segment #b01 reg #b101)
                  (emit-byte segment disp))
 
 (define-instruction rep (segment)
   (:emitter
-   (emit-byte segment #b11110010)))
+   (emit-byte segment #b11110011)))
 
 (define-instruction repe (segment)
   (:printer byte ((op #b11110011)))
   (:printer byte ((op #b11000010) (imm nil :type 'imm-word-16))
             '(:name :tab imm))
   (:emitter
-   (cond (stack-delta
+   (cond ((and stack-delta (not (zerop stack-delta)))
           (emit-byte segment #b11000010)
           (emit-word segment stack-delta))
          (t