From 6e4b411893ce81fd30f053f12474c2eeb986e5fa Mon Sep 17 00:00:00 2001
From: Raymond Toy <toy.raymond@gmail.com>
Date: Thu, 21 Feb 2013 22:21:10 -0800
Subject: [PATCH] Remove the :i486 feature.

code/misc.lisp::
* Remove :i486 from *features*

code/multi-proc.lisp::
* Change :i486 to :x86 on the off chance that multi-proc will be
  ported to other archs.

compiler/x86/cell.lisp::
compiler/x86/macros.lisp::
compiler/x86/memory.lisp::
* Remove guard on backend-featurep :i486 since we got rid of :i486 and
  have it always enabled now.
---
 src/code/misc.lisp           |  3 ---
 src/code/multi-proc.lisp     | 26 +++++++++++++-------------
 src/compiler/x86/cell.lisp   |  1 -
 src/compiler/x86/macros.lisp |  2 --
 src/compiler/x86/memory.lisp |  2 --
 5 files changed, 13 insertions(+), 21 deletions(-)

diff --git a/src/code/misc.lisp b/src/code/misc.lisp
index 7c8358781..50639d203 100644
--- a/src/code/misc.lisp
+++ b/src/code/misc.lisp
@@ -134,9 +134,6 @@
 
 
 ;;; Register various Lisp features
-#+i486
-(sys:register-lisp-runtime-feature :i486)
-
 #+pentium
 (sys:register-lisp-runtime-feature :pentium)
 
diff --git a/src/code/multi-proc.lisp b/src/code/multi-proc.lisp
index 2aed7a3bb..8b2df04ac 100644
--- a/src/code/multi-proc.lisp
+++ b/src/code/multi-proc.lisp
@@ -1886,10 +1886,10 @@
   (process-wait whostate
 		#'(lambda ()
 		    (declare (optimize (speed 3)))
-		    #-i486
+		    #-x86
 		    (unless (lock-process lock)
 		      (setf (lock-process lock) *current-process*))
-		    #+i486
+		    #+x86
 		    (null (kernel:%instance-set-conditional
 			   lock 2 nil *current-process*)))))
 
@@ -1904,10 +1904,10 @@
    whostate timeout
    #'(lambda ()
        (declare (optimize (speed 3)))
-       #-i486
+       #-x86
        (unless (lock-process lock)
 	 (setf (lock-process lock) *current-process*))
-       #+i486
+       #+x86
        (null (kernel:%instance-set-conditional
 	      lock 2 nil *current-process*)))))
 
@@ -1915,7 +1915,7 @@
 ;;;
 ;;; Atomically seize a lock if it's free.
 ;;;
-#-i486
+#-x86
 (defun seize-lock (lock)
   (declare (type lock lock)
 	   (optimize (speed 3)))
@@ -1943,9 +1943,9 @@
 		      (when (and (error-check-lock-p ,lock) ,have-lock)
 			(error "Dead lock"))
 		      (when (or ,have-lock
-				 #+i486 (null (kernel:%instance-set-conditional
+				 #+x86 (null (kernel:%instance-set-conditional
 					       ,lock 2 nil *current-process*))
-				 #-i486 (seize-lock ,lock)
+				 #-x86 (seize-lock ,lock)
 				 (if ,timeout
 				     (lock-wait-with-timeout
 				      ,lock ,whostate ,timeout)
@@ -1956,19 +1956,19 @@
 		      (when (and (error-check-lock-p ,lock) ,have-lock)
 		        (error "Dead lock"))
 		      (unless (or ,have-lock
-				 #+i486 (null (kernel:%instance-set-conditional
+				 #+x86 (null (kernel:%instance-set-conditional
 					       ,lock 2 nil *current-process*))
-				 #-i486 (seize-lock ,lock))
+				 #-x86 (seize-lock ,lock))
 			(lock-wait ,lock ,whostate))
 		      ,@body))
 		  (t
 		   `(when (or (and (recursive-lock-p ,lock) ,have-lock)
-			      #+i486 (null (kernel:%instance-set-conditional
+			      #+x86 (null (kernel:%instance-set-conditional
 					    ,lock 2 nil *current-process*))
-			      #-i486 (seize-lock ,lock))
+			      #-x86 (seize-lock ,lock))
 		      ,@body)))
 	(unless ,have-lock
-	  #+i486 (kernel:%instance-set-conditional
+	  #+x86 (kernel:%instance-set-conditional
 		  ,lock 2 *current-process* nil)
-	  #-i486 (when (eq (lock-process ,lock) *current-process*)
+	  #-x86 (when (eq (lock-process ,lock) *current-process*)
 		   (setf (lock-process ,lock) nil)))))))
diff --git a/src/compiler/x86/cell.lisp b/src/compiler/x86/cell.lisp
index 248714900..9283a7851 100644
--- a/src/compiler/x86/cell.lisp
+++ b/src/compiler/x86/cell.lisp
@@ -383,7 +383,6 @@
   (:temporary (:sc descriptor-reg :offset eax-offset
 		   :from (:argument 2) :to :result :target result)  eax)
   (:results (result :scs (descriptor-reg any-reg)))
-  (:guard (backend-featurep :i486))
   (:policy :fast-safe)
   (:generator 5
     (move eax old-value)
diff --git a/src/compiler/x86/macros.lisp b/src/compiler/x86/macros.lisp
index ca2c2677e..d4659c2ad 100644
--- a/src/compiler/x86/macros.lisp
+++ b/src/compiler/x86/macros.lisp
@@ -517,7 +517,6 @@
 		    :from (:argument 2) :to :result :target result) eax)
        (:results (result :scs ,scs))
        (:result-types ,el-type)
-       (:guard (backend-featurep :i486))
        (:generator 5
 	 (move eax old-value)
 	 (inst cmpxchg (make-ea :dword :base object :index index :scale 1
@@ -537,7 +536,6 @@
 		    :from (:argument 1) :to :result :target result)  eax)
        (:results (result :scs ,scs))
        (:result-types ,el-type)
-       (:guard (backend-featurep :i486))
        (:generator 4
 	 (move eax old-value)
 	 (inst cmpxchg (make-ea :dword :base object
diff --git a/src/compiler/x86/memory.lisp b/src/compiler/x86/memory.lisp
index 18d5f3796..7fc1a10e1 100644
--- a/src/compiler/x86/memory.lisp
+++ b/src/compiler/x86/memory.lisp
@@ -93,7 +93,6 @@
 		   :from (:argument 1) :to :result :target result)  eax)
   (:variant-vars offset lowtag)
   (:results (result :scs (descriptor-reg any-reg)))
-  (:guard (backend-featurep :i486))
   (:generator 4
     (move eax old-value)
     (inst cmpxchg (make-ea :dword :base object
@@ -163,7 +162,6 @@
   (:variant-vars base lowtag)
   (:results (result :scs (descriptor-reg any-reg)))
   (:info offset)
-  (:guard (backend-featurep :i486))
   (:generator 4
     (move eax old-value)
     (inst cmpxchg (make-ea :dword :base object
-- 
GitLab