source: branches/ia32/xdump/xx8664-fasload.lisp @ 14405

Last change on this file since 14405 was 5652, checked in by gb, 13 years ago

Move NIL up a page on x86-64 as well.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.1 KB
Line 
1;;;-*- Mode: Lisp; Package: CCL -*-
2;;;
3;;;   Copyright (C) 1994-2001 Digitool, Inc
4;;;   Portions copyright (C) 2001-2006 Clozure Associates
5;;;   This file is part of OpenMCL. 
6;;;
7;;;   OpenMCL is licensed under the terms of the Lisp Lesser GNU Public
8;;;   License , known as the LLGPL and distributed with OpenMCL as the
9;;;   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
10;;;   which is distributed with OpenMCL as the file "LGPL".  Where these
11;;;   conflict, the preamble takes precedence. 
12;;;
13;;;   OpenMCL 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(eval-when (:compile-toplevel :execute)
21  (require "FASLENV" "ccl:xdump;faslenv")
22  (require "X86-LAP"))
23
24(eval-when (:compile-toplevel :load-toplevel :execute)
25  (require "XFASLOAD" "ccl:xdump;xfasload"))
26
27(defun xload-x8664-lap-code (instructions)
28  (let* ((f (%define-x86-lap-function nil instructions)))
29    (if (= (typecode f) target::subtag-xfunction)
30      (uvref f 0)
31      f)))
32
33(defparameter *x8664-macro-apply-code*
34  #xc9cd0000000000)
35
36
37(defun x8664-fixup-macro-apply-code ()
38  *x8664-macro-apply-code*)
39
40
41(defparameter *x8664-closure-trampoline-code*
42  (xload-x8664-lap-code '((jmp-subprim  .SPcall-closure))))
43
44
45
46;;; For now, do this with a UUO so that the kernel can catch it.
47(defparameter *x8664-udf-code*
48  #xc7cd0000000000)
49
50
51(defun x8664-initialize-static-space ()
52  (xload-make-ivector *xload-static-space*
53                      (xload-target-subtype :unsigned-64-bit-vector) 
54                      (1- (/ 4096 8)))
55  (xload-make-cons *xload-target-nil* 0 *xload-static-space*)
56  (xload-make-cons 0 *xload-target-nil* *xload-static-space*))
57                     
58
59(defparameter *x8664-linux-xload-backend*
60  (make-backend-xload-info
61   :name  :linuxx8664
62   :macro-apply-code-function 'x8664-fixup-macro-apply-code
63   :closure-trampoline-code *x8664-closure-trampoline-code*
64   :udf-code *x8664-udf-code*
65   :default-image-name "ccl:ccl;x86-boot64"
66   :default-startup-file-name "level-1.lx64fsl"
67   :subdirs '("ccl:level-0;X86;X8664;" "ccl:level-0;X86;")
68   :compiler-target-name :linuxx8664
69   :image-base-address #x300000000000
70   :nil-relative-symbols x86::*x86-nil-relative-symbols*
71   :static-space-init-function 'x8664-initialize-static-space
72   :purespace-reserve (ash 1 30)
73   :static-space-address (ash 2 12)
74))
75
76
77(add-xload-backend *x8664-linux-xload-backend*)
78
79
80(defparameter *x8664-freebsd-xload-backend*
81  (make-backend-xload-info
82   :name  :freebsdx8664
83   :macro-apply-code-function 'x8664-fixup-macro-apply-code
84   :closure-trampoline-code *x8664-closure-trampoline-code*
85   :udf-code *x8664-udf-code*
86   :default-image-name "ccl:ccl;fx86-boot64"
87   :default-startup-file-name "level-1.fx64fsl"
88   :subdirs '("ccl:level-0;X86;X8664;" "ccl:level-0;X86;")
89   :compiler-target-name :freebsdx8664
90   :image-base-address #x300000000000
91   :nil-relative-symbols x86::*x86-nil-relative-symbols*
92   :static-space-init-function 'x8664-initialize-static-space
93   :purespace-reserve (ash 1 30)
94   :static-space-address (ash 2 12)
95))
96
97(add-xload-backend *x8664-freebsd-xload-backend*)
98
99(defparameter *x8664-darwin-xload-backend*
100  (make-backend-xload-info
101   :name  :darwinx8664
102   :macro-apply-code-function 'x8664-fixup-macro-apply-code
103   :closure-trampoline-code *x8664-closure-trampoline-code*
104   :udf-code *x8664-udf-code*
105   :default-image-name "ccl:ccl;x86-boot64.image"
106   :default-startup-file-name "level-1.dx64fsl"
107   :subdirs '("ccl:level-0;X86;X8664;" "ccl:level-0;X86;")
108   :compiler-target-name :darwinx8664
109   :image-base-address #x300000000000
110   :nil-relative-symbols x86::*x86-nil-relative-symbols*
111   :static-space-init-function 'x8664-initialize-static-space
112   :purespace-reserve (ash 1 30)
113   :static-space-address (ash 2 12)
114))
115
116(add-xload-backend *x8664-darwin-xload-backend*)
117
118#+x8664-target
119(progn
120  #+linux-target
121  (setq *xload-default-backend* *x8664-linux-xload-backend*)
122  #+freebsd-target
123  (setq *xload-default-backend* *x8664-freebsd-xload-backend*)
124  #+darwin-target
125  (setq *xload-default-backend* *x8664-darwin-xload-backend*))
126
127
128
129
Note: See TracBrowser for help on using the repository browser.