From 3df2616c45138dcf8bb877b9f5666644bc69d190 Mon Sep 17 00:00:00 2001
From: dtc <dtc>
Date: Tue, 28 Sep 1999 16:07:50 +0000
Subject: [PATCH] Fix for the CMP instruction which was intended to have
 accepted a constant TN as an argument, but which failed when comparing a
 constant TN and integer arguments. For example this can occur when the
 integer is the static symbol Nil. Noted by Andy Freeman.

---
 compiler/x86/insts.lisp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/compiler/x86/insts.lisp b/compiler/x86/insts.lisp
index 88dd8799d..fa54a39b4 100644
--- a/compiler/x86/insts.lisp
+++ b/compiler/x86/insts.lisp
@@ -7,7 +7,7 @@
 ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/insts.lisp,v 1.16 1998/02/24 09:59:21 dtc Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/insts.lisp,v 1.17 1999/09/28 16:07:50 dtc Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -1152,7 +1152,7 @@
      ((integerp src)
       (cond ((and (not (eq size :byte)) (<= -128 src 127))
 	     (emit-byte segment #b10000011)
-	     (emit-ea segment dst opcode)
+	     (emit-ea segment dst opcode allow-constants)
 	     (emit-byte segment src))
 	    ((accumulator-p dst)
 	     (emit-byte segment
@@ -1164,7 +1164,7 @@
 	     (emit-sized-immediate segment size src))
 	    (t
 	     (emit-byte segment (if (eq size :byte) #b10000000 #b10000001))
-	     (emit-ea segment dst opcode)
+	     (emit-ea segment dst opcode allow-constants)
 	     (emit-sized-immediate segment size src))))
      ((register-p src)
       (emit-byte segment
-- 
GitLab