From 195efba6ad8e9c99ce97c49458b2e02ca681ef77 Mon Sep 17 00:00:00 2001
From: wlott <wlott>
Date: Fri, 13 Jul 1990 12:01:36 +0000
Subject: [PATCH] Added get-closure-length, which is the same as
 get-header-data, except that it wants function-pointers instead of
 other-pointers.

---
 compiler/mips/system.lisp | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/compiler/mips/system.lisp b/compiler/mips/system.lisp
index 2e8b48d61..b1c44b6a6 100644
--- a/compiler/mips/system.lisp
+++ b/compiler/mips/system.lisp
@@ -7,7 +7,7 @@
 ;;; Scott Fahlman (FAHLMAN@CMUC). 
 ;;; **********************************************************************
 ;;;
-;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/system.lisp,v 1.28 1990/07/03 06:31:19 wlott Exp $
+;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/system.lisp,v 1.29 1990/07/13 12:01:36 wlott Exp $
 ;;;
 ;;;    MIPS VM definitions of various system hacking operations.
 ;;;
@@ -124,6 +124,16 @@
     (loadw res x 0 vm:other-pointer-type)
     (inst srl res res vm:type-bits)))
 
+(define-vop (get-closure-length)
+  (:translate get-closure-length)
+  (:policy :fast-safe)
+  (:args (x :scs (descriptor-reg)))
+  (:results (res :scs (unsigned-reg)))
+  (:result-types positive-fixnum)
+  (:generator 6
+    (loadw res x 0 vm:function-pointer-type)
+    (inst srl res res vm:type-bits)))
+
 (define-vop (set-header-data)
   (:translate set-header-data)
   (:policy :fast-safe)
-- 
GitLab