ARM64: increase static and dynamic spaces start addresses.
[sbcl.git] / src / compiler / arm64 / parms.lisp
blob21ffff9463c30d45e4b96b30619303804226ba0c
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 (def!constant n-word-bits 64)
19 ;;; the natural width of a machine word (as seen in e.g. register width,
20 ;;; address space)
21 (def!constant n-machine-word-bits 64)
23 ;;; number of bits per byte where a byte is the smallest addressable
24 ;;; object
25 (def!constant n-byte-bits 8)
27 ;;; Floating-point related constants, both format descriptions and FPU
28 ;;; control register descriptions. These don't exactly match up with
29 ;;; what the machine manuals say because the Common Lisp standard
30 ;;; defines floating-point values somewhat differently than the IEEE
31 ;;; standard does.
33 (def!constant float-sign-shift 31)
35 (def!constant single-float-bias 126)
36 (defconstant-eqx single-float-exponent-byte (byte 8 23) #'equalp)
37 (defconstant-eqx single-float-significand-byte (byte 23 0) #'equalp)
38 (def!constant single-float-normal-exponent-min 1)
39 (def!constant single-float-normal-exponent-max 254)
40 (def!constant single-float-hidden-bit (ash 1 23))
41 (def!constant single-float-trapping-nan-bit (ash 1 22))
43 (def!constant double-float-bias 1022)
44 (defconstant-eqx double-float-exponent-byte (byte 11 20) #'equalp)
45 (defconstant-eqx double-float-significand-byte (byte 20 0) #'equalp)
46 (def!constant double-float-normal-exponent-min 1)
47 (def!constant double-float-normal-exponent-max #x7FE)
48 (def!constant double-float-hidden-bit (ash 1 20))
49 (def!constant double-float-trapping-nan-bit (ash 1 19))
51 (def!constant single-float-digits
52 (+ (byte-size single-float-significand-byte) 1))
54 (def!constant double-float-digits
55 (+ (byte-size double-float-significand-byte) 32 1))
58 (progn
59 (def!constant float-invalid-trap-bit (ash 1 0))
60 (def!constant float-divide-by-zero-trap-bit (ash 1 1))
61 (def!constant float-overflow-trap-bit (ash 1 2))
62 (def!constant float-underflow-trap-bit (ash 1 3))
63 (def!constant float-inexact-trap-bit (ash 1 4))
64 (def!constant float-input-denormal-trap-bit (ash 1 7))
66 (def!constant float-round-to-nearest 0)
67 (def!constant float-round-to-positive 1)
68 (def!constant float-round-to-negative 2)
69 (def!constant float-round-to-zero 3)
71 (defconstant-eqx float-rounding-mode (byte 2 22) #'equalp)
73 (defconstant-eqx float-sticky-bits (byte 8 0) #'equalp)
74 (defconstant-eqx float-traps-byte (byte 8 8) #'equalp)
75 (defconstant-eqx float-exceptions-byte (byte 8 0) #'equalp)
77 (def!constant float-fast-bit (ash 1 24))) ;; Flush-to-zero mode
79 ;;;; Where to put the different spaces.
81 ;;; On non-gencgc we need large dynamic and static spaces for PURIFY
82 #!-gencgc
83 (progn
84 (def!constant read-only-space-start #x04000000)
85 (def!constant read-only-space-end #x07ff8000)
86 (def!constant static-space-start #x08000000)
87 (def!constant static-space-end #x097fff00)
89 (def!constant linkage-table-space-start #x0a000000)
90 (def!constant linkage-table-space-end #x0b000000)
91 #!+linux
92 (progn
93 (def!constant dynamic-0-space-start #x4f000000)
94 (def!constant dynamic-0-space-end #x66fff000)
95 (def!constant dynamic-1-space-start #x67000000)
96 (def!constant dynamic-1-space-end #x7efff000)))
98 #!+gencgc
99 (!gencgc-space-setup #xF0000000 :dynamic-space-start #x1000000000)
101 (def!constant linkage-table-entry-size 16)
103 ;;;; other miscellaneous constants
105 (defenum (:start 8)
106 halt-trap
107 pending-interrupt-trap
108 error-trap
109 cerror-trap
110 breakpoint-trap
111 fun-end-breakpoint-trap
112 single-step-around-trap
113 single-step-before-trap
114 invalid-arg-count-trap)
116 ;;;; Static symbols.
118 ;;; These symbols are loaded into static space directly after NIL so
119 ;;; that the system can compute their address by adding a constant
120 ;;; amount to NIL.
122 ;;; The fdefn objects for the static functions are loaded into static
123 ;;; space directly after the static symbols. That way, the raw-addr
124 ;;; can be loaded directly out of them by indirecting relative to NIL.
126 (defparameter *static-symbols*
127 (append
128 #!-sb-thread
129 '(*binding-stack-pointer*
130 *pseudo-atomic-atomic*
131 *pseudo-atomic-interrupted*)
132 '(*allocation-pointer*
133 ;; interrupt handling
136 ;; Needed for callbacks to work across saving cores. see
137 ;; ALIEN-CALLBACK-ASSEMBLER-WRAPPER in c-call.lisp for gory
138 ;; details.
139 sb!alien::*enter-alien-callback*
140 #!+gencgc *restart-lisp-function*)
141 *common-static-symbols*
142 *c-callable-static-symbols*))
144 (defparameter *static-funs*
145 '(two-arg-gcd two-arg-lcm
146 two-arg-+ two-arg-- two-arg-* two-arg-/
147 two-arg-< two-arg-> two-arg-=
148 two-arg-and two-arg-ior two-arg-xor two-arg-eqv
151 sb!kernel:%negate))
154 ;;;; Assembler parameters:
156 ;;; The number of bits per element in the assemblers code vector.
158 (defparameter *assembly-unit-length* 8)
160 (defvar *allocation-pointer*)