Draft NEWS for sbcl-2.4.7
[sbcl.git] / src / compiler / arm64 / parms.lisp
blob9a1c40b0e7782d1efaa5196b831b81225b1ca10a
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 (defconstant sb-assem:assem-scheduler-p nil)
17 (defconstant sb-assem:+inst-alignment-bytes+ 4)
19 (defconstant sb-fasl:+backend-fasl-file-implementation+ :arm64)
21 ;; Can be in the range 4K-64K
22 (defconstant +backend-page-bytes+ 65536)
24 ;;; The size in bytes of GENCGC pages. A page is essentially
25 ;;; the granularity at which we claim memory for TLABs.
26 (defconstant gencgc-page-bytes +backend-page-bytes+)
27 ;;; The divisor relative to page-bytes which computes the granularity
28 ;;; at which writes to old generations are logged.
29 (defconstant cards-per-page
30 #+gencgc 32
31 #+mark-region-gc (/ +backend-page-bytes+ 128))
33 ;;; The minimum size of new allocation regions. While it doesn't
34 ;;; currently make a lot of sense to have a card size lower than
35 ;;; the alloc granularity, it will, once we are smarter about finding
36 ;;; the start of objects.
37 (defconstant gencgc-alloc-granularity 0)
38 ;;; The card size for immobile/low space.
39 ;;; This must be a multiple of the OS page size.
40 (defconstant immobile-card-bytes +backend-page-bytes+)
42 ;;; number of bits per word where a word holds one lisp descriptor
43 (defconstant n-word-bits 64)
45 ;;; the natural width of a machine word (as seen in e.g. register width,
46 ;;; address space)
47 (defconstant n-machine-word-bits 64)
49 (progn
50 (defconstant float-invalid-trap-bit (ash 1 0))
51 (defconstant float-divide-by-zero-trap-bit (ash 1 1))
52 (defconstant float-overflow-trap-bit (ash 1 2))
53 (defconstant float-underflow-trap-bit (ash 1 3))
54 (defconstant float-inexact-trap-bit (ash 1 4))
55 (defconstant float-input-denormal-trap-bit (ash 1 7))
57 (defconstant float-round-to-nearest 0)
58 (defconstant float-round-to-positive 1)
59 (defconstant float-round-to-negative 2)
60 (defconstant float-round-to-zero 3)
62 (defconstant-eqx float-rounding-mode (byte 2 22) #'equalp)
64 (defconstant-eqx float-sticky-bits (byte 8 0) #'equalp)
65 (defconstant-eqx float-traps-byte (byte 8 8) #'equalp)
66 (defconstant-eqx float-exceptions-byte (byte 8 0) #'equalp)
68 (defconstant float-fast-bit (ash 1 24))) ;; Flush-to-zero mode
70 ;;;; Where to put the different spaces.
72 (gc-space-setup #+(or linux openbsd netbsd freebsd)
73 #x2F0000000
74 #+darwin #x300000000
75 #-darwin :read-only-space-size #-darwin 0
76 :fixedobj-space-size #.(* 65536 1024)
77 :text-space-start #x0A00000000
78 :text-space-size #.(* 2 65536 1024)
79 :dynamic-space-start
80 #-darwin #x1000000000
81 #+darwin #x7003000000)
83 (defconstant alien-linkage-table-growth-direction :up)
84 (defconstant alien-linkage-table-entry-size 16)
85 ;; text space:
86 ;; | ALIEN LINKAGE | CODE OBJECTS ...
87 ;; |<------------->|
88 #+(and sb-xc-host immobile-space)
89 (defparameter alien-linkage-space-start (- text-space-start alien-linkage-space-size))
91 ;;;; other miscellaneous constants
93 (defenum (:start 8)
94 halt-trap
95 pending-interrupt-trap
96 cerror-trap
97 breakpoint-trap
98 fun-end-breakpoint-trap
99 single-step-around-trap
100 single-step-before-trap
101 invalid-arg-count-trap
102 error-trap)
104 ;;;; Static symbols.
106 ;;; These symbols are loaded into static space directly after NIL so
107 ;;; that the system can compute their address by adding a constant
108 ;;; amount to NIL.
110 ;;; The fdefn objects for the static functions are loaded into static
111 ;;; space directly after the static symbols. That way, the raw-addr
112 ;;; can be loaded directly out of them by indirecting relative to NIL.
114 (defconstant-eqx +static-symbols+
115 `#(#-sb-thread
116 ,@'(*binding-stack-pointer*
117 *pseudo-atomic-atomic*
118 *pseudo-atomic-interrupted*)
119 ;; interrupt handling
120 ,@+common-static-symbols+)
121 #'equalp)
123 (defconstant-eqx +static-fdefns+ `#(,@common-static-fdefns) #'equalp)
126 ;;;; Assembler parameters:
128 ;;; The number of bits per element in the assemblers code vector.
130 (defparameter *assembly-unit-length* 8)