From bb679eef36d19fde73d316e3afdc960ec5d85e78 Mon Sep 17 00:00:00 2001
From: wlott <wlott>
Date: Wed, 31 Jul 1991 07:06:38 +0000
Subject: [PATCH] Changed register-p to allow TN's in the ZERO and NULL SCs, so
 that every vop doesn't have to special case them themselves.

---
 compiler/mips/insts.lisp | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/compiler/mips/insts.lisp b/compiler/mips/insts.lisp
index f7b46807b..81c2db981 100644
--- a/compiler/mips/insts.lisp
+++ b/compiler/mips/insts.lisp
@@ -7,11 +7,11 @@
 ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/insts.lisp,v 1.31 1991/05/24 19:41:42 wlott Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/insts.lisp,v 1.32 1991/07/31 07:06:38 wlott Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
-;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/insts.lisp,v 1.31 1991/05/24 19:41:42 wlott Exp $
+;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/insts.lisp,v 1.32 1991/07/31 07:06:38 wlott Exp $
 ;;;
 ;;; Description of the MIPS architecture.
 ;;;
@@ -101,11 +101,23 @@
 
 (defun register-p (object)
   (and (tn-p object)
-       (eq (sb-name (sc-sb (tn-sc object))) 'registers)))
+       (let* ((sc (tn-sc object))
+	      (sc-name (sc-name sc))
+	      (sb (sc-sb sc))
+	      (sb-name (sb-name sb)))
+	 (or (eq sc-name 'zero)
+	     (eq sc-name 'null)
+	     (eq sb-name 'registers)))))
+
+(defun tn-register-number (tn)
+  (sc-case tn
+    (zero zero-offset)
+    (null null-offset)
+    (t (tn-offset tn))))
 
 (define-argument-type register
   :type '(satisfies register-p)
-  :function tn-offset)
+  :function tn-register-number)
 
 (defun fp-reg-p (object)
   (and (tn-p object)
-- 
GitLab