0.pre7.82:
[sbcl.git] / src / compiler / alpha / static-fn.lisp
index 6a32c42..026b910 100644 (file)
@@ -1,25 +1,17 @@
-;;; -*- Package: ALPHA -*-
-;;;
-;;; **********************************************************************
-;;; 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 VOPs and macro magic necessary to call static
-;;; functions.
-;;;
-;;; Written by William Lott.
-;;; Converted by Sean Hallgren.
-;;;
-(in-package "SB!VM")
-
+;;;; VOPs and macro magic for calling static functions
 
+;;;; 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")
 
-(define-vop (static-function-template)
+(define-vop (static-fun-template)
   (:save-p t)
   (:policy :safe)
   (:variant-vars symbol)
   (:temporary (:sc any-reg :offset ocfp-offset) ocfp)
   (:temporary (:sc control-stack :offset nfp-save-offset) nfp-save))
 
-
 (eval-when  (:compile-toplevel :load-toplevel :execute)
 
-
-(defun static-function-template-name (num-args num-results)
-  (intern (format nil "~:@(~R-arg-~R-result-static-function~)"
+(defun static-fun-template-name (num-args num-results)
+  (intern (format nil "~:@(~R-arg-~R-result-static-fun~)"
                  num-args num-results)))
 
-
 (defun moves (src dst)
   (collect ((moves))
     (do ((dst dst (cdr dst))
@@ -49,7 +38,7 @@
       (moves `(move ,(car src) ,(car dst))))
     (moves)))
 
-(defun static-function-template-vop (num-args num-results)
+(defun static-fun-template-vop (num-args num-results)
   (assert (and (<= num-args register-arg-count)
               (<= num-results register-arg-count))
          (num-args num-results)
@@ -78,8 +67,8 @@
          (args `(,arg-name
                  :scs (any-reg descriptor-reg null zero)
                  :target ,(nth i (temp-names))))))
-      `(define-vop (,(static-function-template-name num-args num-results)
-                   static-function-template)
+      `(define-vop (,(static-fun-template-name num-args num-results)
+                   static-fun-template)
         (:args ,@(args))
         ,@(temps)
         (:results ,@(results))
@@ -88,7 +77,7 @@
                 (cur-nfp (current-nfp-tn vop)))
             ,@(moves (arg-names) (temp-names))
             (inst li (fixnumize ,num-args) nargs)
-            (inst ldl entry-point (static-function-offset symbol) null-tn)
+            (inst ldl entry-point (static-fun-offset symbol) null-tn)
             (when cur-nfp
               (store-stack-tn nfp-save cur-nfp))
             (inst move cfp-tn ocfp)
               (maybe-load-stack-nfp-tn cur-nfp nfp-save temp))
             ,@(moves (temp-names) (result-names))))))))
 
-
-) ; eval-when (compile load eval)
-
+) ; EVAL-WHEN
 
 (expand
  (collect ((templates (list 'progn)))
    (dotimes (i register-arg-count)
-     (templates (static-function-template-vop i 1)))
+     (templates (static-fun-template-vop i 1)))
    (templates)))
 
-
-(defmacro define-static-function (name args &key (results '(x)) translate
+(defmacro define-static-fun (name args &key (results '(x)) translate
                                       policy cost arg-types result-types)
   `(define-vop (,name
-               ,(static-function-template-name (length args)
-                                               (length results)))
+               ,(static-fun-template-name (length args)
+                                          (length results)))
      (:variant ',name)
-     (:note ,(format nil "static-function ~@(~S~)" name))
+     (:note ,(format nil "static-fun ~@(~S~)" name))
      ,@(when translate
         `((:translate ,translate)))
      ,@(when policy