From 034a0e011bcaac2a4507fb5d9dc767d402e24702 Mon Sep 17 00:00:00 2001 From: wlott <wlott> Date: Mon, 17 Dec 1990 19:35:36 +0000 Subject: [PATCH] Implement check-fixnum using taddcctv and check-list using tcc. --- compiler/sparc/type-vops.lisp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/compiler/sparc/type-vops.lisp b/compiler/sparc/type-vops.lisp index 61f17f33b..a647df044 100644 --- a/compiler/sparc/type-vops.lisp +++ b/compiler/sparc/type-vops.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman (FAHLMAN@CMUC). ;;; ********************************************************************** ;;; -;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/type-vops.lisp,v 1.2 1990/12/06 18:16:58 ram Exp $ +;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/type-vops.lisp,v 1.3 1990/12/17 19:35:36 wlott Exp $ ;;; ;;; This file contains the VM definition of type testing and checking VOPs ;;; for the SPARC. @@ -64,14 +64,25 @@ ); eval-when (compile eval) -(def-type-vops fixnump check-fixnum fixnum object-not-fixnum-error - vm:even-fixnum-type vm:odd-fixnum-type) +(def-type-vops fixnump nil nil nil vm:even-fixnum-type vm:odd-fixnum-type) +(define-vop (check-fixnum check-type) + (:ignore temp) + (:generator 1 + (inst taddcctv result value zero-tn))) +(primitive-type-vop check-fixnum (:check) fixnum) + (def-type-vops functionp check-function function object-not-function-error vm:function-pointer-type) -(def-type-vops listp check-list list - object-not-list-error vm:list-pointer-type) +(def-type-vops listp nil nil nil vm:list-pointer-type) +(define-vop (check-list check-type) + (:generator 3 + (inst and temp value lowtag-mask) + (inst cmp temp list-pointer-type) + (inst t :ne (logior (ash (tn-offset value) 8) object-not-list-trap)) + (move result value))) +(primitive-type-vop check-list (:check) list) #+nil ;; ### Only after we have real structures. (def-type-vops structurep check-structure structure -- GitLab