diff --git a/compiler/sparc/type-vops.lisp b/compiler/sparc/type-vops.lisp index 61f17f33bfaeca4fae23cfb6712953273a716969..a647df044f957de85cc8ebf3ddf385843fd38726 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