source: trunk/source/compiler/subprims.lisp @ 13066

Last change on this file since 13066 was 13066, checked in by rme, 11 years ago

Change "OpenMCL" to "Clozure CL" in comments and docstrings.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
Line 
1;;;-*- Mode: Lisp; Package: CCL -*-
2;;;
3;;;   Copyright (C) 1994-2001 Digitool, Inc
4;;;   This file is part of Clozure CL. 
5;;;
6;;;   Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
7;;;   License , known as the LLGPL and distributed with Clozure CL as the
8;;;   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
9;;;   which is distributed with Clozure CL as the file "LGPL".  Where these
10;;;   conflict, the preamble takes precedence. 
11;;;
12;;;   Clozure CL is referenced in the preamble as the "LIBRARY."
13;;;
14;;;   The LLGPL is also available online at
15;;;   http://opensource.franz.com/preamble.html
16
17(in-package "CCL")
18
19(defstruct subprimitive-info
20  name
21  offset
22  nailed-down
23  argument-mask
24  registers-used
25  )
26
27(defmethod make-load-form ((s subprimitive-info) &optional env)
28  (make-load-form-saving-slots s :environment env))
29
30(defmethod print-object ((s subprimitive-info) stream)
31  (print-unreadable-object (s stream :type t)
32    (format stream "~A @ #x~x" 
33            (subprimitive-info-name s)
34            (subprimitive-info-offset s))))
35
36(defun %subprim-name->offset (name table)
37  (let* ((sprec (find name table 
38                      :test #'string-equal 
39                      :key #'subprimitive-info-name)))
40    (if sprec
41      (subprimitive-info-offset sprec)
42      (error "subprim named ~s not found." name))))
43
44(defun subprim-name->offset (name &optional (backend *target-backend*))
45  (+ (backend-lowmem-bias backend)
46     (%subprim-name->offset name  (arch::target-subprims-table
47                                   (backend-target-arch backend)))))
48
49(provide "SUBPRIMS")
Note: See TracBrowser for help on using the repository browser.