Skip to content
Snippets Groups Projects
Commit 034a0e01 authored by wlott's avatar wlott
Browse files

Implement check-fixnum using taddcctv and check-list using tcc.

parent 929fb85f
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment