This repository has been archived by the owner on Mar 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconstants.s
165 lines (125 loc) · 4 KB
/
constants.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
.equ NULL, 0
.equ EOF, -1
.equ PAGE_SIZE, 4096
## setjmp.h
.equ JMP_BUF_SIZE, 200
## sys/mman.h
.equ PROT_READ, 0x1
.equ PROT_WRITE, 0x2
.equ PROT_EXEC, 0x4
.equ MAP_PRIVATE, 0x02
.equ MAP_ANONYMOUS, 0x20
## stdio.h
.equ SEEK_SET, 0
## time.h
.equ CLOCKS_PER_SEC, 1000000
## unistd.h
.equ F_OK, 0
.equ STDERR_FILENO, 2
## signal.h
.equ SIGSEGV, 11
## dlfcn.h
.equ RTLD_DEFAULT, 0
.equ RTLD_LAZY, 1
.equ ROUNDING_MODE_TRUNCATE, 0b11
.equ CPUID_FEATURE_INFORMATION, 1
.equ SSE4_1, 1 << 19
.equ SSE4_2, 1 << 20
.equ STACKTRACE_SIZE, 10
.equ BYTE_SIZE, 1
.equ WORD_SIZE, BYTE_SIZE * 2
.equ INT_SIZE, WORD_SIZE * 2
.equ POINTER_SIZE, INT_SIZE * 2
.equ POINTER_SIZE_SHIFT, 3
.equ NAN_MASK, 0x7FF8000000000000
.equ TAG_SHIFT, 45
.equ TAG_MASK, (1 << 6) - 1
.equ POINTER_TAG_MASK, ~(TAG_SYMBOL - 1)
.equ PAYLOAD_SHIFT, 64 - 48
.equ SIGN_BIT, 63
.equ TAG_DOUBLE, 0
.equ TAG_BOOLEAN, 1
.equ TAG_BYTE, 2
.equ TAG_CHAR, 3
.equ TAG_INT, 4
.equ TAG_SYMBOL, 8
.equ TAG_PROCEDURE, 16
.equ TAG_PORT, 24
.equ TAG_STRING, 32
.equ TAG_PAIR, 40
.equ TAG_VECTOR, 48
.equ TAG_OBJECT, 56
.equ TAG_BYTEVECTOR, 64
.equ TAG_CONTINUATION, 65
.equ TAG_VALUES, 66
.equ TAG_HANDLE, 67
.equ TAG_C_PROCEDURE, 68
.equ C_TRUE, 1
.equ C_FALSE, 0
.equ FALSE, (NAN_MASK | (TAG_BOOLEAN << TAG_SHIFT))
.equ TRUE, (FALSE | C_TRUE)
.equ NIL, (NAN_MASK | (TAG_PAIR << TAG_SHIFT) | NULL)
.equ VOID, (NAN_MASK | (TAG_OBJECT << TAG_SHIFT) | NULL)
.equ EOF_OBJECT, (NAN_MASK | (TAG_CHAR << TAG_SHIFT) | 0xffffffff)
.equ NEWLINE_CHAR, (NAN_MASK | (TAG_CHAR << TAG_SHIFT) | 10)
.equ SPACE_CHAR, (NAN_MASK | (TAG_CHAR << TAG_SHIFT) | 32)
.equ ZERO_INT, (NAN_MASK | (TAG_INT << TAG_SHIFT) | 0)
.equ ONE_INT, (NAN_MASK | (TAG_INT << TAG_SHIFT) | 1)
.equ BINARY_RADIX_INT, (NAN_MASK | (TAG_INT << TAG_SHIFT) | 2)
.equ OCTAL_RADIX_INT, (NAN_MASK | (TAG_INT << TAG_SHIFT) | 8)
.equ DECIMAL_RADIX_INT, (NAN_MASK | (TAG_INT << TAG_SHIFT) | 10)
.equ HEX_RADIX_INT, (NAN_MASK | (TAG_INT << TAG_SHIFT) | 16)
.equ MAX_NUMBER_OF_SYMBOLS, 1024
.equ POINTER_STACK_INITIAL_SIZE, 8 * 1024
.equ CODE_SPACE_SIZE, 512 * 1024 * 1024
.equ CHAR_TABLE_SIZE, 256
.equ CHAR_PREFIX_LENGTH, 2
.equ BINARY_OP_SHIFT, 4
.equ BINARY_OP_MASK, 4 - 1
.equ BINARY_OP_INT_INT, (1 << 1 | 1)
.equ FFI_APPLY_DOUBLES_JUMP_ALIGNMENT, 8
.equ VARARGS_JUMP_ALIGNMENT, 16
.equ VARARGS_JUMP_ALIGNMENT_SHIFT, 4
.equ GC_MARK_BIT, 0
.equ NUMBER_OF_REGISTERS, 16
.equ MAX_REGISTER_ARGS, 6
.equ MAX_REGISTER_DOUBLE_ARGS, 8
.equ MAX_CLOSURE_ENVIRONMENT_SIZE, 64
.equ CONTINUATION_SAVED_VALUES, 4
.equ RET_SIZE, 1
.equ RAX, 0
.equ RCX, 1
.equ RDX, 2
.equ RBX, 3
.equ RSP, 4
.equ RBP, 5
.equ RSI, 6
.equ RDI, 7
.irp reg, 8, 9, 10, 11, 12, 13, 14, 15
.equ R\reg, \reg
.endr
.equ MICROSECONDS_PER_SEC, 1000000
.equ LOG_JIT, C_FALSE
.equ ASSERTIONS, C_TRUE
.struct 0
header_object_mark:
.struct . + WORD_SIZE
header_object_type:
.struct . + WORD_SIZE
header_object_size:
.struct . + INT_SIZE
header_size:
.struct header_size
pair_car:
.struct . + POINTER_SIZE
pair_cdr:
.struct . + POINTER_SIZE
pair_size:
.struct 0
stack_bottom:
.struct . + POINTER_SIZE
stack_top_offset:
.struct . + POINTER_SIZE
stack_max_size:
.struct . + POINTER_SIZE
stack_size: