Fix "Cosmetic problem" per remark in compiler/generic/parms
[sbcl.git] / src / compiler / arm64 / parms.lisp
blobfee4e9918b192404c3586e41ffa4368dbd83c4da
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))
92 #!+gencgc
93 (!gencgc-space-setup #x04000000 :dynamic-space-start #x4f000000)
95 (def!constant linkage-table-entry-size 16)
97 #!+linux
98 (progn
99 #!-gencgc
100 (progn
101 (def!constant dynamic-0-space-start #x4f000000)
102 (def!constant dynamic-0-space-end #x66fff000)
103 (def!constant dynamic-1-space-start #x67000000)
104 (def!constant dynamic-1-space-end #x7efff000)))
106 ;;;; other miscellaneous constants
108 (defenum (:start 8)
109 halt-trap
110 pending-interrupt-trap
111 error-trap
112 cerror-trap
113 breakpoint-trap
114 fun-end-breakpoint-trap
115 single-step-around-trap
116 single-step-before-trap
117 invalid-arg-count-trap)
119 ;;;; Static symbols.
121 ;;; These symbols are loaded into static space directly after NIL so
122 ;;; that the system can compute their address by adding a constant
123 ;;; amount to NIL.
125 ;;; The fdefn objects for the static functions are loaded into static
126 ;;; space directly after the static symbols. That way, the raw-addr
127 ;;; can be loaded directly out of them by indirecting relative to NIL.
129 (defparameter *static-symbols*
130 (append
131 #!-sb-thread
132 '(*binding-stack-pointer*
133 *pseudo-atomic-atomic*
134 *pseudo-atomic-interrupted*)
135 '(*allocation-pointer*
136 ;; interrupt handling
139 ;; Needed for callbacks to work across saving cores. see
140 ;; ALIEN-CALLBACK-ASSEMBLER-WRAPPER in c-call.lisp for gory
141 ;; details.
142 sb!alien::*enter-alien-callback*
143 #!+gencgc *restart-lisp-function*)
144 *common-static-symbols*
145 *c-callable-static-symbols*))
147 (defparameter *static-funs*
148 '(two-arg-gcd two-arg-lcm
149 two-arg-+ two-arg-- two-arg-* two-arg-/
150 two-arg-< two-arg-> two-arg-=
151 two-arg-and two-arg-ior two-arg-xor two-arg-eqv
154 sb!kernel:%negate))
157 ;;;; Assembler parameters:
159 ;;; The number of bits per element in the assemblers code vector.
161 (defparameter *assembly-unit-length* 8)
163 (defvar *allocation-pointer*)