1 /* This code is machine-generated.  See its source for license
2    information. This software is derived from software
3    distributed under the GNU GPL version 3 or later. */
4 
5 /* User-specified code, initial header part: beginning. */
6 
7 /* User-specified code, initial header part: end */
8 
9 /* VM library: main header file.
10 
11    Copyright (C) 2016, 2017, 2018, 2019, 2020 Luca Saiu
12    Written by Luca Saiu
13 
14    This file is part of Jitter.
15 
16    Jitter is free software: you can redistribute it and/or modify
17    it under the terms of the GNU General Public License as published by
18    the Free Software Foundation, either version 3 of the License, or
19    (at your option) any later version.
20 
21    Jitter is distributed in the hope that it will be useful,
22    but WITHOUT ANY WARRANTY; without even the implied warranty of
23    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24    GNU General Public License for more details.
25 
26    You should have received a copy of the GNU General Public License
27    along with Jitter.  If not, see <http://www.gnu.org/licenses/>. */
28 
29 
30 /* Generated file warning.
31  * ************************************************************************** */
32 
33 /* Unless this file is named exactly "vm.h" , without any prefix, you are
34    looking at a machine-generated derived file.  The original source is the vm.h
35    template from Jitter, with added code implementing the jitterlispvm VM. */
36 
37 
38 
39 
40 /* This multiple-inclusion guard is opened here in the template, and will be
41    closed at the end of the generated code.  It is normal to find no matching
42    #endif in the template file.  */
43 #ifndef JITTERLISPVM_VM_H_
44 #define JITTERLISPVM_VM_H_
45 
46 
47 /* This is the main VM header to use from hand-written code.
48  * ************************************************************************** */
49 
50 #include <stdio.h>
51 #include <stdbool.h>
52 
53 #include <jitter/jitter.h>
54 #include <jitter/jitter-hash.h>
55 #include <jitter/jitter-stack.h>
56 #include <jitter/jitter-instruction.h>
57 #include <jitter/jitter-mutable-routine.h>
58 #include <jitter/jitter-print.h>
59 #include <jitter/jitter-routine.h>
60 //#include <jitter/jitter-specialize.h> // FIXME: what about only declaring jitter_specialize in another header, and not including this?
61 #include <jitter/jitter-disassemble.h>
62 #include <jitter/jitter-vm.h>
63 #include <jitter/jitter-profile.h>
64 #include <jitter/jitter-data-locations.h>
65 #include <jitter/jitter-arithmetic.h>
66 #include <jitter/jitter-bitwise.h>
67 #include <jitter/jitter-signals.h>
68 #include <jitter/jitter-list.h>
69 
70 
71 
72 
73 /* Initialization and finalization.
74  * ************************************************************************** */
75 
76 /* Initialize the runtime state for the jitterlispvm VM.  This needs to be called
77    before using VM routines or VM states in any way. */
78 void
79 jitterlispvm_initialize (void);
80 
81 /* Finalize the runtime state, freeing some resources.  After calling this no
82    use of VM routines or states is allowed.  It is possible to re-initialize
83    after finalizing; these later re-initializations might be more efficient than
84    the first initialization. */
85 void
86 jitterlispvm_finalize (void);
87 
88 
89 
90 
91 /* State data structure initialization and finalization.
92  * ************************************************************************** */
93 
94 /* The machine state is separated into the backing and the more compact runtime
95    data structures, to be allocated in registers as far as possible.  These are
96    just a forward-declarations: the actual definitions are machine-generated. */
97 struct jitterlispvm_state_backing;
98 struct jitterlispvm_state_runtime;
99 
100 /* A data structure containing both the backing and the runtime state.  This is
101    a forward-declaration: the actual definition will come after both are
102    defined. */
103 struct jitterlispvm_state;
104 
105 /* Initialize the pointed VM state data structure, or fail fatally.  The
106    function definition is machine-generated, even if it may include user code.
107    The state backing and runtime are initialized at the same time, and in fact
108    the distinction between them is invisible to the VM user. */
109 void
110 jitterlispvm_state_initialize (struct jitterlispvm_state *state)
111   __attribute__ ((nonnull (1)));
112 
113 /* Finalize the pointed VM state data structure, or fail fatally.  The function
114    definition is machine-generated, even if it may include user code.  The state
115    backing and runtime are finalized at the same time. */
116 void
117 jitterlispvm_state_finalize (struct jitterlispvm_state *state)
118   __attribute__ ((nonnull (1)));
119 
120 
121 
122 
123 /* State data structure: iteration.
124  * ************************************************************************** */
125 
126 /* The header of a doubly-linked list linking every state for the jitterlispvm VM
127    together.  This global is automatically wrapped, and therefore also
128    accessible from VM instruction code. */
129 extern struct jitter_list_header * const
130 jitterlispvm_states;
131 
132 /* A pointer to the current state, only accessible from VM code.  This is usable
133    for pointer comparison when iterating over states. */
134 #define JITTERLISPVM_OWN_STATE                           \
135   ((struct jitterlispvm_state *) jitter_original_state)
136 
137 /* Given an l-value of type struct jitterlispvm_state * (usually a variable name)
138    expand to a for loop statement iterating over every existing jitterlispvm state
139    using the l-value as iteration variable.  The expansion will execute the
140    statement immediately following the macro call with the l-value in scope;
141    in order words the loop body is not a macro argument, but follows the macro
142    use.
143    The l-value may be evaluated an unspecified number of times.
144    This macro is safe to use within VM instruction code.
145    For example:
146      struct jitterlispvm_state *s;
147      JITTERLISPVM_FOR_EACH_STATE (s)
148        printf ("This is a state: %p\n", s); // (but printf unsafe in VM code) */
149 #define JITTERLISPVM_FOR_EACH_STATE(jitter_state_iteration_lvalue)     \
150   for ((jitter_state_iteration_lvalue)                             \
151           = jitterlispvm_states->first;                                \
152        (jitter_state_iteration_lvalue)                             \
153           != NULL;                                                 \
154        (jitter_state_iteration_lvalue)                             \
155          = (jitter_state_iteration_lvalue)->links.next)            \
156     /* Here comes the body supplied by the user: no semicolon. */
157 
158 
159 
160 
161 /* Mutable routine initialization.
162  * ************************************************************************** */
163 
164 /* Return a freshly-allocated empty mutable routine for the jitterlispvm VM. */
165 struct jitter_mutable_routine*
166 jitterlispvm_make_mutable_routine (void)
167   __attribute__ ((returns_nonnull));
168 
169 /* Mutable routine finalization is actually VM-independent, but a definition of
170    jitterlispvm_destroy_mutable_routine is provided below as a macro, for cosmetic
171    reasons. */
172 
173 
174 /* Mutable routines: code generation C API.
175  * ************************************************************************** */
176 
177 /* This is the preferred way of adding a new VM instruction to a pointed
178    routine, more efficient than jitterlispvm_mutable_routine_append_instruction_name
179    even if only usable when the VM instruction opcode is known at compile time.
180    The unspecialized instruction name must be explicitly mangled by the user as
181    per the rules in jitterc_mangle.c .  For example an instruction named foo_bar
182    can be added to the routine pointed by p with any one of
183      jitterlispvm_mutable_routine_append_instruction_name (p, "foo_bar");
184    ,
185      JITTERLISPVM_MUTABLE_ROUTINE_APPEND_INSTRUCTION (p, foo_ubar);
186    , and
187      JITTERLISPVM_MUTABLE_ROUTINE_APPEND_INSTRUCTION_ID
188         (p, jitterlispvm_meta_instruction_id_foo_ubar);
189    .
190    The string "foo_bar" is not mangled, but the token foo_ubar is. */
191 #define JITTERLISPVM_MUTABLE_ROUTINE_APPEND_INSTRUCTION(                 \
192           routine_p, instruction_mangled_name_root)                  \
193   do                                                                 \
194     {                                                                \
195       jitter_mutable_routine_append_meta_instruction                 \
196          ((routine_p),                                               \
197           jitterlispvm_meta_instructions                                 \
198           + JITTER_CONCATENATE_TWO(jitterlispvm_meta_instruction_id_,    \
199                                    instruction_mangled_name_root));  \
200     }                                                                \
201   while (false)
202 
203 /* Append the unspecialized instruction whose id is given to the pointed routine.
204    The id must be a case of enum jitterlispvm_meta_instruction_id ; such cases have
205    a name starting with jitterlispvm_meta_instruction_id_ .
206    This is slightly less convenient to use than JITTERLISPVM_MUTABLE_ROUTINE_APPEND_INSTRUCTION
207    but more general, as the instruction id is allowed to be a non-constant C
208    expression. */
209 #define JITTERLISPVM_MUTABLE_ROUTINE_APPEND_INSTRUCTION_ID(_jitter_routine_p,       \
210                                                        _jitter_instruction_id)  \
211   do                                                                            \
212     {                                                                           \
213       jitter_mutable_routine_append_instruction_id                              \
214          ((_jitter_routine_p),                                                  \
215           jitterlispvm_meta_instructions,                                           \
216           JITTERLISPVM_META_INSTRUCTION_NO,                                         \
217           (_jitter_instruction_id));                                            \
218     }                                                                           \
219   while (false)
220 
221 /* This is the preferred way of appending a register argument to the instruction
222    being added to the pointed routine, more convenient than directly using
223    jitterlispvm_mutable_routine_append_register_id_parameter , even if only usable
224    when the register class is known at compile time.  Here the register class is
225    only provided as a letter, but both the routine pointer and the register
226    index are arbitrary C expressions.
227    For example, in
228      JITTERLISPVM_MUTABLE_ROUTINE_APPEND_REGISTER_PARAMETER (p, r,
229                                                          variable_to_index (x));
230    the second macro argument "r" represents the register class named "r", and
231    not the value of a variable named r. */
232 #define JITTERLISPVM_MUTABLE_ROUTINE_APPEND_REGISTER_PARAMETER(routine_p,     \
233                                                            class_letter,  \
234                                                            index)         \
235   do                                                                      \
236     {                                                                     \
237       jitterlispvm_mutable_routine_append_register_parameter                  \
238          ((routine_p),                                                    \
239           & JITTER_CONCATENATE_TWO(jitterlispvm_register_class_,              \
240                                    class_letter),                         \
241           (index));                                                       \
242     }                                                                     \
243   while (false)
244 
245 
246 
247 
248 /* Routine unified API: initialization.
249  * ************************************************************************** */
250 
251 /* See the comments above in "Mutable routines: initialization", and the
252    implementation of the unified routine API in <jitter/jitter-routine.h> . */
253 
254 #define jitterlispvm_make_routine jitterlispvm_make_mutable_routine
255 
256 
257 
258 
259 /* Routine unified API: code generation C API.
260  * ************************************************************************** */
261 
262 /* See the comments above in "Mutable routines: code generation C API". */
263 
264 #define JITTERLISPVM_ROUTINE_APPEND_INSTRUCTION  \
265   JITTERLISPVM_MUTABLE_ROUTINE_APPEND_INSTRUCTION
266 #define JITTERLISPVM_ROUTINE_APPEND_INSTRUCTION_ID  \
267   JITTERLISPVM_MUTABLE_ROUTINE_APPEND_INSTRUCTION_ID
268 #define JITTERLISPVM_ROUTINE_APPEND_REGISTER_PARAMETER  \
269   JITTERLISPVM_MUTABLE_ROUTINE_APPEND_REGISTER_PARAMETER
270 
271 
272 
273 
274 /* Array: special-purpose data.
275  * ************************************************************************** */
276 
277 /* The Array is a convenient place to store special-purpose data, accessible in
278    an efficient way from a VM routine.
279    Every item in special-purpose data is thread-local. */
280 
281 /* The special-purpose data struct.  Every Array contains one of these at unbiased
282    offset JITTERLISPVM_SPECIAL_PURPOSE_STATE_DATA_UNBIASED_OFFSET from the unbiased
283    beginning of the array.
284    This entire struct is aligned to at least sizeof (jitter_int) bytes.  The
285    entire struct is meant to be always accessed through a pointer-to-volatile,
286    as its content may be altered from signal handlers and from different
287    threads.  In particualar the user should use the macro
288      JITTERLISPVM_ARRAY_TO_SPECIAL_PURPOSE_STATE_DATA
289    defined below and the macros defined from it as accessors.
290    VM code accessing special-purpose data for its own state should use
291      JITTERLISPVM_SPECIAL_PURPOSE_STATE_DATA
292    and the macros defined from it. */
293 struct jitter_special_purpose_state_data
294 {
295   /* Notification fields.
296    * ***************************************************************** */
297 
298   /* This is a Boolean flag, held as a word-sized datum so as to ensure
299      atomicity in access.  It is also aligned to at least sizeof (jitter_int)
300      bytes.
301      Non-zero means that there is at least one notification pending, zero means
302      that there are no notifications.  The flag specifies no other details: it
303      is meant to be fast to check, with detailed information about each pending
304      notification available elsewhere.
305      It is the receiver's responsibility to periodically poll for notifications
306      in application-specific "safe-points":
307      A check can be inserted, for example, in all of these program points:
308      a) at every backward branch;
309      b) at every procedure entry;
310      c) right after a call to each blocking primitive (as long as primitives
311        can be interrupted).
312      Safe-point checks are designed to be short and fast in the common case.  In
313      the common case no action is required, and the VM routine should simply
314      fall through.  If an action is required then control should branch off to a
315      handler, where the user may implement the required behavior.
316      It is mandatory that, as long as notifications can arrive, this field
317      is reset to zero (when handling pending notifications) only by a thread
318      running VM code in the state containing this struct.
319      Other threads are allowed to set this to non-zero, in order to send a
320      notification.  */
321   jitter_int pending_notifications;
322 
323   /* Information about pending signal notifications.  If any signal is pending
324      then pending_notifications must also be set, so that a notification check
325      can always just quickly check pending_notifications, and then look at more
326      details (including in pending_signal_notifications) only in the rare case
327      of pending_notifications being true. */
328   struct jitter_signal_notification *pending_signal_notifications;
329 
330 
331   /* Profiling instrumentation fields.
332    * ***************************************************************** */
333   struct jitter_profile_runtime profile_runtime;
334 };
335 
336 
337 
338 
339 /* The Array and volatility.
340  * ************************************************************************** */
341 
342 /* Some fields of The Array, seen from VM code, are meant to be volatile, since
343    they can be set by signal handlers or by other threads.  However it is
344    acceptable to not see such changes immediately after they occur (notifications
345    will get delayed, but not lost) and always accessing such data through a
346    volatile struct is suboptimal.
347 
348    Non-VM code does need a volatile qualifier.
349 
350    Advanced dispatches already need a trick using inline assembly to make the
351    base pointer (a biased pointer to The Array beginning) appear to
352    spontaneously change beween instruction.  That is sufficient to express the
353    degree of volatility required for this purpose.
354    Simple dispatches, on targets where inline assembly may not be available at
355    all, will use an actual volatile qualifier. */
356 #if defined (JITTER_DISPATCH_SWITCH)               \
357     || defined (JITTER_DISPATCH_DIRECT_THREADING)
358 # define JITTERLISPVM_ARRAY_VOLATILE_QUALIFIER volatile
359 #elif defined (JITTER_DISPATCH_MINIMAL_THREADING)  \
360       || defined (JITTER_DISPATCH_NO_THREADING)
361 # define JITTERLISPVM_ARRAY_VOLATILE_QUALIFIER /* nothing */
362 #else
363 # error "unknown dispatch: this should not happen"
364 #endif /* dispatch conditional */
365 
366 
367 
368 
369 /* Array element access: residuals, transfers, slow registers, and more.
370  * ************************************************************************** */
371 
372 /* In order to cover a wider range of addresses with simple base + register
373    addressing the base does not necessarily point to the beginning of the Array;
374    instead the base points to the beginning of the Array plus JITTER_ARRAY_BIAS
375    bytes.
376    FIXME: define the bias as a value appropriate to each architecture.  I think
377    I should just move the definition to jitter-machine.h and provide a default
378    here, in case the definition is missing on some architecture. */
379 
380 /* FIXME: Horrible, horrible, horrible temporary workaround!
381 
382    This is a temporary workaround, very ugly and fragile, to compensate
383    a limitation in jitter-specialize.c , which I will need to rewrite anyway.
384    The problem is that jitter-specialize.c patches snippets to load non-label
385    residuals in a VM-independent way based only on slow-register/memory residual
386    indices, which is incorrect.  By using this particular bias I am cancelling
387    that error.
388    Test case, on a machine having only one register residual and a VM having just
389      one fast register:
390      [luca@moore ~/repos/jitter/_build/native-gcc-9]$ Q=bin/uninspired--no-threading; make $Q && echo 'mov 2, %r1' | libtool --mode=execute valgrind $Q --disassemble - --print-locations
391    If this bias is wrong the slow-register accesses in mov/nR/%rR will use two
392    different offsets, one for reading and another for writing.  With this
393    workaround they will be the same.
394    Good, with workadound (biased offset 0x0 from the base in %rbx):
395     # 0x4a43d38: mov/nR/%rR 0x2, 0x20 (21 bytes):
396         0x0000000004effb30 41 bc 02 00 00 00    	movl   $0x2,%r12d
397         0x0000000004effb36 48 c7 43 00 20 00 00 00 	movq   $0x20,0x0(%rbx)
398         0x0000000004effb3e 48 8b 13             	movq   (%rbx),%rdx
399         0x0000000004effb41 4c 89 24 13          	movq   %r12,(%rbx,%rdx,1)
400    Bad, with JITTER_ARRAY_BIAS defined as zero: first write at 0x0(%rbx)
401                                                 then read at 0x10(%rbx):
402     # 0x4a43d38: mov/nR/%rR 0x2, 0x30 (22 bytes):
403         0x0000000004effb30 41 bc 02 00 00 00    	movl   $0x2,%r12d
404         0x0000000004effb36 48 c7 43 00 30 00 00 00 	movq   $0x30,0x0(%rbx)
405         0x0000000004effb3e 48 8b 53 10          	movq   0x10(%rbx),%rdx
406         0x0000000004effb42 4c 89 24 13          	movq   %r12,(%rbx,%rdx,1) */
407 #define JITTER_ARRAY_BIAS \
408   (sizeof (struct jitter_special_purpose_state_data))
409 //#define JITTER_ARRAY_BIAS //0//(((jitter_int) 1 << 15))//(((jitter_int) 1 << 31))//0//0//16//0
410 
411 /* Array-based globals are not implemented yet.  For the purpose of computing
412    Array offsets I will say they are zero. */
413 #define JITTERLISPVM_GLOBAL_NO 0
414 
415 /* Transfer registers are not implemented yet.  For the purpose of computing
416    Array offsets I will say they are zero. */
417 #define JITTERLISPVM_TRANSFER_REGISTER_NO 0
418 
419 /* Define macros holding offsets in bytes for the first global, memory residual
420    and transfer register, from an initial Array pointer.
421    In general we have to keep into account:
422    - globals (word-sized);
423    - special-purpose state data;
424    - memory residuals (word-sized);
425    - transfer registers (word-sized);
426    - slow registers (jitterlispvm_any_register-sized and aligned).
427    Notice that memory
428    residuals (meaning residuals stored in The Array) are zero on dispatching
429    modes different from no-threading.  This relies on
430    JITTERLISPVM_MAX_MEMORY_RESIDUAL_ARITY , defined below, which in its turn depends
431    on JITTERLISPVM_MAX_RESIDUAL_ARITY, which is machine-generated. */
432 #define JITTERLISPVM_FIRST_GLOBAL_UNBIASED_OFFSET  \
433   0
434 #define JITTERLISPVM_SPECIAL_PURPOSE_STATE_DATA_UNBIASED_OFFSET  \
435   (JITTERLISPVM_FIRST_GLOBAL_UNBIASED_OFFSET                     \
436    + sizeof (jitter_int) * JITTERLISPVM_GLOBAL_NO)
437 #define JITTERLISPVM_FIRST_MEMORY_RESIDUAL_UNBIASED_OFFSET   \
438   (JITTERLISPVM_SPECIAL_PURPOSE_STATE_DATA_UNBIASED_OFFSET   \
439    + sizeof (struct jitter_special_purpose_state_data))
440 #define JITTERLISPVM_FIRST_TRANSFER_REGISTER_UNBIASED_OFFSET        \
441   (JITTERLISPVM_FIRST_MEMORY_RESIDUAL_UNBIASED_OFFSET               \
442    + sizeof (jitter_int) * JITTERLISPVM_MAX_MEMORY_RESIDUAL_ARITY)
443 #define JITTERLISPVM_FIRST_SLOW_REGISTER_UNBIASED_OFFSET          \
444   JITTER_NEXT_MULTIPLE_OF_POSITIVE                            \
445      (JITTERLISPVM_FIRST_TRANSFER_REGISTER_UNBIASED_OFFSET        \
446       + sizeof (jitter_int) * JITTERLISPVM_TRANSFER_REGISTER_NO,  \
447       sizeof (union jitterlispvm_any_register))
448 
449 /* Expand to the offset of the special-purpose data struct from the Array
450    biased beginning. */
451 #define JITTERLISPVM_SPECIAL_PURPOSE_STATE_DATA_OFFSET       \
452   (JITTERLISPVM_SPECIAL_PURPOSE_STATE_DATA_UNBIASED_OFFSET   \
453    - JITTER_ARRAY_BIAS)
454 
455 /* Given an expression evaluating to the Array unbiased beginning, expand to
456    an expression evaluating to a pointer to its special-purpose data.
457    This is convenient for accessing special-purpose data from outside the
458    state -- for example, to set the pending notification flag for another
459    thread.
460    There are two versions of this feature:
461      JITTERLISPVM_ARRAY_TO_SPECIAL_PURPOSE_STATE_DATA
462    is meant to be used to access state data for some other thread, or in
463    general out of VM code.
464      JITTERLISPVM_OWN_SPECIAL_PURPOSE_STATE_DATA
465    is for VM code accessing its own special-purpose data. */
466 #define JITTERLISPVM_ARRAY_TO_SPECIAL_PURPOSE_STATE_DATA_PRIVATE(qualifier,      \
467                                                              array_address)  \
468   ((qualifier struct jitter_special_purpose_state_data *)                    \
469    (((char *) (array_address))                                               \
470     + JITTERLISPVM_SPECIAL_PURPOSE_STATE_DATA_UNBIASED_OFFSET))
471 #define JITTERLISPVM_ARRAY_TO_SPECIAL_PURPOSE_STATE_DATA(array_address)       \
472   JITTERLISPVM_ARRAY_TO_SPECIAL_PURPOSE_STATE_DATA_PRIVATE (volatile,         \
473                                                         (array_address))
474 #define JITTERLISPVM_OWN_SPECIAL_PURPOSE_STATE_DATA          \
475   JITTERLISPVM_ARRAY_TO_SPECIAL_PURPOSE_STATE_DATA_PRIVATE   \
476      (JITTERLISPVM_ARRAY_VOLATILE_QUALIFIER,                 \
477       ((char *) jitter_array_base) - JITTER_ARRAY_BIAS)
478 
479 /* Given a state pointer, expand to an expression evaluating to a pointer to
480    the state's special-purpose data.  This is meant for threads accessing
481    other threads' special-purpose data, typically to set notifications. */
482 #define JITTERLISPVM_STATE_TO_SPECIAL_PURPOSE_STATE_DATA(state_p)  \
483   (JITTERLISPVM_ARRAY_TO_SPECIAL_PURPOSE_STATE_DATA                \
484      ((state_p)->jitterlispvm_state_backing.jitter_array))
485 
486 /* Given a state pointer, expand to an expression evaluating to the
487    pending_notification field for the state as an l-value.  This is meant for
488    threads sending notifications to other threads. */
489 #define JITTERLISPVM_STATE_TO_PENDING_NOTIFICATIONS(state_p)   \
490   (JITTERLISPVM_STATE_TO_SPECIAL_PURPOSE_STATE_DATA (state_p)  \
491      ->pending_notifications)
492 
493 /* Given a state pointer and a signal, expand to an l-value evaluating to a the
494    pending field of the struct jitter_signal_notification element for the given
495    signal in the pointed state.  This is meant for threads sending signal
496    notifications to other threads and for C handler function. */
497 #define JITTERLISPVM_STATE_AND_SIGNAL_TO_PENDING_SIGNAL_NOTIFICATION(state_p,    \
498                                                                  signal_id)  \
499   (((JITTERLISPVM_STATE_TO_SPECIAL_PURPOSE_STATE_DATA (state_p)                   \
500        ->pending_signal_notifications)                                        \
501     + (signal_id))->pending)
502 
503 
504 /* Expand to the offset of the i-th register of class c in bytes from the Array
505    beginning.
506    The c argument must be a literal C (one-character) identifier.
507    The i argument should always be a compile-time constant for performance, and
508    it is in generated code.
509    The i-th c-class register must be slow, otherwise the offset will be
510    incorrect -- in fact fast registers are, hopefully, not in memory at all.
511 
512    Slow registers come in the Array ordered first by index, then by class.  For
513    example if there are three classes "r" with 4 fast registers, "f" with 7 fast
514    registers and "q" with 2 fast registers, slow registers can be accessed in
515    this order:
516      r4, f7, q2, r5, r8, q3, r6, r9, q4, and so on.
517    Each contiguous group of slow registers spanning every class and starting
518    from the first class (here for example <r5, r6, q3>) is called a "rank".
519    This organization is convenient since changing the number of slow registers
520    doesn't invalidate any offset computed in the past: the Array can simply be
521    resized and its base pointer updated, without changing the code accessing it.
522 
523    This relies on macro such as JITTERLISPVM_REGISTER_CLASS_NO and
524    JITTERLISPVM_REGISTER_?_FAST_REGISTER_NO and , defined below in machine-generated
525    code. */
526 #define JITTERLISPVM_SLOW_REGISTER_UNBIASED_OFFSET(c, i)                     \
527   (JITTERLISPVM_FIRST_SLOW_REGISTER_UNBIASED_OFFSET                          \
528    + (sizeof (union jitterlispvm_any_register)                               \
529       * (JITTERLISPVM_REGISTER_CLASS_NO                                      \
530          * ((i) - JITTER_CONCATENATE_THREE(JITTERLISPVM_REGISTER_, c,        \
531                                            _FAST_REGISTER_NO))           \
532          + JITTER_CONCATENATE_THREE(JITTERLISPVM_REGISTER_, c, _CLASS_ID))))
533 
534 /* Expand to the offset of the i-th register of class c in bytes from the base,
535    keeping the bias into account. */
536 #define JITTERLISPVM_SLOW_REGISTER_OFFSET(c, i)                              \
537   (JITTERLISPVM_SLOW_REGISTER_UNBIASED_OFFSET(c, i) - JITTER_ARRAY_BIAS)
538 
539 /* Expand to the Array size in bytes, assuming the given number of slow
540    registers per class.  This is an allocation size, ignoring the bias. */
541 #define JITTERLISPVM_ARRAY_SIZE(slow_register_per_class_no)                  \
542   (JITTERLISPVM_FIRST_SLOW_REGISTER_UNBIASED_OFFSET                          \
543    + (sizeof (union jitterlispvm_any_register)                               \
544       * JITTERLISPVM_REGISTER_CLASS_NO                                       \
545       * (slow_register_per_class_no)))
546 
547 
548 
549 
550 /* Residual access.
551  * ************************************************************************** */
552 
553 /* How many residuals we can have at most in memory, which is to say,
554    without counting residuals kept in reserved registers.
555 
556    Implementation note: it would be wrong here to use a CPP conditional based on
557    the value of JITTERLISPVM_MAX_RESIDUAL_ARITY , as I was doing in a preliminary
558    version.  That lead to a tricky bug, since JITTERLISPVM_MAX_RESIDUAL_ARITY ,
559    which is defined below but is not yet available here, simply counted as 0
560    for the purposes of evaluating the CPP condititional. */
561 #ifdef JITTER_DISPATCH_NO_THREADING
562   /* We are using no-threading dispatch.  If there are no more residuals
563      than reserved residual registers then we never need to keep any in
564      memory.  Otherwise we need to keep as many residuals in memory as the
565      total number of residuals minus how many registers are reserved for
566      them. */
567 # define JITTERLISPVM_MAX_MEMORY_RESIDUAL_ARITY                          \
568     ((JITTERLISPVM_MAX_RESIDUAL_ARITY <= JITTER_RESIDUAL_REGISTER_NO)    \
569      ? 0                                                             \
570      : (JITTERLISPVM_MAX_RESIDUAL_ARITY - JITTER_RESIDUAL_REGISTER_NO))
571 #else // Not no-threading.
572   /* No registers are reserved for residuals in this dispatching mode; even if
573      in fact all residuals are memory residuals they don't count here, since
574      residuals are not held in The Array in this dispatching mode. */
575 # define JITTERLISPVM_MAX_MEMORY_RESIDUAL_ARITY  \
576   0
577 #endif // #ifdef JITTER_DISPATCH_NO_THREADING
578 
579 #ifdef JITTER_DISPATCH_NO_THREADING
580 /* Expand to the offset from the base, in bytes, of the i-th residual.  The
581    given index must be greater than or equal to JITTER_RESIDUAL_REGISTER_NO;
582    residuals with indices lower than that number are not stored in The Array
583    at all.
584    This is not useful with any of the other dispatching modes, where residuals
585    directly follow each VM instruction opcode or thread.  For good performance i
586    should always be a compile-time constant, as it is in machine-generated
587    code.
588    Residuals always have the size of a jitter word, even if some register class
589    may be wider. */
590 /* FIXME: if later I use a different policy than simply checking
591    JITTER_RESIDUAL_REGISTER_NO to decide how many residuals to keep in
592    registers, then I have to change this or meet very nasty bugs. */
593 # define JITTERLISPVM_RESIDUAL_UNBIASED_OFFSET(i)                      \
594     (JITTERLISPVM_FIRST_MEMORY_RESIDUAL_UNBIASED_OFFSET                \
595      + (sizeof (jitter_int) * (i - JITTER_RESIDUAL_REGISTER_NO)))
596 # define JITTERLISPVM_RESIDUAL_OFFSET(i)  \
597     (JITTERLISPVM_RESIDUAL_UNBIASED_OFFSET(i) - JITTER_ARRAY_BIAS)
598 #endif // #ifdef JITTER_DISPATCH_NO_THREADING
599 
600 
601 
602 /* Mutable routine text frontend.
603  * ************************************************************************** */
604 
605 /* Parse VM code from the given file or string into the pointed VM routine,
606    which is allowed but not required to be empty.
607    These are simple wrappers around functions implemented in the Bison file. */
608 void
609 jitterlispvm_parse_mutable_routine_from_file_star (FILE *input_file,
610                                                struct jitter_mutable_routine *p)
611   __attribute__ ((nonnull (1, 2)));
612 void
613 jitterlispvm_parse_mutable_routine_from_file (const char *input_file_name,
614                                           struct jitter_mutable_routine *p)
615   __attribute__ ((nonnull (1, 2)));
616 void
617 jitterlispvm_parse_mutable_routine_from_string (const char *string,
618                                             struct jitter_mutable_routine *p)
619   __attribute__ ((nonnull (1, 2)));
620 
621 
622 
623 
624 /* Unified routine text frontend.
625  * ************************************************************************** */
626 
627 /* The C wrappers for the ordinary API can be reused for the unified API, since
628    it internally works with mutable routines. */
629 #define jitterlispvm_parse_routine_from_file_star  \
630   jitterlispvm_parse_mutable_routine_from_file_star
631 #define jitterlispvm_parse_routine_from_file  \
632   jitterlispvm_parse_mutable_routine_from_file
633 #define jitterlispvm_parse_routine_from_string  \
634   jitterlispvm_parse_mutable_routine_from_string
635 
636 
637 
638 
639 /* Machine-generated data structures.
640  * ************************************************************************** */
641 
642 /* Declare a few machine-generated data structures, which together define a VM. */
643 
644 /* Threads or pointers to native code blocks of course don't exist with
645    switch-dispatching. */
646 #ifndef JITTER_DISPATCH_SWITCH
647 /* Every possible thread, indexed by enum jitter_specialized_instruction_opcode .
648    This is used at specialization time, and the user shouldn't need to touch
649    it. */
650 extern const jitter_thread *
651 jitterlispvm_threads;
652 
653 /* VM instruction end label.  These are not all reachable at run time, but
654    having them in a global array might prevent older GCCs from being too clever
655    in reordering blocks. */
656 extern const jitter_thread *
657 jitterlispvm_thread_ends;
658 
659 /* The size, in chars, of each thread's native code.  The elements are in the
660    same order of jitterlispvm_threads.  Sizes could conceptually be of type size_t ,
661    but in order to be defensive I'm storing pointer differences as signed
662    values, so that we may catch compilation problems: if any VM instruction end
663    *precedes* its VM instruction beginning, then the compiler has reordered
664    labels, which would have disastrous effects with replicated code. */
665 extern const long *
666 jitterlispvm_thread_sizes;
667 #endif // #ifndef JITTER_DISPATCH_SWITCH
668 
669 /* This is defined in the machine-generated vm/meta-instructions.c . */
670 extern struct jitter_hash_table
671 jitterlispvm_meta_instruction_hash;
672 
673 /* An array specifying every existing meta-instruction, defined in the order of
674    enum jitterlispvm_meta_instruction_id .  This is defined in vm/meta-instructions.c ,
675    which is machine-generated. */
676 extern const struct jitter_meta_instruction
677 jitterlispvm_meta_instructions [];
678 
679 /* An array whose indices are specialised instruction opcodes, and
680    whose elements are the corresponding unspecialised instructions
681    opcodes -- or -1 when there is no mapping mapping having */
682 extern const int
683 jitterlispvm_specialized_instruction_to_unspecialized_instruction [];
684 
685 /* How many residual parameters each specialized instruction has.  The
686    actual array definition is machine-generated. */
687 extern const size_t
688 jitterlispvm_specialized_instruction_residual_arities [];
689 
690 /* An array of bitmasks, one per specialized instruction.  Each bitmask holds
691    one bit per residual argument, counting from the least significant (the first
692    residual arg maps to element & (1 << 0), the second to element & (1 << 1),
693    and so on).
694    Each bit is 1 if and only if the corresponding residual argument is a label
695    or a fast label.
696    Only residual arguments are counted: for example a specialized instruction
697    foo_n1_lR_r2 would have a mask with the *first* bit set. */
698 extern const unsigned long // FIXME: possibly use a shorter type when possible
699 jitterlispvm_specialized_instruction_label_bitmasks [];
700 
701 /* Like jitterlispvm_specialized_instruction_label_bitmasks , but for fast labels
702    only.
703    The actual definition is conditionalized so as to appear only when
704    needed according to the dispatching model. */
705 extern const unsigned long // FIXME: possibly use a shorter type when possible
706 jitterlispvm_specialized_instruction_fast_label_bitmasks [];
707 
708 /* An array of booleans in which each element is true iff the specialized
709    instruction whose opcode is the index is relocatable. */
710 extern const bool
711 jitterlispvm_specialized_instruction_relocatables [];
712 
713 /* An array of booleans in which each element is true iff the specialized
714    instruction whose opcode is the index is a caller. */
715 extern const bool
716 jitterlispvm_specialized_instruction_callers [];
717 
718 /* An array of booleans in which each element is true iff the specialized
719    instruction whose opcode is the index is a callee. */
720 extern const bool
721 jitterlispvm_specialized_instruction_callees [];
722 
723 /* This big array of strings contains the name of each specialized instruction,
724    in the order of enum jitterlispvm_specialized_instruction_opcode . */
725 extern const char* const
726 jitterlispvm_specialized_instruction_names [];
727 
728 
729 /* A pointer to a struct containing const pointers to the structures above, plus
730    sizes; there will be only one instance of this per VM, machine-generated.
731    Each program data structure contains a pointer to that instance, so that
732    VM-independent functions, given a program, will have everything needed to
733    work.  The one instance of struct jitter_vm for the jitterlispvm VM. */
734 extern struct jitter_vm * const
735 jitterlispvm_vm;
736 
737 /* A pointer to a struct containing VM-specific parameters set in part when
738    calling jitterc and in part when compiling the generated C code, such as the
739    dispatching model and the number of fast registers.  The data is fully
740    initialized only after a call to jitterlispvm_initialize . */
741 extern const
742 struct jitter_vm_configuration * const
743 jitterlispvm_vm_configuration;
744 
745 
746 
747 
748 /* Compatibility macros.
749  * ************************************************************************** */
750 
751 /* It is convenient, for future extensibility, to expose an interface in which
752    some VM-independent functions and data structures actually look as if they
753    were specific to the user VM. */
754 
755 /* What the user refers to as struct jitterlispvm_mutable_routine is actually a
756    struct jitter_mutable_routine , whose definition is VM-independent. */
757 #define jitterlispvm_mutable_routine jitter_mutable_routine
758 
759 /* Same for executable routines. */
760 #define jitterlispvm_executable_routine jitter_executable_routine
761 
762 /* Same for unified routines. */
763 #define jitterlispvm_routine jitter_routine
764 
765 /* Destroy a non-executable routine (routine initialization is actually
766    VM-specific). */
767 #define jitterlispvm_destroy_mutable_routine jitter_destroy_mutable_routine
768 
769 /* Destroy a unified routine. */
770 #define jitterlispvm_destroy_routine jitter_destroy_routine
771 
772 /* Pin a unified routine. */
773 #define jitterlispvm_pin_routine jitter_pin_routine
774 
775 /* Unpin a unified routine. */
776 #define jitterlispvm_unpin_routine jitter_unpin_routine
777 
778 /* Print VM configuration. */
779 #define jitterlispvm_print_vm_configuration jitter_print_vm_configuration
780 
781 /* Generic routine construction API. */
782 #define jitterlispvm_label \
783   jitter_label
784 #define jitterlispvm_fresh_label \
785   jitter_fresh_label
786 
787 /* Mutable routine option API. */
788 #define jitterlispvm_set_mutable_routine_option_slow_literals_only \
789   jitter_set_mutable_routine_option_slow_literals_only
790 #define jitterlispvm_set_mutable_routine_option_slow_registers_only \
791   jitter_set_mutable_routine_option_slow_registers_only
792 #define jitterlispvm_set_mutable_routine_option_slow_literals_and_registers_only \
793   jitter_set_mutable_routine_option_slow_literals_and_registers_only
794 #define jitterlispvm_set_mutable_routine_option_add_final_exitvm \
795   jitter_set_mutable_routine_option_add_final_exitvm
796 #define jitterlispvm_set_mutable_routine_option_optimization_rewriting \
797   jitter_set_mutable_routine_option_optimization_rewriting
798 
799 /* Printing and disassembling: ordinary API. */
800 #define jitterlispvm_mutable_routine_print \
801   jitter_mutable_routine_print
802 #define jitterlispvm_executable_routine_disassemble \
803   jitter_executable_routine_disassemble
804 
805 /* Mutable routine construction API. */
806 #define jitterlispvm_mutable_routine_append_instruction_name \
807   jitter_mutable_routine_append_instruction_name
808 #define jitterlispvm_mutable_routine_append_meta_instruction \
809   jitter_mutable_routine_append_meta_instruction
810 #define jitterlispvm_mutable_routine_append_label \
811   jitter_mutable_routine_append_label
812 #define jitterlispvm_mutable_routine_append_symbolic_label \
813   jitter_mutable_routine_append_symbolic_label
814 #define jitterlispvm_mutable_routine_append_register_parameter \
815   jitter_mutable_routine_append_register_parameter
816 #define jitterlispvm_mutable_routine_append_literal_parameter \
817   jitter_mutable_routine_append_literal_parameter
818 #define jitterlispvm_mutable_routine_append_signed_literal_parameter \
819   jitter_mutable_routine_append_signed_literal_parameter
820 #define jitterlispvm_mutable_routine_append_unsigned_literal_parameter \
821   jitter_mutable_routine_append_unsigned_literal_parameter
822 #define jitterlispvm_mutable_routine_append_pointer_literal_parameter \
823   jitter_mutable_routine_append_pointer_literal_parameter
824 #define jitterlispvm_mutable_routine_append_label_parameter \
825   jitter_mutable_routine_append_label_parameter
826 #define jitterlispvm_mutable_routine_append_symbolic_label_parameter \
827   jitter_mutable_routine_append_symbolic_label_parameter
828 
829 /* Mutable routine destruction. */
830 #define jitterlispvm_destroy_executable_routine \
831   jitter_destroy_executable_routine
832 
833 /* Making executable routines from mutable routines. */
834 #define jitterlispvm_make_executable_routine \
835   jitter_make_executable_routine
836 
837 /* Unified routine option API. */
838 #define jitterlispvm_set_routine_option_slow_literals_only \
839   jitter_set_mutable_routine_option_slow_literals_only
840 #define jitterlispvm_set_routine_option_slow_registers_only \
841   jitter_set_mutable_routine_option_slow_registers_only
842 #define jitterlispvm_set_routine_option_slow_literals_and_registers_only \
843   jitter_set_mutable_routine_option_slow_literals_and_registers_only
844 #define jitterlispvm_set_routine_option_add_final_exitvm \
845   jitter_set_mutable_routine_option_add_final_exitvm
846 #define jitterlispvm_set_routine_option_optimization_rewriting \
847   jitter_set_mutable_routine_option_optimization_rewriting
848 
849 /* Printing and disassembling: unified API.  These do not follow the pattern of
850    the rest: wrapped identifiers here are the names of C functions specific to
851    the unified API */
852 #define jitterlispvm_routine_print \
853   jitter_routine_print
854 #define jitterlispvm_routine_disassemble \
855   jitter_routine_disassemble
856 
857 /* Unified routine construction API. */
858 #define jitterlispvm_routine_append_instruction_name \
859   jitter_mutable_routine_append_instruction_name
860 #define jitterlispvm_routine_append_meta_instruction \
861   jitter_mutable_routine_append_meta_instruction
862 #define jitterlispvm_routine_append_label \
863   jitter_mutable_routine_append_label
864 #define jitterlispvm_routine_append_symbolic_label \
865   jitter_mutable_routine_append_symbolic_label
866 #define jitterlispvm_routine_append_register_parameter \
867   jitter_mutable_routine_append_register_parameter
868 #define jitterlispvm_routine_append_literal_parameter \
869   jitter_mutable_routine_append_literal_parameter
870 #define jitterlispvm_routine_append_signed_literal_parameter \
871   jitter_mutable_routine_append_signed_literal_parameter
872 #define jitterlispvm_routine_append_unsigned_literal_parameter \
873   jitter_mutable_routine_append_unsigned_literal_parameter
874 #define jitterlispvm_routine_append_pointer_literal_parameter \
875   jitter_mutable_routine_append_pointer_literal_parameter
876 #define jitterlispvm_routine_append_label_parameter \
877   jitter_mutable_routine_append_label_parameter
878 #define jitterlispvm_routine_append_symbolic_label_parameter \
879   jitter_mutable_routine_append_symbolic_label_parameter
880 
881 /* Mutable routine destruction. */
882 #define jitterlispvm_destroy_routine                                           \
883   /* This does not follow the pattern of the rest: the wrapped identifier  \
884      here is the name of a C function specific to the unified API. */      \
885   jitter_destroy_routine
886 
887 /* The unified API has no facility to explicitly make executable routines: their
888    very existence is hidden.  For this reason some of the macros above, such
889    jitterlispvm_make_executable_routine, have no unified counterpart here. */
890 
891 /* Profiling.  Apart from jitterlispvm_state_profile, which returns a pointer to
892    the profile within a pointed state structure, everything else here has the
893    same API as the functionality in jitter/jitter-profile.h , without the VM
894    pointer.
895    Notice that this API does nothing useful onless one of the CPP macros
896    JITTER_PROFILE_COUNT or JITTER_PROFILE_SAMPLE is defined. */
897 #define jitterlispvm_profile_runtime  \
898   jitter_profile_runtime /* the struct name */
899 #define jitterlispvm_profile  \
900   jitter_profile /* the struct name */
901 // FIXME: no: distinguish between struct jitter_profile_runtime and its user-friendly variant
902 struct jitter_profile_runtime *
903 jitterlispvm_state_profile_runtime (struct jitterlispvm_state *s)
904   __attribute__ ((returns_nonnull, nonnull (1)));
905 struct jitterlispvm_profile_runtime*
906 jitterlispvm_profile_runtime_make (void)
907   __attribute__ ((returns_nonnull));
908 #define jitterlispvm_profile_destroy jitter_profile_destroy
909 void
910 jitterlispvm_profile_runtime_clear (struct jitterlispvm_profile_runtime *p)
911   __attribute__ ((nonnull (1)));
912 void
913 jitterlispvm_profile_runtime_merge_from (struct jitterlispvm_profile_runtime *to,
914                                      const struct jitterlispvm_profile_runtime *from)
915   __attribute__ ((nonnull (1, 2)));
916 void
917 jitterlispvm_profile_runtime_merge_from_state (struct jitterlispvm_profile_runtime *to,
918                                    const struct jitterlispvm_state *from_state)
919   __attribute__ ((nonnull (1, 2)));
920 struct jitterlispvm_profile *
921 jitterlispvm_profile_unspecialized_from_runtime
922    (const struct jitterlispvm_profile_runtime *p)
923   __attribute__ ((returns_nonnull, nonnull (1)));
924 struct jitterlispvm_profile *
925 jitterlispvm_profile_specialized_from_runtime (const struct jitterlispvm_profile_runtime
926                                            *p)
927   __attribute__ ((returns_nonnull, nonnull (1)));
928 void
929 jitterlispvm_profile_runtime_print_unspecialized
930    (jitter_print_context ct,
931     const struct jitterlispvm_profile_runtime *p)
932   __attribute__ ((nonnull (1, 2)));
933 void
934 jitterlispvm_profile_runtime_print_specialized (jitter_print_context ct,
935                                             const struct jitterlispvm_profile_runtime
936                                             *p)
937   __attribute__ ((nonnull (1, 2)));
938 
939 
940 
941 
942 /* Register class types.
943  * ************************************************************************** */
944 
945 /* Return a pointer to a statically allocated register class descriptor, given
946    the register class character, or NULL if the character does not represent a
947    valid register class.
948 
949    A constant array indexed by a character would have been more efficient, but
950    relying on character ordering is not portable, at least in theory.  A
951    non-constant array could be initialized in a portable way, but that would
952    probably not be worth the trouble. */
953 const struct jitter_register_class *
954 jitterlispvm_register_class_character_to_register_class (char c)
955   __attribute__ ((pure));
956 
957 
958 /* A constant array of constant pointers to every existing register class
959    descriptor, ordered by class id; each pointer within the array refers the
960    only existing class descriptor for its class.  The number of elements is
961    JITTERLISPVM_REGISTER_CLASS_NO , but that is not declared because the definition
962    of JITTERLISPVM_REGISTER_CLASS_NO comes later in generated code.
963 
964    This is useful when the user code enumerates every existing register class,
965    particularly for debugging. */
966 extern const struct jitter_register_class * const
967 jitterlispvm_regiter_classes [];
968 
969 
970 
971 
972 /* Array re-allocation.
973  * ************************************************************************** */
974 
975 /* Make the Array in the pointed state large enough to accommodate the given
976    number of slow reigsters per class, adjusting the Array pointer as needed
977    and recording information about the new size in the state; change nothing
978    if the array is already large enough.  Return the new base.
979    For example passing 3 as the value of slow_register_no would make
980    place for three slow registers per register class: if the current VM had two
981    classes 'r' and 'f' than the function would ensure that the Array can hold
982    three 'r' and three 'f' slow registers, independently from the number
983    of fast 'r' or 'f' registers.
984    Any new elements allocated in the Array are left uninitialized, but its old
985    content remains valid. */
986 char *
987 jitterlispvm_make_place_for_slow_registers (struct jitterlispvm_state *s,
988                                         jitter_int slow_register_no_per_class)
989   __attribute__ ((noinline));
990 
991 
992 
993 
994 /* **************************************************************************
995  * Evrything following this point is for internal use only.
996  * ************************************************************************** */
997 
998 
999 
1000 
1001 /* Defect tables.
1002  * ************************************************************************** */
1003 
1004 /* It is harmless to declare these unconditionally, even if they only used when
1005    patch-ins are available.  See jitter/jitter-defect.h .*/
1006 
1007 /* The worst-case defect table.  This is a global constant array, having one
1008    element per specialized instruction. */
1009 extern const jitter_uint
1010 jitterlispvm_worst_case_defect_table [];
1011 
1012 /* The actual defect table, to be filled at initialization time. */
1013 extern jitter_uint
1014 jitterlispvm_defect_table [];
1015 
1016 
1017 
1018 
1019 /* Instruction rewriter.
1020  * ************************************************************************** */
1021 
1022 /* Try to apply each rewrite rule in order and run the first one that matches,
1023    if any, on the pointed program.  When a rule fires the following ones are not
1024    checked but if a rule, after removing the last few instructions, adds another
1025    one, the addition will trigger another rewrite in its turn, and so on until
1026    no more rewriting is possible.  The rewriting process is inherently
1027    recursive.
1028 
1029    The implementation of this function is machine-generated, but the user can
1030    add her own code in the rewriter-c block, which ends up near the beginning of
1031    this function body, right after JITTTER_REWRITE_FUNCTION_PROLOG_ .  The
1032    formal argument seen from the body is named jitter_mutable_routine_p .
1033 
1034    Rationale: the argument is named differently in the body in order to keep
1035    the namespace conventions and, more importantly, to encourage the user to
1036    read this comment.
1037 
1038    The user must *not* append labels to the VM routines during rewriting: that
1039    would break it.  The user is responsible for destroying any instruction she
1040    removes, including their arguments.  The user can assume that
1041    jitter_rewritable_instruction_no is strictly greater than zero. */
1042 void
1043 jitterlispvm_rewrite (struct jitter_mutable_routine *jitter_mutable_routine_p);
1044 
1045 
1046 
1047 
1048 /* Program points at run time in executable routines.
1049  * ************************************************************************** */
1050 
1051 /* Provide a nice name for a program point type which looks VM-dependent. */
1052 typedef jitter_program_point
1053 jitterlispvm_program_point;
1054 
1055 /* Again, provide a VM-dependent alias for an actually VM-independent macro. */
1056 #define JITTERLISPVM_EXECUTABLE_ROUTINE_BEGINNING(_jitter_executable_routine_ptr)  \
1057   JITTER_EXECUTABLE_ROUTINE_BEGINNING(_jitter_executable_routine_ptr)
1058 
1059 
1060 
1061 
1062 /* Program points at run time in routines: unified routine API.
1063  * ************************************************************************** */
1064 
1065 /* Like JITTERLISPVM_EXECUTABLE_ROUTINE_BEGINNING for the unified routine API. */
1066 #define JITTERLISPVM_ROUTINE_BEGINNING(_jitter_routine)                \
1067   JITTER_EXECUTABLE_ROUTINE_BEGINNING                              \
1068      (jitter_routine_make_executable_if_needed (_jitter_routine))
1069 
1070 
1071 
1072 /* Executing code from an executable routine.
1073  * ************************************************************************** */
1074 
1075 /* Make sure that the pointed state has enough slow registers to run the pointed
1076    executable routine; if that is not the case, allocate more slow registers. */
1077 void
1078 jitterlispvm_ensure_enough_slow_registers_for_executable_routine
1079    (const struct jitter_executable_routine *er, struct jitterlispvm_state *s)
1080   __attribute__ ((nonnull (1, 2)));
1081 
1082 /* Run VM code starting from the given program point (which must belong to some
1083    executable routine), in the pointed VM state.
1084 
1085    Since no executable routine is given this cannot automatically guarantee that
1086    the slow registers in the pointed state are in sufficient number; it is the
1087    user's responsibility to check, if needed.
1088 
1089    This function is also usable with the unified routine API. */
1090 void
1091 jitterlispvm_branch_to_program_point (jitterlispvm_program_point p,
1092                                   struct jitterlispvm_state *s)
1093   __attribute__ ((nonnull (1, 2)));
1094 
1095 /* Run VM code starting from the beginning of the pointed executable routine,
1096    in the pointed VM state.  This does ensure that the slow registers in
1097    the pointed state are in sufficient number, by calling
1098    jitterlispvm_ensure_enough_slow_registers_for .
1099    This function is slightly less efficient than
1100    jitterlispvm_branch_to_program_point , and jitterlispvm_branch_to_program_point
1101    should be preferred in contexts where C code repeatedly calls VM code. */
1102 void
1103 jitterlispvm_execute_executable_routine (const struct jitter_executable_routine *er,
1104                                      struct jitterlispvm_state *s)
1105   __attribute__ ((nonnull (1, 2)));
1106 
1107 
1108 
1109 
1110 /* Executing code: unified routine API.
1111  * ************************************************************************** */
1112 
1113 /* Like jitterlispvm_ensure_enough_slow_registers_for_executable_routine , with the
1114    unified API. */
1115 void
1116 jitterlispvm_ensure_enough_slow_registers_for_routine
1117    (jitter_routine r, struct jitterlispvm_state *s)
1118   __attribute__ ((nonnull (1, 2)));
1119 
1120 /* jitterlispvm_branch_to_program_point , declared above, is also usable with the
1121    unified routine API. */
1122 
1123 /* Like jitterlispvm_execute_executable_routine, for a unified routine. */
1124 void
1125 jitterlispvm_execute_routine (jitter_routine r,
1126                           struct jitterlispvm_state *s)
1127   __attribute__ ((nonnull (1, 2)));
1128 
1129 
1130 
1131 
1132 /* Low-level debugging features relying on assembly: data locations.
1133  * ************************************************************************** */
1134 
1135 /* Dump human-readable information about data locations to the given print
1136    context.
1137    This is a trivial VM-dependent wrapper around jitter_dump_data_locations,
1138    which does not require a struct jitter_vm pointer as input. */
1139 void
1140 jitterlispvm_dump_data_locations (jitter_print_context output)
1141   __attribute__ ((nonnull (1)));
1142 
1143 
1144 
1145 
1146 /* Sample profiling: internal API.
1147  * ************************************************************************** */
1148 
1149 /* The functions in this sections are used internally by vm2.c, only when
1150    sample-profiling is enabled.  In fact these functions are not defined at all
1151    otherwise. */
1152 
1153 /* Initialise global sampling-related structures. */
1154 // FIXME: no: distinguish struct jitter_profile_runtime and struct jitter_profile
1155 void
1156 jitterlispvm_profile_sample_initialize (void);
1157 
1158 /* Begin sampling. */
1159 void
1160 jitterlispvm_profile_sample_start (struct jitterlispvm_state *state)
1161   __attribute__ ((nonnull (1)));
1162 
1163 /* Stop sampling. */
1164 void
1165 jitterlispvm_profile_sample_stop (void);
1166 
1167 
1168 
1169 
1170 /* Machine-generated code.
1171  * ************************************************************************** */
1172 
1173 /* What follows could be conceptually split into several generated header files,
1174    but having too many files would be inconvenient for the user to compile and
1175    link.  For this reason we generate a single header. */
1176 
1177 /* User-specified code, early header part: beginning. */
1178 
1179 #   include "jitterlisp.h"
1180 
1181 /* If enabled, use my nonworking heap allocation stub.  This is useful to me,
1182    for playing with the still non-existent Jitter garbage collector and reason
1183    about its API. */
1184 //#define JITTER_GC_STUB
1185 
1186 /* User-specified code, early header part: end */
1187 
1188 /* Configuration data for struct jitter_vm_configuration. */
1189 #define JITTERLISPVM_VM_NAME JITTER_STRINGIFY(Jitterlispvm)
1190 #define JITTERLISPVM_LOWER_CASE_PREFIX "jitterlispvm"
1191 #define JITTERLISPVM_UPPER_CASE_PREFIX "JITTERLISPVM"
1192 #define JITTERLISPVM_DISPATCH_HUMAN_READABLE \
1193   JITTER_DISPATCH_NAME_STRING
1194 #define JITTERLISPVM_MAX_FAST_REGISTER_NO_PER_CLASS -1
1195 #define JITTERLISPVM_MAX_NONRESIDUAL_LITERAL_NO -1
1196 
1197 
1198 /* For each register class define the register type, a unique index, and the
1199    number of fast registers.  Indices are useful for computing slow register
1200    offsets.  For each register class declare a global register class
1201    descriptor, convenient to use when generating unspecialized instructions
1202    from the C API.*/
1203 typedef
1204 jitterlisp_object jitterlispvm_register_r;
1205 #define JITTERLISPVM_REGISTER_r_CLASS_ID 0
1206 #define JITTERLISPVM_REGISTER_r_FAST_REGISTER_NO 0
1207 extern const struct jitter_register_class
1208 jitterlispvm_register_class_r;
1209 
1210 /* How many register classes we have. */
1211 #define JITTERLISPVM_REGISTER_CLASS_NO  1
1212 
1213 /* A union large enough to hold a register of any class, or a machine word. */
1214 union jitterlispvm_any_register
1215 {
1216   /* In any case the union must be at least as large as a machine word. */
1217   jitter_int jitter_unused_field;
1218 
1219   jitterlispvm_register_r r /* A r-class register */;
1220 };
1221 
1222 /* An enumeration of all jitterlispvm register classes. */
1223 enum jitterlispvm_register_class_id
1224   {
1225     jitterlispvm_register_class_id_r = JITTERLISPVM_REGISTER_r_CLASS_ID,
1226 
1227     /* The number of register class ids, not valid as a class id itself. */
1228     jitterlispvm_register_class_id_no = JITTERLISPVM_REGISTER_CLASS_NO
1229   };
1230 
1231 /* A macro expanding to a statement initialising a rank of slow
1232    registers.  The argument has type union jitterlispvm_any_register *
1233    and points to the first register in a rank. */
1234 #define JITTERLISPVM_INITIALIZE_SLOW_REGISTER_RANK(rank) \
1235   do \
1236     { \
1237       union jitterlispvm_any_register *_jitter_rank __attribute__ ((unused)) \
1238         = (rank); \
1239       _jitter_rank [0].r = (jitterlisp_object) (JITTERLISP_UNDEFINED); \
1240     } \
1241   while (false)
1242 
1243 
1244 #ifndef JITTERLISPVM_STATE_H_
1245 #define JITTERLISPVM_STATE_H_
1246 
1247 //#include <jitter/jitter.h>
1248 
1249 /* Early C code from the user for the state definition. */
1250 /* End of the early C code from the user for the state definition. */
1251 
1252 /* The VM state backing. */
1253 struct jitterlispvm_state_backing
1254 {
1255   /* The Array.  This initial pointer is kept in the backing, since it is
1256      not normally needed at run time.  By subtracting JITTER_ARRAY_BIAS from
1257      it (as a pointer to char) we get the base pointer. */
1258   char *jitter_array;
1259 
1260   /* How many slow registers per class the Array can hold, without being
1261      reallocated.  This number is always the same for evey class. */
1262   jitter_int jitter_slow_register_no_per_class;
1263 
1264   /* Stack backing data structures. */
1265   struct jitter_stack_backing jitter_stack_mainstack_backing;
1266   struct jitter_stack_backing jitter_stack_returnstack_backing;
1267 
1268   /* State backing fields added in C by the user. */
1269 
1270   /* End of the state backing fields added in C by the user. */
1271 };
1272 
1273 /* The VM state runtime data structure, using memory from the VM state backing. */
1274 struct jitterlispvm_state_runtime
1275 {
1276 #if    defined(JITTER_DISPATCH_SWITCH)                   \
1277     || defined(JITTER_DISPATCH_DIRECT_THREADING)         \
1278     || defined(JITTER_DISPATCH_MINIMAL_THREADING)        \
1279     || (   defined(JITTER_DISPATCH_NO_THREADING)         \
1280         && ! defined(JITTER_MACHINE_SUPPORTS_PROCEDURE))
1281   /* A link register for branch-and-link operations.  This field must *not*
1282      be accessed from user code, as it may not exist on all dispatching
1283      models.  It is only used internally for JITTER_PROCEDURE_PROLOG. */
1284   const union jitter_word *_jitter_link;
1285 #endif
1286 
1287   /* With recent GCC versions (as of Summer 2017) the *last* declared fields
1288      are the most likely to be allocated in registers; this is why VM registers
1289      are in reverse order here.  The first few fast registers will be the "fastest"
1290      ones, allocated in hardware registers; they may be followed by other fast
1291      fast allocated on the stack at known offsets, with intermediate performance; then
1292      come the slow registers.  In critical code the users should prefer a register with as
1293      small an index as possible for best performance. */
1294 
1295   /* Stack runtime data structures. */
1296   JITTER_STACK_TOS_DECLARATION(jitterlisp_object, mainstack);
1297   JITTER_STACK_NTOS_DECLARATION(jitterlisp_object, returnstack);
1298 
1299   /* State runtime fields added in C by the user. */
1300 
1301 #ifdef JITTER_GC_STUB
1302     /* A pointer to the next free byte in the nursery.  Untagged. */
1303     char *allocation_next;
1304 
1305     /* The nursery allocation limit, untagged -- which is to say, the maximum
1306        valid address in the nursery plus 1.
1307        Notice that it is correct, is slightly conservative, to compare even a
1308        tagged pointer against this in an expression like
1309           new_tagged_pointer < allocation_limit
1310        , since a tagged pointer is always greater than or equal to its untagged
1311        counterpart. */
1312     char *allocation_limit;
1313 #endif // #ifdef JITTER_GC_STUB
1314 
1315   /* End of the state runtime fields added in C by the user. */
1316 };
1317 
1318 /* A struct holding both the backing and the runtime part of the VM state. */
1319 struct jitterlispvm_state
1320 {
1321   /* Pointers to the previous and next VM state for this VM. */
1322   struct jitter_list_links links;
1323 
1324   /* Each state data structure contains its backing. */
1325   struct jitterlispvm_state_backing jitterlispvm_state_backing;
1326 
1327   /* Each state data structure contains its runtime data structures,
1328      to be allocated to registers as long as possible, and using
1329      memory from the backing. */
1330   struct jitterlispvm_state_runtime jitterlispvm_state_runtime;
1331 };
1332 #endif // #ifndef JITTERLISPVM_STATE_H_
1333 #ifndef JITTERLISPVM_META_INSTRUCTIONS_H_
1334 #define JITTERLISPVM_META_INSTRUCTIONS_H_
1335 
1336 enum jitterlispvm_meta_instruction_id
1337   {
1338     jitterlispvm_meta_instruction_id_at_mdepth_mto_mregister = 0,
1339     jitterlispvm_meta_instruction_id_branch = 1,
1340     jitterlispvm_meta_instruction_id_branch_mif_mfalse = 2,
1341     jitterlispvm_meta_instruction_id_branch_mif_mnot_mless = 3,
1342     jitterlispvm_meta_instruction_id_branch_mif_mnot_mnull = 4,
1343     jitterlispvm_meta_instruction_id_branch_mif_mnull = 5,
1344     jitterlispvm_meta_instruction_id_branch_mif_mregister_mnon_mzero = 6,
1345     jitterlispvm_meta_instruction_id_branch_mif_mtrue = 7,
1346     jitterlispvm_meta_instruction_id_call = 8,
1347     jitterlispvm_meta_instruction_id_call_mcompiled = 9,
1348     jitterlispvm_meta_instruction_id_call_mfrom_mc = 10,
1349     jitterlispvm_meta_instruction_id_canonicalize_mboolean = 11,
1350     jitterlispvm_meta_instruction_id_check_mclosure = 12,
1351     jitterlispvm_meta_instruction_id_check_mglobal_mdefined = 13,
1352     jitterlispvm_meta_instruction_id_check_min_marity = 14,
1353     jitterlispvm_meta_instruction_id_check_min_marity_m_malt = 15,
1354     jitterlispvm_meta_instruction_id_copy_mfrom_mliteral = 16,
1355     jitterlispvm_meta_instruction_id_copy_mfrom_mregister = 17,
1356     jitterlispvm_meta_instruction_id_copy_mto_mregister = 18,
1357     jitterlispvm_meta_instruction_id_drop = 19,
1358     jitterlispvm_meta_instruction_id_drop_mnip = 20,
1359     jitterlispvm_meta_instruction_id_dup = 21,
1360     jitterlispvm_meta_instruction_id_exitvm = 22,
1361     jitterlispvm_meta_instruction_id_fail = 23,
1362     jitterlispvm_meta_instruction_id_gc_mif_mneeded = 24,
1363     jitterlispvm_meta_instruction_id_heap_mallocate = 25,
1364     jitterlispvm_meta_instruction_id_literal_mto_mregister = 26,
1365     jitterlispvm_meta_instruction_id_nip = 27,
1366     jitterlispvm_meta_instruction_id_nip_mdrop = 28,
1367     jitterlispvm_meta_instruction_id_nip_mfive = 29,
1368     jitterlispvm_meta_instruction_id_nip_mfive_mdrop = 30,
1369     jitterlispvm_meta_instruction_id_nip_mfour = 31,
1370     jitterlispvm_meta_instruction_id_nip_mfour_mdrop = 32,
1371     jitterlispvm_meta_instruction_id_nip_mpush_mliteral = 33,
1372     jitterlispvm_meta_instruction_id_nip_mpush_mregister = 34,
1373     jitterlispvm_meta_instruction_id_nip_msix = 35,
1374     jitterlispvm_meta_instruction_id_nip_msix_mdrop = 36,
1375     jitterlispvm_meta_instruction_id_nip_mthree = 37,
1376     jitterlispvm_meta_instruction_id_nip_mthree_mdrop = 38,
1377     jitterlispvm_meta_instruction_id_nip_mtwo = 39,
1378     jitterlispvm_meta_instruction_id_nip_mtwo_mdrop = 40,
1379     jitterlispvm_meta_instruction_id_nop = 41,
1380     jitterlispvm_meta_instruction_id_pop_mto_mglobal = 42,
1381     jitterlispvm_meta_instruction_id_pop_mto_mglobal_mdefined = 43,
1382     jitterlispvm_meta_instruction_id_pop_mto_mregister = 44,
1383     jitterlispvm_meta_instruction_id_primitive = 45,
1384     jitterlispvm_meta_instruction_id_primitive_mboolean_mcanonicalize = 46,
1385     jitterlispvm_meta_instruction_id_primitive_mbox = 47,
1386     jitterlispvm_meta_instruction_id_primitive_mbox_mget = 48,
1387     jitterlispvm_meta_instruction_id_primitive_mbox_msetb_mspecial = 49,
1388     jitterlispvm_meta_instruction_id_primitive_mcar = 50,
1389     jitterlispvm_meta_instruction_id_primitive_mcdr = 51,
1390     jitterlispvm_meta_instruction_id_primitive_mcharacterp = 52,
1391     jitterlispvm_meta_instruction_id_primitive_mcons_mspecial = 53,
1392     jitterlispvm_meta_instruction_id_primitive_mconsp = 54,
1393     jitterlispvm_meta_instruction_id_primitive_meqp = 55,
1394     jitterlispvm_meta_instruction_id_primitive_mfixnum_meqp = 56,
1395     jitterlispvm_meta_instruction_id_primitive_mfixnum_mnot_meqp = 57,
1396     jitterlispvm_meta_instruction_id_primitive_mfixnump = 58,
1397     jitterlispvm_meta_instruction_id_primitive_mgreaterp = 59,
1398     jitterlispvm_meta_instruction_id_primitive_mlessp = 60,
1399     jitterlispvm_meta_instruction_id_primitive_mnegate = 61,
1400     jitterlispvm_meta_instruction_id_primitive_mnegativep = 62,
1401     jitterlispvm_meta_instruction_id_primitive_mnon_mconsp = 63,
1402     jitterlispvm_meta_instruction_id_primitive_mnon_mnegativep = 64,
1403     jitterlispvm_meta_instruction_id_primitive_mnon_mnullp = 65,
1404     jitterlispvm_meta_instruction_id_primitive_mnon_mpositivep = 66,
1405     jitterlispvm_meta_instruction_id_primitive_mnon_msymbolp = 67,
1406     jitterlispvm_meta_instruction_id_primitive_mnon_mzerop = 68,
1407     jitterlispvm_meta_instruction_id_primitive_mnot = 69,
1408     jitterlispvm_meta_instruction_id_primitive_mnot_meqp = 70,
1409     jitterlispvm_meta_instruction_id_primitive_mnot_mgreaterp = 71,
1410     jitterlispvm_meta_instruction_id_primitive_mnot_mlessp = 72,
1411     jitterlispvm_meta_instruction_id_primitive_mnothingp = 73,
1412     jitterlispvm_meta_instruction_id_primitive_mnullp = 74,
1413     jitterlispvm_meta_instruction_id_primitive_mone_mminus = 75,
1414     jitterlispvm_meta_instruction_id_primitive_mone_mplus = 76,
1415     jitterlispvm_meta_instruction_id_primitive_mpositivep = 77,
1416     jitterlispvm_meta_instruction_id_primitive_mprimordial_mdivided = 78,
1417     jitterlispvm_meta_instruction_id_primitive_mprimordial_mdivided_munsafe = 79,
1418     jitterlispvm_meta_instruction_id_primitive_mprimordial_mminus = 80,
1419     jitterlispvm_meta_instruction_id_primitive_mprimordial_mplus = 81,
1420     jitterlispvm_meta_instruction_id_primitive_mprimordial_mtimes = 82,
1421     jitterlispvm_meta_instruction_id_primitive_mquotient = 83,
1422     jitterlispvm_meta_instruction_id_primitive_mquotient_munsafe = 84,
1423     jitterlispvm_meta_instruction_id_primitive_mremainder = 85,
1424     jitterlispvm_meta_instruction_id_primitive_mremainder_munsafe = 86,
1425     jitterlispvm_meta_instruction_id_primitive_mset_mcarb_mspecial = 87,
1426     jitterlispvm_meta_instruction_id_primitive_mset_mcdrb_mspecial = 88,
1427     jitterlispvm_meta_instruction_id_primitive_msymbolp = 89,
1428     jitterlispvm_meta_instruction_id_primitive_mtwo_mdivided = 90,
1429     jitterlispvm_meta_instruction_id_primitive_mtwo_mquotient = 91,
1430     jitterlispvm_meta_instruction_id_primitive_mtwo_mremainder = 92,
1431     jitterlispvm_meta_instruction_id_primitive_mtwo_mtimes = 93,
1432     jitterlispvm_meta_instruction_id_primitive_muniquep = 94,
1433     jitterlispvm_meta_instruction_id_primitive_mzerop = 95,
1434     jitterlispvm_meta_instruction_id_procedure_mprolog = 96,
1435     jitterlispvm_meta_instruction_id_push_mfalse = 97,
1436     jitterlispvm_meta_instruction_id_push_mglobal = 98,
1437     jitterlispvm_meta_instruction_id_push_mliteral = 99,
1438     jitterlispvm_meta_instruction_id_push_mnil = 100,
1439     jitterlispvm_meta_instruction_id_push_mnothing = 101,
1440     jitterlispvm_meta_instruction_id_push_mone = 102,
1441     jitterlispvm_meta_instruction_id_push_mregister = 103,
1442     jitterlispvm_meta_instruction_id_push_munspecified = 104,
1443     jitterlispvm_meta_instruction_id_push_mzero = 105,
1444     jitterlispvm_meta_instruction_id_register_mto_mregister = 106,
1445     jitterlispvm_meta_instruction_id_restore_mregister = 107,
1446     jitterlispvm_meta_instruction_id_return = 108,
1447     jitterlispvm_meta_instruction_id_save_mregister = 109,
1448     jitterlispvm_meta_instruction_id_tail_mcall = 110,
1449     jitterlispvm_meta_instruction_id_tail_mcall_mcompiled = 111,
1450     jitterlispvm_meta_instruction_id_unreachable = 112
1451   };
1452 
1453 #define JITTERLISPVM_META_INSTRUCTION_NO 113
1454 
1455 /* The longest meta-instruction name length, not mangled, without
1456    counting the final '\0' character. */
1457 #define JITTERLISPVM_MAX_META_INSTRUCTION_NAME_LENGTH 35
1458 
1459 #endif // #ifndef JITTERLISPVM_META_INSTRUCTIONS_H_
1460 #ifndef JITTERLISPVM_SPECIALIZED_INSTRUCTIONS_H_
1461 #define JITTERLISPVM_SPECIALIZED_INSTRUCTIONS_H_
1462 
1463 enum jitterlispvm_specialized_instruction_opcode
1464   {
1465     jitterlispvm_specialized_instruction_opcode__eINVALID = 0,
1466     jitterlispvm_specialized_instruction_opcode__eBEGINBASICBLOCK = 1,
1467     jitterlispvm_specialized_instruction_opcode__eEXITVM = 2,
1468     jitterlispvm_specialized_instruction_opcode__eDATALOCATIONS = 3,
1469     jitterlispvm_specialized_instruction_opcode__eNOP = 4,
1470     jitterlispvm_specialized_instruction_opcode__eUNREACHABLE0 = 5,
1471     jitterlispvm_specialized_instruction_opcode__eUNREACHABLE1 = 6,
1472     jitterlispvm_specialized_instruction_opcode__eUNREACHABLE2 = 7,
1473     jitterlispvm_specialized_instruction_opcode_at_mdepth_mto_mregister__n1___rrR = 8,
1474     jitterlispvm_specialized_instruction_opcode_at_mdepth_mto_mregister__n2___rrR = 9,
1475     jitterlispvm_specialized_instruction_opcode_at_mdepth_mto_mregister__n3___rrR = 10,
1476     jitterlispvm_specialized_instruction_opcode_at_mdepth_mto_mregister__n4___rrR = 11,
1477     jitterlispvm_specialized_instruction_opcode_at_mdepth_mto_mregister__n5___rrR = 12,
1478     jitterlispvm_specialized_instruction_opcode_at_mdepth_mto_mregister__n6___rrR = 13,
1479     jitterlispvm_specialized_instruction_opcode_at_mdepth_mto_mregister__n7___rrR = 14,
1480     jitterlispvm_specialized_instruction_opcode_at_mdepth_mto_mregister__n8___rrR = 15,
1481     jitterlispvm_specialized_instruction_opcode_at_mdepth_mto_mregister__n9___rrR = 16,
1482     jitterlispvm_specialized_instruction_opcode_at_mdepth_mto_mregister__n10___rrR = 17,
1483     jitterlispvm_specialized_instruction_opcode_at_mdepth_mto_mregister__nR___rrR = 18,
1484     jitterlispvm_specialized_instruction_opcode_branch__fR = 19,
1485     jitterlispvm_specialized_instruction_opcode_branch_mif_mfalse__fR = 20,
1486     jitterlispvm_specialized_instruction_opcode_branch_mif_mnot_mless__fR__fR = 21,
1487     jitterlispvm_specialized_instruction_opcode_branch_mif_mnot_mnull__fR = 22,
1488     jitterlispvm_specialized_instruction_opcode_branch_mif_mnull__fR = 23,
1489     jitterlispvm_specialized_instruction_opcode_branch_mif_mregister_mnon_mzero___rrR__fR__fR = 24,
1490     jitterlispvm_specialized_instruction_opcode_branch_mif_mtrue__fR = 25,
1491     jitterlispvm_specialized_instruction_opcode_call__n0__retR = 26,
1492     jitterlispvm_specialized_instruction_opcode_call__n1__retR = 27,
1493     jitterlispvm_specialized_instruction_opcode_call__n2__retR = 28,
1494     jitterlispvm_specialized_instruction_opcode_call__n3__retR = 29,
1495     jitterlispvm_specialized_instruction_opcode_call__n4__retR = 30,
1496     jitterlispvm_specialized_instruction_opcode_call__n5__retR = 31,
1497     jitterlispvm_specialized_instruction_opcode_call__n6__retR = 32,
1498     jitterlispvm_specialized_instruction_opcode_call__n7__retR = 33,
1499     jitterlispvm_specialized_instruction_opcode_call__n8__retR = 34,
1500     jitterlispvm_specialized_instruction_opcode_call__n9__retR = 35,
1501     jitterlispvm_specialized_instruction_opcode_call__n10__retR = 36,
1502     jitterlispvm_specialized_instruction_opcode_call__nR__retR = 37,
1503     jitterlispvm_specialized_instruction_opcode_call_mcompiled__n0__retR = 38,
1504     jitterlispvm_specialized_instruction_opcode_call_mcompiled__n1__retR = 39,
1505     jitterlispvm_specialized_instruction_opcode_call_mcompiled__n2__retR = 40,
1506     jitterlispvm_specialized_instruction_opcode_call_mcompiled__n3__retR = 41,
1507     jitterlispvm_specialized_instruction_opcode_call_mcompiled__n4__retR = 42,
1508     jitterlispvm_specialized_instruction_opcode_call_mcompiled__n5__retR = 43,
1509     jitterlispvm_specialized_instruction_opcode_call_mcompiled__n6__retR = 44,
1510     jitterlispvm_specialized_instruction_opcode_call_mcompiled__n7__retR = 45,
1511     jitterlispvm_specialized_instruction_opcode_call_mcompiled__n8__retR = 46,
1512     jitterlispvm_specialized_instruction_opcode_call_mcompiled__n9__retR = 47,
1513     jitterlispvm_specialized_instruction_opcode_call_mcompiled__n10__retR = 48,
1514     jitterlispvm_specialized_instruction_opcode_call_mcompiled__nR__retR = 49,
1515     jitterlispvm_specialized_instruction_opcode_call_mfrom_mc__retR = 50,
1516     jitterlispvm_specialized_instruction_opcode_canonicalize_mboolean = 51,
1517     jitterlispvm_specialized_instruction_opcode_check_mclosure__fR = 52,
1518     jitterlispvm_specialized_instruction_opcode_check_mglobal_mdefined__nR__fR = 53,
1519     jitterlispvm_specialized_instruction_opcode_check_min_marity__n0__fR = 54,
1520     jitterlispvm_specialized_instruction_opcode_check_min_marity__n1__fR = 55,
1521     jitterlispvm_specialized_instruction_opcode_check_min_marity__n2__fR = 56,
1522     jitterlispvm_specialized_instruction_opcode_check_min_marity__n3__fR = 57,
1523     jitterlispvm_specialized_instruction_opcode_check_min_marity__n4__fR = 58,
1524     jitterlispvm_specialized_instruction_opcode_check_min_marity__n5__fR = 59,
1525     jitterlispvm_specialized_instruction_opcode_check_min_marity__n6__fR = 60,
1526     jitterlispvm_specialized_instruction_opcode_check_min_marity__n7__fR = 61,
1527     jitterlispvm_specialized_instruction_opcode_check_min_marity__n8__fR = 62,
1528     jitterlispvm_specialized_instruction_opcode_check_min_marity__n9__fR = 63,
1529     jitterlispvm_specialized_instruction_opcode_check_min_marity__n10__fR = 64,
1530     jitterlispvm_specialized_instruction_opcode_check_min_marity__nR__fR = 65,
1531     jitterlispvm_specialized_instruction_opcode_check_min_marity_m_malt__n0__fR = 66,
1532     jitterlispvm_specialized_instruction_opcode_check_min_marity_m_malt__n1__fR = 67,
1533     jitterlispvm_specialized_instruction_opcode_check_min_marity_m_malt__n2__fR = 68,
1534     jitterlispvm_specialized_instruction_opcode_check_min_marity_m_malt__n3__fR = 69,
1535     jitterlispvm_specialized_instruction_opcode_check_min_marity_m_malt__n4__fR = 70,
1536     jitterlispvm_specialized_instruction_opcode_check_min_marity_m_malt__n5__fR = 71,
1537     jitterlispvm_specialized_instruction_opcode_check_min_marity_m_malt__n6__fR = 72,
1538     jitterlispvm_specialized_instruction_opcode_check_min_marity_m_malt__n7__fR = 73,
1539     jitterlispvm_specialized_instruction_opcode_check_min_marity_m_malt__n8__fR = 74,
1540     jitterlispvm_specialized_instruction_opcode_check_min_marity_m_malt__n9__fR = 75,
1541     jitterlispvm_specialized_instruction_opcode_check_min_marity_m_malt__n10__fR = 76,
1542     jitterlispvm_specialized_instruction_opcode_check_min_marity_m_malt__nR__fR = 77,
1543     jitterlispvm_specialized_instruction_opcode_copy_mfrom_mliteral__nR = 78,
1544     jitterlispvm_specialized_instruction_opcode_copy_mfrom_mregister___rrR = 79,
1545     jitterlispvm_specialized_instruction_opcode_copy_mto_mregister___rrR = 80,
1546     jitterlispvm_specialized_instruction_opcode_drop = 81,
1547     jitterlispvm_specialized_instruction_opcode_drop_mnip = 82,
1548     jitterlispvm_specialized_instruction_opcode_dup = 83,
1549     jitterlispvm_specialized_instruction_opcode_exitvm = 84,
1550     jitterlispvm_specialized_instruction_opcode_fail__retR = 85,
1551     jitterlispvm_specialized_instruction_opcode_gc_mif_mneeded__fR = 86,
1552     jitterlispvm_specialized_instruction_opcode_heap_mallocate__n4 = 87,
1553     jitterlispvm_specialized_instruction_opcode_heap_mallocate__n8 = 88,
1554     jitterlispvm_specialized_instruction_opcode_heap_mallocate__n12 = 89,
1555     jitterlispvm_specialized_instruction_opcode_heap_mallocate__n16 = 90,
1556     jitterlispvm_specialized_instruction_opcode_heap_mallocate__n24 = 91,
1557     jitterlispvm_specialized_instruction_opcode_heap_mallocate__n32 = 92,
1558     jitterlispvm_specialized_instruction_opcode_heap_mallocate__n36 = 93,
1559     jitterlispvm_specialized_instruction_opcode_heap_mallocate__n48 = 94,
1560     jitterlispvm_specialized_instruction_opcode_heap_mallocate__n52 = 95,
1561     jitterlispvm_specialized_instruction_opcode_heap_mallocate__n64 = 96,
1562     jitterlispvm_specialized_instruction_opcode_heap_mallocate__nR = 97,
1563     jitterlispvm_specialized_instruction_opcode_literal_mto_mregister__nR___rrR = 98,
1564     jitterlispvm_specialized_instruction_opcode_nip = 99,
1565     jitterlispvm_specialized_instruction_opcode_nip_mdrop = 100,
1566     jitterlispvm_specialized_instruction_opcode_nip_mfive = 101,
1567     jitterlispvm_specialized_instruction_opcode_nip_mfive_mdrop = 102,
1568     jitterlispvm_specialized_instruction_opcode_nip_mfour = 103,
1569     jitterlispvm_specialized_instruction_opcode_nip_mfour_mdrop = 104,
1570     jitterlispvm_specialized_instruction_opcode_nip_mpush_mliteral__nR = 105,
1571     jitterlispvm_specialized_instruction_opcode_nip_mpush_mregister___rrR = 106,
1572     jitterlispvm_specialized_instruction_opcode_nip_msix = 107,
1573     jitterlispvm_specialized_instruction_opcode_nip_msix_mdrop = 108,
1574     jitterlispvm_specialized_instruction_opcode_nip_mthree = 109,
1575     jitterlispvm_specialized_instruction_opcode_nip_mthree_mdrop = 110,
1576     jitterlispvm_specialized_instruction_opcode_nip_mtwo = 111,
1577     jitterlispvm_specialized_instruction_opcode_nip_mtwo_mdrop = 112,
1578     jitterlispvm_specialized_instruction_opcode_nop = 113,
1579     jitterlispvm_specialized_instruction_opcode_pop_mto_mglobal__nR__fR = 114,
1580     jitterlispvm_specialized_instruction_opcode_pop_mto_mglobal_mdefined__nR__fR = 115,
1581     jitterlispvm_specialized_instruction_opcode_pop_mto_mregister___rrR = 116,
1582     jitterlispvm_specialized_instruction_opcode_primitive__nR__n0__fR = 117,
1583     jitterlispvm_specialized_instruction_opcode_primitive__nR__n1__fR = 118,
1584     jitterlispvm_specialized_instruction_opcode_primitive__nR__n2__fR = 119,
1585     jitterlispvm_specialized_instruction_opcode_primitive__nR__n3__fR = 120,
1586     jitterlispvm_specialized_instruction_opcode_primitive__nR__n4__fR = 121,
1587     jitterlispvm_specialized_instruction_opcode_primitive__nR__nR__fR = 122,
1588     jitterlispvm_specialized_instruction_opcode_primitive_mboolean_mcanonicalize = 123,
1589     jitterlispvm_specialized_instruction_opcode_primitive_mbox = 124,
1590     jitterlispvm_specialized_instruction_opcode_primitive_mbox_mget__fR = 125,
1591     jitterlispvm_specialized_instruction_opcode_primitive_mbox_msetb_mspecial__fR = 126,
1592     jitterlispvm_specialized_instruction_opcode_primitive_mcar__fR = 127,
1593     jitterlispvm_specialized_instruction_opcode_primitive_mcdr__fR = 128,
1594     jitterlispvm_specialized_instruction_opcode_primitive_mcharacterp = 129,
1595     jitterlispvm_specialized_instruction_opcode_primitive_mcons_mspecial = 130,
1596     jitterlispvm_specialized_instruction_opcode_primitive_mconsp = 131,
1597     jitterlispvm_specialized_instruction_opcode_primitive_meqp = 132,
1598     jitterlispvm_specialized_instruction_opcode_primitive_mfixnum_meqp__fR = 133,
1599     jitterlispvm_specialized_instruction_opcode_primitive_mfixnum_mnot_meqp__fR = 134,
1600     jitterlispvm_specialized_instruction_opcode_primitive_mfixnump = 135,
1601     jitterlispvm_specialized_instruction_opcode_primitive_mgreaterp__fR = 136,
1602     jitterlispvm_specialized_instruction_opcode_primitive_mlessp__fR = 137,
1603     jitterlispvm_specialized_instruction_opcode_primitive_mnegate__fR = 138,
1604     jitterlispvm_specialized_instruction_opcode_primitive_mnegativep__fR = 139,
1605     jitterlispvm_specialized_instruction_opcode_primitive_mnon_mconsp = 140,
1606     jitterlispvm_specialized_instruction_opcode_primitive_mnon_mnegativep__fR = 141,
1607     jitterlispvm_specialized_instruction_opcode_primitive_mnon_mnullp = 142,
1608     jitterlispvm_specialized_instruction_opcode_primitive_mnon_mpositivep__fR = 143,
1609     jitterlispvm_specialized_instruction_opcode_primitive_mnon_msymbolp = 144,
1610     jitterlispvm_specialized_instruction_opcode_primitive_mnon_mzerop__fR = 145,
1611     jitterlispvm_specialized_instruction_opcode_primitive_mnot = 146,
1612     jitterlispvm_specialized_instruction_opcode_primitive_mnot_meqp = 147,
1613     jitterlispvm_specialized_instruction_opcode_primitive_mnot_mgreaterp__fR = 148,
1614     jitterlispvm_specialized_instruction_opcode_primitive_mnot_mlessp__fR = 149,
1615     jitterlispvm_specialized_instruction_opcode_primitive_mnothingp = 150,
1616     jitterlispvm_specialized_instruction_opcode_primitive_mnullp = 151,
1617     jitterlispvm_specialized_instruction_opcode_primitive_mone_mminus__fR = 152,
1618     jitterlispvm_specialized_instruction_opcode_primitive_mone_mplus__fR = 153,
1619     jitterlispvm_specialized_instruction_opcode_primitive_mpositivep__fR = 154,
1620     jitterlispvm_specialized_instruction_opcode_primitive_mprimordial_mdivided__fR = 155,
1621     jitterlispvm_specialized_instruction_opcode_primitive_mprimordial_mdivided_munsafe__fR = 156,
1622     jitterlispvm_specialized_instruction_opcode_primitive_mprimordial_mminus__fR = 157,
1623     jitterlispvm_specialized_instruction_opcode_primitive_mprimordial_mplus__fR = 158,
1624     jitterlispvm_specialized_instruction_opcode_primitive_mprimordial_mtimes__fR = 159,
1625     jitterlispvm_specialized_instruction_opcode_primitive_mquotient__fR = 160,
1626     jitterlispvm_specialized_instruction_opcode_primitive_mquotient_munsafe__fR = 161,
1627     jitterlispvm_specialized_instruction_opcode_primitive_mremainder__fR = 162,
1628     jitterlispvm_specialized_instruction_opcode_primitive_mremainder_munsafe__fR = 163,
1629     jitterlispvm_specialized_instruction_opcode_primitive_mset_mcarb_mspecial__fR = 164,
1630     jitterlispvm_specialized_instruction_opcode_primitive_mset_mcdrb_mspecial__fR = 165,
1631     jitterlispvm_specialized_instruction_opcode_primitive_msymbolp = 166,
1632     jitterlispvm_specialized_instruction_opcode_primitive_mtwo_mdivided__fR = 167,
1633     jitterlispvm_specialized_instruction_opcode_primitive_mtwo_mquotient__fR = 168,
1634     jitterlispvm_specialized_instruction_opcode_primitive_mtwo_mremainder__fR = 169,
1635     jitterlispvm_specialized_instruction_opcode_primitive_mtwo_mtimes__fR = 170,
1636     jitterlispvm_specialized_instruction_opcode_primitive_muniquep = 171,
1637     jitterlispvm_specialized_instruction_opcode_primitive_mzerop__fR = 172,
1638     jitterlispvm_specialized_instruction_opcode_procedure_mprolog = 173,
1639     jitterlispvm_specialized_instruction_opcode_push_mfalse = 174,
1640     jitterlispvm_specialized_instruction_opcode_push_mglobal__nR__fR = 175,
1641     jitterlispvm_specialized_instruction_opcode_push_mliteral__nR = 176,
1642     jitterlispvm_specialized_instruction_opcode_push_mnil = 177,
1643     jitterlispvm_specialized_instruction_opcode_push_mnothing = 178,
1644     jitterlispvm_specialized_instruction_opcode_push_mone = 179,
1645     jitterlispvm_specialized_instruction_opcode_push_mregister___rrR = 180,
1646     jitterlispvm_specialized_instruction_opcode_push_munspecified = 181,
1647     jitterlispvm_specialized_instruction_opcode_push_mzero = 182,
1648     jitterlispvm_specialized_instruction_opcode_register_mto_mregister___rrR___rrR = 183,
1649     jitterlispvm_specialized_instruction_opcode_restore_mregister___rrR = 184,
1650     jitterlispvm_specialized_instruction_opcode_return = 185,
1651     jitterlispvm_specialized_instruction_opcode_save_mregister___rrR = 186,
1652     jitterlispvm_specialized_instruction_opcode_tail_mcall__n0 = 187,
1653     jitterlispvm_specialized_instruction_opcode_tail_mcall__n1 = 188,
1654     jitterlispvm_specialized_instruction_opcode_tail_mcall__n2 = 189,
1655     jitterlispvm_specialized_instruction_opcode_tail_mcall__n3 = 190,
1656     jitterlispvm_specialized_instruction_opcode_tail_mcall__n4 = 191,
1657     jitterlispvm_specialized_instruction_opcode_tail_mcall__n5 = 192,
1658     jitterlispvm_specialized_instruction_opcode_tail_mcall__n6 = 193,
1659     jitterlispvm_specialized_instruction_opcode_tail_mcall__n7 = 194,
1660     jitterlispvm_specialized_instruction_opcode_tail_mcall__n8 = 195,
1661     jitterlispvm_specialized_instruction_opcode_tail_mcall__n9 = 196,
1662     jitterlispvm_specialized_instruction_opcode_tail_mcall__n10 = 197,
1663     jitterlispvm_specialized_instruction_opcode_tail_mcall__nR = 198,
1664     jitterlispvm_specialized_instruction_opcode_tail_mcall_mcompiled__n0 = 199,
1665     jitterlispvm_specialized_instruction_opcode_tail_mcall_mcompiled__n1 = 200,
1666     jitterlispvm_specialized_instruction_opcode_tail_mcall_mcompiled__n2 = 201,
1667     jitterlispvm_specialized_instruction_opcode_tail_mcall_mcompiled__n3 = 202,
1668     jitterlispvm_specialized_instruction_opcode_tail_mcall_mcompiled__n4 = 203,
1669     jitterlispvm_specialized_instruction_opcode_tail_mcall_mcompiled__n5 = 204,
1670     jitterlispvm_specialized_instruction_opcode_tail_mcall_mcompiled__n6 = 205,
1671     jitterlispvm_specialized_instruction_opcode_tail_mcall_mcompiled__n7 = 206,
1672     jitterlispvm_specialized_instruction_opcode_tail_mcall_mcompiled__n8 = 207,
1673     jitterlispvm_specialized_instruction_opcode_tail_mcall_mcompiled__n9 = 208,
1674     jitterlispvm_specialized_instruction_opcode_tail_mcall_mcompiled__n10 = 209,
1675     jitterlispvm_specialized_instruction_opcode_tail_mcall_mcompiled__nR = 210,
1676     jitterlispvm_specialized_instruction_opcode_unreachable = 211,
1677     jitterlispvm_specialized_instruction_opcode__Abranch__fR_A_mno_mfast_mbranches = 212,
1678     jitterlispvm_specialized_instruction_opcode__Abranch_mif_mfalse__fR_A_mno_mfast_mbranches = 213,
1679     jitterlispvm_specialized_instruction_opcode__Abranch_mif_mnot_mless__fR__fR_A_mno_mfast_mbranches = 214,
1680     jitterlispvm_specialized_instruction_opcode__Abranch_mif_mnot_mnull__fR_A_mno_mfast_mbranches = 215,
1681     jitterlispvm_specialized_instruction_opcode__Abranch_mif_mnull__fR_A_mno_mfast_mbranches = 216,
1682     jitterlispvm_specialized_instruction_opcode__Abranch_mif_mregister_mnon_mzero___rrR__fR__fR_A_mno_mfast_mbranches = 217,
1683     jitterlispvm_specialized_instruction_opcode__Abranch_mif_mtrue__fR_A_mno_mfast_mbranches = 218,
1684     jitterlispvm_specialized_instruction_opcode__Acheck_mclosure__fR_A_mno_mfast_mbranches = 219,
1685     jitterlispvm_specialized_instruction_opcode__Acheck_mglobal_mdefined__nR__fR_A_mno_mfast_mbranches = 220,
1686     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity__n0__fR_A_mno_mfast_mbranches = 221,
1687     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity__n1__fR_A_mno_mfast_mbranches = 222,
1688     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity__n2__fR_A_mno_mfast_mbranches = 223,
1689     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity__n3__fR_A_mno_mfast_mbranches = 224,
1690     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity__n4__fR_A_mno_mfast_mbranches = 225,
1691     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity__n5__fR_A_mno_mfast_mbranches = 226,
1692     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity__n6__fR_A_mno_mfast_mbranches = 227,
1693     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity__n7__fR_A_mno_mfast_mbranches = 228,
1694     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity__n8__fR_A_mno_mfast_mbranches = 229,
1695     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity__n9__fR_A_mno_mfast_mbranches = 230,
1696     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity__n10__fR_A_mno_mfast_mbranches = 231,
1697     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity__nR__fR_A_mno_mfast_mbranches = 232,
1698     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity_m_malt__n0__fR_A_mno_mfast_mbranches = 233,
1699     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity_m_malt__n1__fR_A_mno_mfast_mbranches = 234,
1700     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity_m_malt__n2__fR_A_mno_mfast_mbranches = 235,
1701     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity_m_malt__n3__fR_A_mno_mfast_mbranches = 236,
1702     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity_m_malt__n4__fR_A_mno_mfast_mbranches = 237,
1703     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity_m_malt__n5__fR_A_mno_mfast_mbranches = 238,
1704     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity_m_malt__n6__fR_A_mno_mfast_mbranches = 239,
1705     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity_m_malt__n7__fR_A_mno_mfast_mbranches = 240,
1706     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity_m_malt__n8__fR_A_mno_mfast_mbranches = 241,
1707     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity_m_malt__n9__fR_A_mno_mfast_mbranches = 242,
1708     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity_m_malt__n10__fR_A_mno_mfast_mbranches = 243,
1709     jitterlispvm_specialized_instruction_opcode__Acheck_min_marity_m_malt__nR__fR_A_mno_mfast_mbranches = 244,
1710     jitterlispvm_specialized_instruction_opcode__Agc_mif_mneeded__fR_A_mno_mfast_mbranches = 245,
1711     jitterlispvm_specialized_instruction_opcode__Apop_mto_mglobal__nR__fR_A_mno_mfast_mbranches = 246,
1712     jitterlispvm_specialized_instruction_opcode__Apop_mto_mglobal_mdefined__nR__fR_A_mno_mfast_mbranches = 247,
1713     jitterlispvm_specialized_instruction_opcode__Aprimitive__nR__n0__fR_A_mno_mfast_mbranches = 248,
1714     jitterlispvm_specialized_instruction_opcode__Aprimitive__nR__n1__fR_A_mno_mfast_mbranches = 249,
1715     jitterlispvm_specialized_instruction_opcode__Aprimitive__nR__n2__fR_A_mno_mfast_mbranches = 250,
1716     jitterlispvm_specialized_instruction_opcode__Aprimitive__nR__n3__fR_A_mno_mfast_mbranches = 251,
1717     jitterlispvm_specialized_instruction_opcode__Aprimitive__nR__n4__fR_A_mno_mfast_mbranches = 252,
1718     jitterlispvm_specialized_instruction_opcode__Aprimitive__nR__nR__fR_A_mno_mfast_mbranches = 253,
1719     jitterlispvm_specialized_instruction_opcode__Aprimitive_mbox_mget__fR_A_mno_mfast_mbranches = 254,
1720     jitterlispvm_specialized_instruction_opcode__Aprimitive_mbox_msetb_mspecial__fR_A_mno_mfast_mbranches = 255,
1721     jitterlispvm_specialized_instruction_opcode__Aprimitive_mcar__fR_A_mno_mfast_mbranches = 256,
1722     jitterlispvm_specialized_instruction_opcode__Aprimitive_mcdr__fR_A_mno_mfast_mbranches = 257,
1723     jitterlispvm_specialized_instruction_opcode__Aprimitive_mfixnum_meqp__fR_A_mno_mfast_mbranches = 258,
1724     jitterlispvm_specialized_instruction_opcode__Aprimitive_mfixnum_mnot_meqp__fR_A_mno_mfast_mbranches = 259,
1725     jitterlispvm_specialized_instruction_opcode__Aprimitive_mgreaterp__fR_A_mno_mfast_mbranches = 260,
1726     jitterlispvm_specialized_instruction_opcode__Aprimitive_mlessp__fR_A_mno_mfast_mbranches = 261,
1727     jitterlispvm_specialized_instruction_opcode__Aprimitive_mnegate__fR_A_mno_mfast_mbranches = 262,
1728     jitterlispvm_specialized_instruction_opcode__Aprimitive_mnegativep__fR_A_mno_mfast_mbranches = 263,
1729     jitterlispvm_specialized_instruction_opcode__Aprimitive_mnon_mnegativep__fR_A_mno_mfast_mbranches = 264,
1730     jitterlispvm_specialized_instruction_opcode__Aprimitive_mnon_mpositivep__fR_A_mno_mfast_mbranches = 265,
1731     jitterlispvm_specialized_instruction_opcode__Aprimitive_mnon_mzerop__fR_A_mno_mfast_mbranches = 266,
1732     jitterlispvm_specialized_instruction_opcode__Aprimitive_mnot_mgreaterp__fR_A_mno_mfast_mbranches = 267,
1733     jitterlispvm_specialized_instruction_opcode__Aprimitive_mnot_mlessp__fR_A_mno_mfast_mbranches = 268,
1734     jitterlispvm_specialized_instruction_opcode__Aprimitive_mone_mminus__fR_A_mno_mfast_mbranches = 269,
1735     jitterlispvm_specialized_instruction_opcode__Aprimitive_mone_mplus__fR_A_mno_mfast_mbranches = 270,
1736     jitterlispvm_specialized_instruction_opcode__Aprimitive_mpositivep__fR_A_mno_mfast_mbranches = 271,
1737     jitterlispvm_specialized_instruction_opcode__Aprimitive_mprimordial_mdivided__fR_A_mno_mfast_mbranches = 272,
1738     jitterlispvm_specialized_instruction_opcode__Aprimitive_mprimordial_mdivided_munsafe__fR_A_mno_mfast_mbranches = 273,
1739     jitterlispvm_specialized_instruction_opcode__Aprimitive_mprimordial_mminus__fR_A_mno_mfast_mbranches = 274,
1740     jitterlispvm_specialized_instruction_opcode__Aprimitive_mprimordial_mplus__fR_A_mno_mfast_mbranches = 275,
1741     jitterlispvm_specialized_instruction_opcode__Aprimitive_mprimordial_mtimes__fR_A_mno_mfast_mbranches = 276,
1742     jitterlispvm_specialized_instruction_opcode__Aprimitive_mquotient__fR_A_mno_mfast_mbranches = 277,
1743     jitterlispvm_specialized_instruction_opcode__Aprimitive_mquotient_munsafe__fR_A_mno_mfast_mbranches = 278,
1744     jitterlispvm_specialized_instruction_opcode__Aprimitive_mremainder__fR_A_mno_mfast_mbranches = 279,
1745     jitterlispvm_specialized_instruction_opcode__Aprimitive_mremainder_munsafe__fR_A_mno_mfast_mbranches = 280,
1746     jitterlispvm_specialized_instruction_opcode__Aprimitive_mset_mcarb_mspecial__fR_A_mno_mfast_mbranches = 281,
1747     jitterlispvm_specialized_instruction_opcode__Aprimitive_mset_mcdrb_mspecial__fR_A_mno_mfast_mbranches = 282,
1748     jitterlispvm_specialized_instruction_opcode__Aprimitive_mtwo_mdivided__fR_A_mno_mfast_mbranches = 283,
1749     jitterlispvm_specialized_instruction_opcode__Aprimitive_mtwo_mquotient__fR_A_mno_mfast_mbranches = 284,
1750     jitterlispvm_specialized_instruction_opcode__Aprimitive_mtwo_mremainder__fR_A_mno_mfast_mbranches = 285,
1751     jitterlispvm_specialized_instruction_opcode__Aprimitive_mtwo_mtimes__fR_A_mno_mfast_mbranches = 286,
1752     jitterlispvm_specialized_instruction_opcode__Aprimitive_mzerop__fR_A_mno_mfast_mbranches = 287,
1753     jitterlispvm_specialized_instruction_opcode__Apush_mglobal__nR__fR_A_mno_mfast_mbranches = 288
1754   };
1755 
1756 #define JITTERLISPVM_SPECIALIZED_INSTRUCTION_NO 289
1757 
1758 #endif // #ifndef JITTERLISPVM_SPECIALIZED_INSTRUCTIONS_H_
1759 /* How many residuals we can have at most.  This, with some dispatching models,
1760    is needed to compute a slow register offset from the base. */
1761 #define JITTERLISPVM_MAX_RESIDUAL_ARITY  3
1762 
1763 /* User-specified code, late header part: beginning. */
1764 
1765 
1766 /* User-specified code, late header part: end */
1767 
1768 
1769 /* Close the multiple-inclusion guard opened in the template. */
1770 #endif // #ifndef JITTERLISPVM_VM_H_
1771