source: branches/arm/compiler/subprims.lisp @ 13741

Last change on this file since 13741 was 13067, checked in by rme, 10 years ago

Update copyright notices.

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