0.pre7.58:
[sbcl.git] / src / compiler / alpha / sap.lisp
index 5fd43d9..66c3e30 100644 (file)
@@ -1,41 +1,29 @@
-;;; -*- Package: VM; 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.
-;;;
-
-;;;
-;;; **********************************************************************
-;;;
-;;;    This file contains the Alpha VM definition of SAP operations.
-;;;
-;;; Written by William Lott.
-;;; Alpha conversion by Sean Hallgren.
-;;;
-(in-package "SB!VM")
+;;;; the Alpha VM definition of SAP 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 SAP to an untagged representation.
-;;;
-
 (define-vop (move-to-sap)
   (:args (x :scs (descriptor-reg)))
   (:results (y :scs (sap-reg)))
   (:note "system area pointer indirection")
   (:generator 1
-    (loadq y x sap-pointer-slot other-pointer-type)))
-
-;;;
+    (loadq y x sap-pointer-slot other-pointer-lowtag)))
 (define-move-vop move-to-sap :move
   (descriptor-reg) (sap-reg))
 
-
 ;;; Move an untagged SAP to a tagged representation.
-;;;
 (define-vop (move-from-sap)
   (:args (x :scs (sap-reg) :target sap))
   (:temporary (:scs (sap-reg) :from (:argument 0)) sap)
   (:note "system area pointer allocation")
   (:generator 20
     (move x sap)
-    (with-fixed-allocation (y ndescr sap-type sap-size)
-      (storeq sap y sap-pointer-slot other-pointer-type))))
-;;;
+    (with-fixed-allocation (y ndescr sap-widetag sap-size)
+      (storeq sap y sap-pointer-slot other-pointer-lowtag))))
 (define-move-vop move-from-sap :move
   (sap-reg) (descriptor-reg))
 
-
-;;; Move untagged sap values.
-;;;
+;;; Move untagged SAP values.
 (define-vop (sap-move)
   (:args (x :target y
            :scs (sap-reg)
   (:affected)
   (:generator 0
     (move x y)))
-;;;
 (define-move-vop sap-move :move
   (sap-reg) (sap-reg))
 
-
-;;; Move untagged sap arguments/return-values.
-;;;
+;;; Move untagged SAP arguments/return-values.
 (define-vop (move-sap-argument)
   (:args (x :target y
            :scs (sap-reg))
        (move x y))
       (sap-stack
        (storeq x fp (tn-offset y))))))
-;;;
 (define-move-vop move-sap-argument :move-argument
   (descriptor-reg sap-reg) (sap-reg))
 
-
 ;;; Use standard MOVE-ARGUMENT + coercion to move an untagged sap to a
 ;;; descriptor passing location.
-;;;
 (define-move-vop move-argument :move-argument
   (sap-reg) (descriptor-reg))
-
-
 \f
 ;;;; SAP-INT and INT-SAP
 
   (:policy :fast-safe)
   (:generator 1
     (move int sap)))
-
-
 \f
 ;;;; POINTER+ and POINTER-
 
   (:result-types signed-num)
   (:generator 1
     (inst subq ptr1 ptr2 res)))
-
 \f
 ;;;; mumble-SYSTEM-REF and mumble-SYSTEM-SET
 
     single-reg single-float :single)
   (def-system-ref-and-set sap-ref-double %set-sap-ref-double
     double-reg double-float :double))
-
 \f
-;;; Noise to convert normal lisp data objects into SAPs.
+;;; noise to convert normal Lisp data objects into SAPs
 
 (define-vop (vector-sap)
   (:translate vector-sap)
   (:result-types system-area-pointer)
   (:generator 2
     (inst lda sap
-         (- (* vector-data-offset word-bytes) other-pointer-type)
+         (- (* vector-data-offset word-bytes) other-pointer-lowtag)
          vector)))