Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


Diff of /src/compiler/x86-64/insts.lisp [0e6564] .. [645161] Maximize Restore

  Switch to side-by-side view

--- a/src/compiler/x86-64/insts.lisp
+++ b/src/compiler/x86-64/insts.lisp
@@ -1949,7 +1949,14 @@
    (let ((size (matching-operand-size operand1 operand2)))
      (maybe-emit-operand-size-prefix segment size)
      (labels ((xchg-acc-with-something (acc something)
-                (if (and (not (eq size :byte)) (register-p something))
+                (if (and (not (eq size :byte))
+                         (register-p something)
+                         ;; Don't use the short encoding for XCHG EAX, EAX
+                         ;; as the processor interprets that as NOP while
+                         ;; XCHG EAX, EAX is specified to clear the upper
+                         ;; half of RAX.
+                         (not (and (= (tn-offset something) eax-offset)
+                                   (eq size :dword))))
                       (maybe-emit-rex-for-ea segment something acc)
                       (emit-byte-with-reg segment