Change *restart-lisp-function* to a C symbol
[sbcl.git] / src / compiler / arm / parms.lisp
blob317f65b29bb2ecad0ec0754b10e0541f22f85982
1 ;;;; This file contains some parameterizations of various VM
2 ;;;; attributes for the ARM. This file is separate from other stuff so
3 ;;;; that it can be compiled and loaded earlier.
5 ;;;; This software is part of the SBCL system. See the README file for
6 ;;;; more information.
7 ;;;;
8 ;;;; This software is derived from the CMU CL system, which was
9 ;;;; written at Carnegie Mellon University and released into the
10 ;;;; public domain. The software is in the public domain and is
11 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
12 ;;;; files for more information.
14 (in-package "SB!VM")
16 ;;; number of bits per word where a word holds one lisp descriptor
17 (defconstant n-word-bits 32)
19 ;;; the natural width of a machine word (as seen in e.g. register width,
20 ;;; address space)
21 (defconstant n-machine-word-bits 32)
23 ;;; Floating-point related constants, both format descriptions and FPU
24 ;;; control register descriptions. These don't exactly match up with
25 ;;; what the machine manuals say because the Common Lisp standard
26 ;;; defines floating-point values somewhat differently than the IEEE
27 ;;; standard does.
29 (defconstant float-sign-shift 31)
31 (defconstant single-float-bias 126)
32 (defconstant-eqx single-float-exponent-byte (byte 8 23) #'equalp)
33 (defconstant-eqx single-float-significand-byte (byte 23 0) #'equalp)
34 (defconstant single-float-normal-exponent-min 1)
35 (defconstant single-float-normal-exponent-max 254)
36 (defconstant single-float-hidden-bit (ash 1 23))
37 (defconstant single-float-trapping-nan-bit (ash 1 22))
39 (defconstant double-float-bias 1022)
40 (defconstant-eqx double-float-exponent-byte (byte 11 20) #'equalp)
41 (defconstant-eqx double-float-significand-byte (byte 20 0) #'equalp)
42 (defconstant double-float-normal-exponent-min 1)
43 (defconstant double-float-normal-exponent-max #x7FE)
44 (defconstant double-float-hidden-bit (ash 1 20))
45 (defconstant double-float-trapping-nan-bit (ash 1 19))
47 (defconstant single-float-digits
48 (+ (byte-size single-float-significand-byte) 1))
50 (defconstant double-float-digits
51 (+ (byte-size double-float-significand-byte) n-word-bits 1))
53 #!+arm-vfp
54 (progn
55 (defconstant float-invalid-trap-bit (ash 1 0))
56 (defconstant float-divide-by-zero-trap-bit (ash 1 1))
57 (defconstant float-overflow-trap-bit (ash 1 2))
58 (defconstant float-underflow-trap-bit (ash 1 3))
59 (defconstant float-inexact-trap-bit (ash 1 4))
60 (defconstant float-input-denormal-trap-bit (ash 1 7))
62 (defconstant float-round-to-nearest 0)
63 (defconstant float-round-to-positive 1)
64 (defconstant float-round-to-negative 2)
65 (defconstant float-round-to-zero 3)
67 (defconstant-eqx float-rounding-mode (byte 2 22) #'equalp)
69 (defconstant-eqx float-sticky-bits (byte 8 0) #'equalp)
70 (defconstant-eqx float-traps-byte (byte 8 8) #'equalp)
71 (defconstant-eqx float-exceptions-byte (byte 8 0) #'equalp)
73 (defconstant float-fast-bit (ash 1 24))) ;; Flush-to-zero mode
74 ;; NOTE: As with the FLOAT-REGISTERS SB in vm.lisp, if you define this
75 ;; for non-VFP systems, please use a specific positive feature
76 ;; conditional.
77 #!-arm-vfp
78 (error "Don't know how to set the FPU control word layout on non-VFP systems")
80 ;;;; Where to put the different spaces.
82 ;;; On non-gencgc we need large dynamic and static spaces for PURIFY
83 #!-gencgc
84 (progn
85 (defconstant read-only-space-start #x04000000)
86 (defconstant read-only-space-end #x07ff8000)
87 (defconstant static-space-start #x08000000)
88 (defconstant static-space-end #x097fff00)
90 (defconstant linkage-table-space-start #x0a000000)
91 (defconstant linkage-table-space-end #x0b000000))
93 #!+gencgc
94 (progn
95 (defconstant linkage-table-space-start #x0a000000)
96 (defconstant linkage-table-space-end #x0b000000)
98 (defconstant read-only-space-start #x04000000)
99 (defconstant read-only-space-end #x07ff8000)
101 (defconstant static-space-start #x08000000)
102 (defconstant static-space-end #x097fff00)
104 (defconstant dynamic-space-start #x4f000000)
105 (defconstant default-dynamic-space-size
106 (or #.(!read-dynamic-space-size) (expt 2 29))))
108 (defconstant linkage-table-entry-size 16)
110 #!+(or linux netbsd)
111 (progn
112 #!-gencgc
113 (progn
114 (defconstant dynamic-0-space-start #x4f000000)
115 (defconstant dynamic-0-space-end #x66fff000)
116 (defconstant dynamic-1-space-start #x67000000)
117 (defconstant dynamic-1-space-end #x7efff000)))
119 ;;;; other miscellaneous constants
121 (defenum (:start 8)
122 halt-trap
123 pending-interrupt-trap
124 error-trap
125 cerror-trap
126 breakpoint-trap
127 fun-end-breakpoint-trap
128 single-step-around-trap
129 single-step-before-trap)
131 ;;;; Static symbols.
133 ;;; These symbols are loaded into static space directly after NIL so
134 ;;; that the system can compute their address by adding a constant
135 ;;; amount to NIL.
137 ;;; The fdefn objects for the static functions are loaded into static
138 ;;; space directly after the static symbols. That way, the raw-addr
139 ;;; can be loaded directly out of them by indirecting relative to NIL.
141 (defconstant-eqx +static-symbols+
142 `#(,@+common-static-symbols+
143 *allocation-pointer*
145 *control-stack-pointer*
146 *binding-stack-pointer*
147 *interrupted-control-stack-pointer*
149 ;; interrupt handling
150 *pseudo-atomic-atomic*
151 *pseudo-atomic-interrupted*)
152 #'equalp)
154 (defconstant-eqx +static-fdefns+
155 #(two-arg-gcd two-arg-lcm
156 two-arg-+ two-arg-- two-arg-* two-arg-/
157 two-arg-< two-arg-> two-arg-=
158 two-arg-and two-arg-ior two-arg-xor two-arg-eqv
161 sb!kernel:%negate)
162 #'equalp)
165 ;;;; Assembler parameters:
167 ;;; The number of bits per element in the assemblers code vector.
169 (defparameter *assembly-unit-length* 8)
171 (defvar *allocation-pointer*)