-;;; -*- Package: C; Log: C.Log -*-
-;;;
-;;; **********************************************************************
-;;; This code was written as part of the CMU Common Lisp project at
-;;; Carnegie Mellon University, and has been placed in the public domain.
-;;;
-
-;;;
-;;; **********************************************************************
-;;;
-;;; $Header$
-;;;
-;;; This file contains the RT VM definition of character operations.
-;;;
-;;; Written by Rob MacLachlan
-;;; Converted for the Alpha by Sean Hallgren.
-;;;
-(in-package "SB!VM")
-
+;;;; the Alpha VM definition of character operations
+;;;; This software is part of the SBCL system. See the README file for
+;;;; more information.
+;;;;
+;;;; This software is derived from the CMU CL system, which was
+;;;; written at Carnegie Mellon University and released into the
+;;;; public domain. The software is in the public domain and is
+;;;; provided with absolutely no warranty. See the COPYING and CREDITS
+;;;; files for more information.
+(in-package "SB!VM")
\f
-;;;; Moves and coercions:
+;;;; moves and coercions
;;; Move a tagged char to an untagged representation.
-;;;
(define-vop (move-to-base-char)
(:args (x :scs (any-reg descriptor-reg)))
(:results (y :scs (base-char-reg)))
(:generator 1
- (inst srl x sb!vm:type-bits y)))
+ (inst srl x sb!vm:n-widetag-bits y)))
;;;
(define-move-vop move-to-base-char :move
(any-reg descriptor-reg) (base-char-reg))
-
;;; Move an untagged char to a tagged representation.
-;;;
(define-vop (move-from-base-char)
(:args (x :scs (base-char-reg)))
(:results (y :scs (any-reg descriptor-reg)))
(:generator 1
- (inst sll x sb!vm:type-bits y)
- (inst bis y sb!vm:base-char-type y)))
+ (inst sll x sb!vm:n-widetag-bits y)
+ (inst bis y sb!vm:base-char-widetag y)))
;;;
(define-move-vop move-from-base-char :move
(base-char-reg) (any-reg descriptor-reg))
;;; Move untagged base-char values.
-;;;
(define-vop (base-char-move)
(:args (x :target y
:scs (base-char-reg)
(define-move-vop base-char-move :move
(base-char-reg) (base-char-reg))
-
;;; Move untagged base-char arguments/return-values.
-;;;
-(define-vop (move-base-char-argument)
+(define-vop (move-base-char-arg)
(:args (x :target y
:scs (base-char-reg))
(fp :scs (any-reg)
(base-char-stack
(storew x fp (tn-offset y))))))
;;;
-(define-move-vop move-base-char-argument :move-argument
+(define-move-vop move-base-char-arg :move-arg
(any-reg base-char-reg) (base-char-reg))
-;;; Use standard MOVE-ARGUMENT + coercion to move an untagged base-char
+;;; Use standard MOVE-ARG + coercion to move an untagged base-char
;;; to a descriptor passing location.
;;;
-(define-move-vop move-argument :move-argument
+(define-move-vop move-arg :move-arg
(base-char-reg) (any-reg descriptor-reg))
-
-
\f
-;;;; Other operations:
+;;;; other operations
(define-vop (char-code)
(:translate char-code)
(:result-types base-char)
(:generator 1
(inst srl code 2 res)))
-
\f
-;;; Comparison of base-chars.
-;;;
+;;;; comparison of BASE-CHARs
+
(define-vop (base-char-compare)
(:args (x :scs (base-char-reg))
(y :scs (base-char-reg)))