* src/vm/hashtable.h,
[cacao.git] / src / vm / jit / intrp / java.vmg
1 \
2 \ JVM instruction specs
3 \
4 \ This file contains primitive specifications in the following format:
5
6 \ name ( stack effect ) [ number ]
7 \ [""glossary entry""]
8 \ C code
9 \ [:
10 \ Forth code]
11
12 \ Note: Fields in brackets are optional.  Word specifications have to
13 \ be separated by at least one empty line
14 \
15 \ Both name and stack items (in the stack effect) must
16 \ conform to the C identifier syntax or the C compiler will complain.
17 \ The branch field can be one of "branch", "cond", "indirect", or empty.
18
19 \ These specifications are automatically translated into C-code for the
20 \ interpreter and into some other files. I hope that your C compiler has
21 \ decent optimization, otherwise the automatically generated code will
22 \ be somewhat slow. The Forth version of the code is included for manual
23 \ compilers, so they will need to compile only the important words.
24
25 \ Note that stack pointer adjustment is performed according to stack
26 \ effect by automatically generated code and NEXT is automatically
27 \ appended to the C code. Also, you can use the names in the stack
28 \ effect in the C code. Stack access is automatic. One exception: if
29 \ your code does not fall through, the results are not stored into the
30 \ stack. Use different names on both sides of the '--', if you change a
31 \ value (some stores to the stack are optimized away).
32
33
34 \E stack data-stack sp Cell
35 \E
36 \E s" u4"                  single data-stack type-prefix ui
37 \E s" Cell"                single data-stack type-prefix v
38 \E s" s4"                  single data-stack type-prefix b \ byte
39 \E s" s4"                  single data-stack type-prefix s \ short
40 \E s" s4"                  single data-stack type-prefix i
41 \E s" s8"                  double data-stack type-prefix l
42 \E s" float"               single data-stack type-prefix f
43 \E s" double"              double data-stack type-prefix d
44
45 \ we use a lot of types for the former "a" (address) type; this gives
46 \ better typechecking in the C code, and allows better output from the
47 \ disassembler and the tracer.
48
49 \E s" java_objectheader *" single data-stack type-prefix aRef
50 \E s" java_arrayheader *"  single data-stack type-prefix aArray
51 \E s" Inst **"             single data-stack type-prefix aaTarget
52 \E s" classinfo *"         single data-stack type-prefix aClass
53 \E s" constant_classref *" single data-stack type-prefix acr
54 \E s" u1 *"                single data-stack type-prefix addr
55 \E s" functionptr"         single data-stack type-prefix af
56 \E s" methodinfo *"        single data-stack type-prefix am
57 \E s" Cell *"              single data-stack type-prefix acell
58 \E s" Inst *"              single data-stack type-prefix ainst
59 \E s" unresolved_field *"  single data-stack type-prefix auf
60 \E s" unresolved_method *" single data-stack type-prefix aum
61 \E s" vftbl_t *"           single data-stack type-prefix avftbl
62 \E inst-stream  stack-prefix #
63
64 \ The stack variables have the following types:
65
66 \ name matches  type
67 \ i.*           jint
68 \ l.*           jlong
69 \ s.*           Jshort
70 \ b.*           Jbyte
71 \ c.*           Jchar
72 \ f.*           jfloat
73 \ d.*           jdouble
74 \ a.*           jref
75 \ r.*           Jretaddr
76 \
77
78 \ Starting a name with # indicates an inline argument instead of a stack
79 \ argument; the rest of the name matches as usual.
80
81 \
82 \ Questions:
83 \      How does prims2x know the length of each instruction,
84 \      where the instruction has immediate operands. We need
85 \      some way to communicate this or compute it.
86 \
87 \      Some instructions don't care about the type of the
88 \      values that they work with. For example, POP doesn't
89 \      care what type the value on the top of the stack is.
90 \      We need to communicate this.
91 \      I'll add a type v (for void, or variable, whichever you
92 \      prefer) which just means there's one element of the normal
93 \      size on the stack, and we don't care what its type is.
94 \
95 \
96 \ /*
97 \ Define the following macros before including this file.
98 \
99 \ # define instr(name,opcode,label,len,syntax,body) 
100 \ # define undef(name,opcode,label,len,syntax,body) 
101 \ # define custm(name,opcode,label,len,syntax,body) 
102 \
103 \
104 \ To avoid race conditions, rewriting proceeds as follows: 
105 \  1) the needed operands are fetched from the orignal byte code 
106 \  2) the new operands are written
107 \  3) the new operator is written
108 \  4) the quick-version of the instruction is executed.
109 \
110 \ Note: the byte code remains unchanged.
111
112 \ */
113
114 \ stack cache setup
115
116 \E register IPTOS Cell
117 \E register spTOS Cell
118
119 \E create IPregs IPTOS ,
120 \E create regs spTOS ,
121
122 \E IPregs 1 0 stack-state IPss1
123 \E regs 1 0 stack-state ss0
124
125 \ the first of these is the default state
126 \E state S0
127
128 \E ss0 data-stack S0 set-ss
129
130 \E IPss1 inst-stream S0 set-ss
131
132 \E data-stack to cache-stack
133 \E here 1 cache-states 2! s0 ,
134
135 \ !! the following should be automatic
136 \E S0 to state-default
137 \E state-default to state-in
138 \E state-default to state-out
139
140 \E s" codegendata *" threaded-code-pointer-type 2!
141
142 \ This is stub code for methods that we have not yet translated.
143 \ Initially, the code for each method is set to this stub. The
144 \ first time the method is called, the code in the stub runs, which
145 \ translates the bytecode, and replaces the stub with the threaded code.
146
147 \ instr(NOP, 0, nop, 1, op, {})
148
149 ICONST ( #vConst -- vConst ) opt
150
151 LCONST ( #l -- l ) opt
152
153 ACONST ( #aRef -- aRef ) opt
154
155 ACONST1 ( #aRef #acrUnused -- aRef ) opt
156
157 PATCHER_ACONST ( #aRef #acr ... -- )
158 stackframeinfo sfi;
159 bool result;
160 global_sp = sp;
161 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
162 result = intrp_patcher_aconst((u1 *) (IP - 3));
163 stacktrace_remove_stackframeinfo(&sfi);
164 CLEAR_global_sp;
165 if (!result)
166   THROW0;
167 STORE_ORDER_BARRIER();
168 IP[-3] = INST_ADDR(ACONST1);
169 SET_IP(IP - 3);
170 patchersuper_rewrite(IP);
171
172 ILOAD ( #vLocal -- vResult ) 0x15
173 {
174   vResult = access_local_int(vLocal);
175 }
176
177 LLOAD ( #vLocal -- lResult ) 0x16
178 {
179   vm_twoCell2l(access_local_cell(vLocal), access_local_cell(vLocal-SIZEOF_VOID_P), lResult);
180 }
181
182 ALOAD ( #vLocal -- aRef ) 0x19
183 {
184   aRef = (java_objectheader *)access_local_cell(vLocal);
185 }
186
187 IALOAD ( aArray iIndex -- vResult ) 0x2e
188 {
189   CHECK_NULL_PTR(aArray);
190   CHECK_OUT_OF_BOUNDS(aArray, iIndex);
191   ;
192   vResult = access_array_int(aArray, iIndex);
193 }
194
195 FALOAD ( aArray iIndex -- fResult ) 0x2e
196 {
197   CHECK_NULL_PTR(aArray);
198   CHECK_OUT_OF_BOUNDS(aArray, iIndex);
199   ;
200   fResult = access_array_float(aArray, iIndex);
201 }
202
203 LALOAD ( aArray iIndex -- lResult ) 0x2f
204 {
205   CHECK_NULL_PTR(aArray);
206   CHECK_OUT_OF_BOUNDS(aArray, iIndex);
207   ;
208   lResult = access_array_long(aArray, iIndex);
209 }
210
211 AALOAD ( aArray iIndex -- aRef ) 0x32
212 {
213   CHECK_NULL_PTR(aArray);
214   CHECK_OUT_OF_BOUNDS(aArray, iIndex);
215   ;
216   aRef = access_array_addr(aArray, iIndex);
217 }
218
219 BALOAD ( aArray iIndex -- vResult ) 0x33
220 {
221   CHECK_NULL_PTR(aArray);
222   CHECK_OUT_OF_BOUNDS(aArray, iIndex);
223   ;
224   vResult = access_array_byte(aArray, iIndex);
225 }
226
227 CALOAD ( aArray iIndex -- vResult ) 0x34
228 {
229   CHECK_NULL_PTR(aArray);
230   CHECK_OUT_OF_BOUNDS(aArray, iIndex);
231   ;
232   vResult = access_array_char(aArray, iIndex);
233 }
234
235 SALOAD ( aArray iIndex -- vResult ) 0x35
236 {
237   CHECK_NULL_PTR(aArray);
238   CHECK_OUT_OF_BOUNDS(aArray, iIndex);
239   ;
240   vResult = access_array_short(aArray, iIndex);
241 }
242
243 ISTORE ( #vLocal vValue -- ) 0x36
244 {
245   access_local_int(vLocal) = vValue;
246 }
247
248 LSTORE ( #vLocal lValue -- ) 0x37
249 {
250   vm_l2twoCell(lValue, access_local_cell(vLocal), access_local_cell(vLocal-SIZEOF_VOID_P));
251 }
252
253 ASTORE ( #vLocal aRef -- ) 0x3a
254 {
255   access_local_cell(vLocal) = (Cell)aRef;
256 }
257
258 IASTORE ( aArray iIndex iValue -- ) 0x4f
259 {
260   CHECK_NULL_PTR(aArray);
261   CHECK_OUT_OF_BOUNDS(aArray, iIndex);
262   ;
263   access_array_int(aArray, iIndex) = iValue;
264 }
265
266 FASTORE ( aArray iIndex fValue -- ) 0x4f
267 {
268   CHECK_NULL_PTR(aArray);
269   CHECK_OUT_OF_BOUNDS(aArray, iIndex);
270   ;
271   access_array_float(aArray, iIndex) = fValue;
272 }
273
274 LASTORE ( aArray iIndex lValue -- ) 0x50
275 {
276   CHECK_NULL_PTR(aArray);
277   CHECK_OUT_OF_BOUNDS(aArray, iIndex);
278   ;
279   access_array_long(aArray, iIndex) = lValue;
280 }
281
282 AASTORE ( aArray iIndex aRef -- ) 0x53
283 {
284   CHECK_NULL_PTR(aArray);
285   CHECK_OUT_OF_BOUNDS(aArray, iIndex);
286   if (!builtin_canstore((java_objectarray *)aArray, aRef))
287       THROW(arraystoreexception);
288   access_array_addr(aArray, iIndex) = aRef;
289 }
290
291 BASTORE ( aArray iIndex iValue -- ) 0x54
292 {
293   CHECK_NULL_PTR(aArray);
294   CHECK_OUT_OF_BOUNDS(aArray, iIndex);
295   ;
296   access_array_byte(aArray, iIndex) = iValue;
297 }
298
299 CASTORE ( aArray iIndex iValue -- ) 0x55
300 {
301   CHECK_NULL_PTR(aArray);
302   CHECK_OUT_OF_BOUNDS(aArray, iIndex);
303   ;
304   access_array_char(aArray, iIndex) = iValue;
305 }
306
307 POP ( vValue -- ) 0x57
308
309 POP2 ( vValue vValue -- ) 0x58
310
311 DUP ( vValue -- vValue vValue ) 0x59
312
313 DUP_X1 ( vValue2 vValue1 -- vValue1 vValue2 vValue1 ) 0x5a
314
315 DUP_X2 ( vValue3 vValue2 vValue1 -- vValue1 vValue3 vValue2 vValue1 ) 0x5b
316
317 DUP2 ( vValue2 vValue1 -- vValue2 vValue1 vValue2 vValue1 ) 0x5c
318
319 DUP2_X1 (vValue3 vValue2 vValue1 -- vValue2 vValue1 vValue3 vValue2 vValue1 ) 0x5d
320
321 DUP2_X2 ( vValue4 vValue3 vValue2 vValue1 -- vValue2 vValue1 vValue4 vValue3 vValue2 vValue1 ) 0x5e
322
323 SWAP ( vValue2 vValue1 -- vValue1 vValue2 ) 0x5f
324
325 IADD ( vValue1 vValue2 -- vResult ) 0x60
326 {
327   vResult = vValue2 + vValue1;
328 }
329
330 LADD ( lValue1 lValue2 -- lResult ) 0x61
331 {
332   lResult = lValue2 + lValue1;
333 }
334
335 FADD ( fValue1 fValue2 -- fResult ) 0x62
336 {
337   fResult = fValue1 + fValue2;
338 }
339
340 DADD ( dValue1 dValue2 -- dResult ) 0x63
341 {
342   dResult = dValue1 + dValue2;
343 }
344
345 ISUB ( vValue1 vValue2 -- vResult ) 0x64
346 {
347   vResult = vValue1 - vValue2;
348 }
349
350 LSUB ( lValue1 lValue2 -- lResult ) 0x65
351 {
352   lResult = lValue1 - lValue2;
353 }
354
355 FSUB ( fValue1 fValue2 -- fResult ) 0x66
356 {
357   fResult = fValue1 - fValue2;
358 }
359
360 DSUB ( dValue1 dValue2 -- dResult ) 0x67
361 {
362   dResult = dValue1 - dValue2;
363 }
364
365 IMUL ( vValue1 vValue2 -- vResult ) 0x68
366 {
367   vResult = vValue1 * vValue2;
368 }
369
370 LMUL ( lValue1 lValue2 -- lResult ) 0x69
371 {
372   lResult = lValue1 * lValue2;
373 }
374
375 FMUL ( fValue1 fValue2 -- fResult ) 0x6a
376 {
377   fResult = fValue1 * fValue2;
378 }
379
380 DMUL ( dValue1 dValue2 -- dResult ) 0x6b
381 {
382   dResult = dValue1 * dValue2;
383 }
384
385 IDIV ( iValue1 iValue2 -- iResult ) 0x6c
386 {
387   CHECK_ZERO_DIVISOR(iValue2);
388   ;
389   if (iValue1 == 0x80000000 && iValue2 == -1)
390     iResult=iValue1;
391   else
392     iResult = iValue1 / iValue2;
393 }
394
395 IDIVPOW2 ( i1 #ishift -- i2 ) opt
396 {
397   u4 sign = i1>>31;
398   s4 offset = sign >> (32-ishift);
399   i2=(i1+offset)>>ishift;
400 }
401
402 LDIV ( lValue1 lValue2 -- lResult ) 0x6d
403 {
404   CHECK_ZERO_DIVISOR(lValue2);
405   if (lValue1 == 0x8000000000000000LL && lValue2 == -1)
406     lResult=lValue1;
407   else
408     lResult = lValue1 / lValue2;
409 }
410
411 LDIVPOW2 ( l1 #ishift -- l2 )
412 {
413   u8 sign = l1>>63;
414   s8 offset = sign >> (64-ishift);
415   l2=(l1+offset)>>ishift;
416 }
417
418 FDIV ( fValue1 fValue2 -- fResult ) 0x6e
419 {
420   fResult = fValue1 / fValue2;
421 }
422
423 DDIV ( dValue1 dValue2 -- dResult ) 0x6f
424 {
425   dResult = dValue1 / dValue2;
426 }
427
428
429 IREM ( iValue1 iValue2 -- iResult ) 0x70
430 {
431   CHECK_ZERO_DIVISOR(iValue2);
432   if (iValue1 == 0x80000000 && iValue2 == -1)
433     iResult=0;
434   else
435     iResult = iValue1 % iValue2;
436 }
437
438 IREMPOW2 ( i1 #imask -- i2 )
439 s4 x = i1;
440 if (i1<0)
441   x += imask;
442 x &= ~imask;
443 i2 = i1-x;
444
445 LREM ( lValue1 lValue2 -- lResult ) 0x71
446 {
447   CHECK_ZERO_DIVISOR(lValue2);
448   if (lValue1 == 0x8000000000000000LL && lValue2 == -1)
449     lResult=0;
450   else
451     lResult = lValue1 % lValue2;
452 }
453
454 LREMPOW2 ( l1 #lmask -- l2 )
455 s8 x = l1;
456 if (l1<0)
457   x += lmask;
458 x &= ~lmask;
459 l2 = l1-x;
460
461 FREM ( fValue1 fValue2 -- fResult ) 0x72
462 {
463   fResult = builtin_frem(fValue1, fValue2);
464 }
465
466 DREM ( dValue1 dValue2 -- dResult ) 0x73
467 {
468   dResult = builtin_drem(dValue1, dValue2);
469 }
470
471 INEG ( vValue -- vResult ) 0x74
472 {
473   vResult = -vValue;
474 }
475
476 LNEG ( lValue -- lResult ) 0x75
477 {
478   lResult = -lValue;
479 }
480
481 FNEG ( fValue -- fResult ) 0x76
482 {
483   fResult = -fValue;
484 }
485
486 DNEG ( dValue -- dResult ) 0x77
487 {
488   dResult = -dValue;
489 }
490
491 ISHL ( vValue1 vValue2 -- vResult ) 0x78
492 {
493   vResult = vValue1 << (vValue2 & 31);
494 }
495
496 LSHL ( lValue1 vValue2 -- lResult ) 0x79
497 {
498   lResult = lValue1 << (vValue2 & 63);
499 }
500
501 ISHR ( iValue1 iValue2 -- iResult ) 0x7a
502 {
503   iResult = iValue1 >> (iValue2 & 31);
504 }
505
506 LSHR ( lValue1 iValue2 -- lResult ) 0x7b
507 {
508   lResult = lValue1 >> (iValue2 & 63);
509 }
510
511 IUSHR ( iValue1 vValue2 -- iResult ) 0x7c
512 {
513   iResult = ((unsigned) iValue1) >> (vValue2 & 31);
514 }
515
516 LUSHR ( lValue1 vValue2 -- lResult ) 0x7d
517 {
518   lResult = (unsigned long long) lValue1 >> (vValue2 & 63);
519 }
520
521 IAND ( vValue1 vValue2 -- vResult ) 0x7e
522 {
523   vResult = vValue1 & vValue2;
524 }
525
526 LAND ( lValue1 lValue2 -- lResult ) 0x7f
527 {
528   lResult = lValue1 & lValue2;
529 }
530
531 IOR ( vValue1 vValue2 -- vResult ) 0x80
532 {
533   vResult = vValue1 | vValue2;
534 }
535
536 LOR ( lValue1 lValue2 -- lResult ) 0x81
537 {
538   lResult = lValue1 | lValue2;
539 }
540
541 IXOR ( vValue1 vValue2 -- vResult ) 0x82
542 {
543   vResult = vValue1 ^ vValue2;
544 }
545
546 LXOR ( lValue1 lValue2 -- lResult ) 0x83
547 {
548   lResult = lValue1 ^ lValue2;
549 }
550
551 IINC ( #vOffset #iConst  -- ) 0x84
552 {
553   access_local_int(vOffset) += iConst;
554 }
555
556 I2L ( iValue -- lValue ) 0x85
557 {
558   lValue = iValue;
559 }
560
561 I2F ( iValue -- fValue ) 0x86
562 {
563   fValue = (float) iValue;
564 }
565
566 I2D ( iValue -- dValue ) 0x87
567 {
568   dValue = (double) iValue;
569 }
570
571 L2I ( lValue -- iValue ) 0x88
572 {
573   iValue = lValue;
574 }
575
576 L2F ( lValue -- fValue ) 0x89
577 {
578   fValue = (float) lValue;
579 }
580
581 L2D ( lValue -- dValue ) 0x8a
582 {
583   dValue = (double) lValue;
584 }
585
586 F2I ( fValue -- iValue ) 0x8b
587 {
588     iValue = builtin_f2i(fValue);
589 }
590
591 F2L ( fValue -- lValue ) 0x8c
592 {
593     lValue = builtin_f2l(fValue);
594 }
595
596 F2D ( fValue -- dValue ) 0x8d
597 {
598   dValue = fValue;
599 }
600
601 D2I ( dValue -- iValue ) 0x8e
602 {
603   iValue = builtin_d2i(dValue);
604 }
605
606 D2L ( dValue -- lValue ) 0x8f
607 {
608   lValue = builtin_d2l(dValue);
609 }
610
611 D2F ( dValue -- fValue ) 0x90
612 {
613   fValue = dValue;
614 }
615
616 INT2BYTE ( iValue -- iResult ) 0x91
617 {
618   iResult = (iValue << 24) >> 24; /* XXX: try "(s1)iValue" */
619 }
620
621
622 INT2CHAR ( iValue -- iResult ) 0x92
623 {
624   iResult = iValue & 0xFFFF;
625 }
626
627 INT2SHORT ( iValue -- iResult ) 0x93
628 {
629   iResult = (iValue << 16) >> 16; /* XXX: try "(s2)iValue" */
630 }
631
632 LCMP ( lValue1 lValue2 -- vResult ) 0x94
633 {
634   vResult = lValue1 < lValue2 ? -1 : lValue1 > lValue2 ? 1 : 0;
635 }
636
637 FCMPL ( fValue1 fValue2 -- vResult ) 0x95
638 {
639   vResult = builtin_fcmpl(fValue1, fValue2);
640 }
641
642 FCMPG ( fValue1 fValue2 -- vResult ) 0x96
643 {
644   vResult = builtin_fcmpg(fValue1, fValue2);
645 }
646
647 DCMPL ( dValue1 dValue2 -- iResult ) 0x97
648 {
649   iResult = builtin_dcmpl(dValue1, dValue2);
650 }
651
652 DCMPG ( dValue1 dValue2 -- iResult ) 0x98
653 {
654   iResult = builtin_dcmpg(dValue1, dValue2);
655 }
656
657 IFEQ ( #ainstTarget iValue -- ) 0x99
658 {
659   if ( iValue == 0 ) {
660     SET_IP(ainstTarget);
661   }
662 }
663
664 IFNE ( #ainstTarget iValue -- ) 0x9a
665 {
666   if ( iValue != 0 ) {
667     SET_IP(ainstTarget);
668   }
669 }
670
671 IFLT ( #ainstTarget iValue -- ) 0x9b
672 {
673   if ( iValue < 0 )
674     SET_IP(ainstTarget);
675 }
676
677 IFGE ( #ainstTarget iValue -- ) 0x9c
678 {
679   if ( iValue >= 0 )
680     SET_IP(ainstTarget);
681 }
682
683 IFGT ( #ainstTarget iValue -- ) 0x9d
684 {
685   if ( iValue > 0 )
686     SET_IP(ainstTarget);
687 }
688
689 IFLE ( #ainstTarget iValue -- ) 0x9e
690 {
691   if ( iValue <= 0 )
692     SET_IP(ainstTarget);
693 }
694
695 IF_ICMPEQ ( #ainstTarget iValue1 iValue2 -- ) 0x9f
696 {
697   if ( iValue1 == iValue2 )
698     SET_IP(ainstTarget);
699 }
700
701 IF_ICMPNE  ( #ainstTarget iValue1 iValue2 -- ) 0xa0
702 {
703   if ( iValue1 != iValue2 )
704     SET_IP(ainstTarget);
705 }
706
707 IF_ICMPLT  ( #ainstTarget iValue1 iValue2 -- ) 0xa1
708 {
709   if ( iValue1 < iValue2 )
710     SET_IP(ainstTarget);
711 }
712
713 IF_ICMPGE  ( #ainstTarget iValue1 iValue2 -- ) 0xa2
714 {
715   if ( iValue1 >= iValue2 )
716     SET_IP(ainstTarget);
717 }
718
719 IF_ICMPGT  ( #ainstTarget iValue1 iValue2 -- ) 0xa3
720 {
721   if ( iValue1 > iValue2 )
722     SET_IP(ainstTarget);
723 }
724
725 IF_ICMPLE  ( #ainstTarget iValue1 iValue2 -- ) 0xa4
726 {
727   if ( iValue1 <= iValue2 )
728     SET_IP(ainstTarget);
729 }
730
731 IF_LCMPEQ ( #ainstTarget lValue1 lValue2 -- ) opt
732 {
733   if ( lValue1 == lValue2 )
734     SET_IP(ainstTarget);
735 }
736
737 IF_LCMPNE  ( #ainstTarget lValue1 lValue2 -- ) opt
738 {
739   if ( lValue1 != lValue2 )
740     SET_IP(ainstTarget);
741 }
742
743 IF_LCMPLT  ( #ainstTarget lValue1 lValue2 -- ) opt
744 {
745   if ( lValue1 < lValue2 )
746     SET_IP(ainstTarget);
747 }
748
749 IF_LCMPGE  ( #ainstTarget lValue1 lValue2 -- ) opt
750 {
751   if ( lValue1 >= lValue2 )
752     SET_IP(ainstTarget);
753 }
754
755 IF_LCMPGT  ( #ainstTarget lValue1 lValue2 -- ) opt
756 {
757   if ( lValue1 > lValue2 )
758     SET_IP(ainstTarget);
759 }
760
761 IF_LCMPLE  ( #ainstTarget lValue1 lValue2 -- ) opt
762 {
763   if ( lValue1 <= lValue2 )
764     SET_IP(ainstTarget);
765 }
766
767 IF_ACMPEQ  ( #ainstTarget aRef1 aRef2 -- ) 0xa5
768 {
769   if ( aRef1 == aRef2 )
770     SET_IP(ainstTarget);
771 }
772
773 IF_ACMPNE  ( #ainstTarget aRef1 aRef2 -- ) 0xa6
774 {
775   if ( aRef1 != aRef2 )
776     SET_IP(ainstTarget);
777 }
778
779 GOTO (  #ainstTarget -- ) 0xa7
780 {
781   SET_IP(ainstTarget);
782 }
783
784 JSR (  #ainstTarget -- ainstRA ) 0xa8
785 {
786     /* Warning: The generator already adds 1 to the IP
787        because there is an inline parameter. Thus, instead
788        of writing IP + 1, we write...*/
789   ainstRA = IP;
790   SET_IP(ainstTarget);
791 }
792
793 RET ( #vOffset -- ) 0xa9
794 {
795   Inst * saved_ip;
796   saved_ip = access_local_ref(vOffset);
797   SET_IP(saved_ip);
798 }
799
800 TABLESWITCH ( #iLow #iRange #addrSegment #iOffset #ainstDefault iIndex -- ) 0xaa
801 {
802   s4 idx = iIndex - iLow;
803   if ( ((u4) idx) >= iRange ) {
804     SET_IP(ainstDefault);
805   }
806   else {
807     SET_IP(((Inst **)(addrSegment+iOffset))[idx]);
808   }
809 }
810
811 LOOKUPSWITCH ( #iNpairs #addrSegment #iOffset #ainstDefault iKey -- ) 0xab
812 {
813   /* Note: This code should use a binary search, as
814      the table is sorted. Note also, we reversed the order
815      of the parms */
816   unsigned i;
817   for ( i = 0; i < iNpairs; i++ ) {
818     Cell *table = (Cell *)(addrSegment+iOffset);
819     if ( iKey == (s4)(table[2 * i]) ) {
820       SET_IP((Inst *)(table[2 * i + 1])); INST_TAIL;
821     }
822   }
823   /* falls through if no match */
824   SET_IP(ainstDefault);
825 }
826
827
828 \ Our stack works like this:
829 \ The stack holds locals, the operand stack and the return address stack.
830 \ When we invoke a method, the paramaters are the top N elements
831 \ on the stack. These become the first N local variables.
832 \ Next we have space for the rest of the local variables.
833 \ Next comes a single position on the stack which holds
834 \ the value of the frame pointer for the calling function.
835 \ Another position holds the instruction pointer of the caller.
836 \ Finally, we have space for the elements of the operand stack.
837
838 \ fp points to the bottom local; since the stack grows downwards, the
839 \ upper end of the frame is fp+1, not fp.  That's why the sp updates
840 \ in the returns look like they are off by one.
841
842 \ fp -> local0
843 \       local1
844 \       ...
845 \       oldfp
846 \ sp -> oldip ; at the start, empty stack
847 \       stack0 ;once there is something on the stack
848 \       ...
849
850 IRETURN ( #vOffsetFP ... vValue -- vResult ) 0xac
851 {
852   Inst *new_ip;
853   Cell *currentsp = sp;
854   new_ip = (Inst *) access_local_cell(vOffsetFP - SIZEOF_VOID_P);
855   sp = fp + 1;
856   fp = (Cell *) access_local_cell(vOffsetFP);
857   CLEARSTACK(currentsp - 6, sp - 1);
858   vResult = vValue;
859   SET_IP(new_ip);
860 }
861
862 LRETURN ( #vOffsetFP ... lValue -- lResult ) 0xad
863 {
864   Inst *new_ip;
865   Cell *currentsp = sp;
866   new_ip = (Inst *) access_local_cell(vOffsetFP - SIZEOF_VOID_P);
867   sp = fp + 1;
868   fp = (Cell *) access_local_cell(vOffsetFP);
869   CLEARSTACK(currentsp - 7, sp - 2);
870   lResult = lValue;
871   SET_IP(new_ip);
872 }
873
874 RETURN ( #vOffsetFP ... -- ) 0xb1
875 {
876   Inst *new_ip;
877   Cell *currentsp = sp;
878   new_ip = (Inst *) access_local_cell(vOffsetFP - SIZEOF_VOID_P);
879   sp = fp + 1;
880   fp = (Cell *) access_local_cell(vOffsetFP);
881   CLEARSTACK(currentsp - 5, sp - 1);
882   SET_IP(new_ip);
883 }
884
885 GETSTATIC_CELL ( #addr #afi -- vResult ) opt
886 {
887   vResult = *(Cell *)addr;
888 }
889
890 GETSTATIC_INT ( #addr #afi -- iResult ) opt
891 {
892   iResult = *(s4 *)addr;
893 }
894
895 GETSTATIC_FLOAT ( #addr #afi -- fResult ) opt
896 {
897   fResult = *(float *)addr;
898 }
899
900 GETSTATIC_LONG ( #addr #afi -- lResult ) opt
901 {
902   lResult = *((s8 *) addr);
903 }
904
905 PUTSTATIC_CELL ( #addr #afi vValue -- ) opt
906 {
907   *((Cell *) addr) = vValue;
908 }
909
910 PUTSTATIC_INT ( #addr #afi iValue -- ) opt
911 {
912   *((s4 *) addr) = iValue;
913 }
914
915 PUTSTATIC_FLOAT ( #addr #afi fValue -- ) opt
916 {
917   *((float *) addr) = fValue;
918 }
919
920 PUTSTATIC_LONG ( #addr #afi lValue -- ) opt
921 {
922   *((s8 *) addr) = lValue;
923 }
924
925 GETFIELD_CELL ( #vOffset #afi aRef -- vResult ) opt
926 {
927   CHECK_NULL_PTR(aRef);
928   vResult = *((Cell *) (((u1 *)aRef) + vOffset));
929 }
930
931 GETFIELD_INT ( #vOffset #afi aRef -- iResult ) opt
932 {
933   CHECK_NULL_PTR(aRef);
934   iResult = *((s4 *) (((u1 *)aRef) + vOffset));
935 }
936
937 GETFIELD_FLOAT ( #vOffset #afi aRef -- fResult ) opt
938 {
939   CHECK_NULL_PTR(aRef);
940   fResult = *((float *) (((u1 *) aRef) + vOffset));
941 }
942
943 GETFIELD_LONG ( #vOffset #afi aRef -- lResult ) opt
944 {
945   CHECK_NULL_PTR(aRef);
946   lResult = *((s8 *) (((u1 *)aRef) + vOffset));
947 }
948
949
950 PUTFIELD_CELL ( #vOffset #afi aRef vValue -- ) opt
951 {
952   CHECK_NULL_PTR(aRef);
953   *((Cell *) (((u1 *)aRef) + vOffset)) = vValue;
954 }
955
956 PUTFIELD_INT ( #vOffset #afi aRef iValue -- ) opt
957 {
958   CHECK_NULL_PTR(aRef);
959   *((s4 *) (((u1 *)aRef) + vOffset)) = iValue;
960 }
961
962 PUTFIELD_FLOAT ( #vOffset #afi aRef fValue -- ) opt
963 {
964   CHECK_NULL_PTR(aRef);
965   *((float *) (((u1 *)aRef) + vOffset)) = fValue;
966 }
967
968 PUTFIELD_LONG ( #vOffset #afi aRef lValue -- ) opt
969 {
970   CHECK_NULL_PTR(aRef);
971   *((s8 *) (((u1 *)aRef) + vOffset)) = lValue;
972 }
973
974 \ !! called methods have the number of locals at offset -1.
975 \ methods are always called indirectly through the codeptr in the stub 
976 \   (see createcompilerstub and TRANSLATE).
977
978 INVOKEVIRTUAL ( #vOffset #iNargs #am ... -- ... acelloldfp ainstoldip ) 0xd8
979 {
980   java_objectheader *aRef = (java_objectheader *)(sp[iNargs - 1]);
981   char *v;
982   Inst **stub;
983   Inst *target;
984   CHECK_NULL_PTR(aRef);
985   v = (char *)(aRef->vftbl);
986   stub = *(Inst ***)(v+vOffset);
987   target = *stub;
988   acelloldfp = fp;
989   ainstoldip = IP;
990   fp = sp - 1 + iNargs;
991   sp = fp - MAXLOCALS(stub) + 1;
992   SET_IP(target);
993 }
994
995 INVOKESTATIC ( #aaTarget #iNargs #am ... -- ... acelloldfp ainstoldip ) 0xb8
996 /* an indirect pointer to target is passed to avoid references to uncompiled code */
997 {
998   Inst *target = *aaTarget;
999   acelloldfp = fp;
1000   ainstoldip = IP;
1001   fp = sp - 1 + iNargs; /* !! scale nargs at translation time */
1002   sp = fp - MAXLOCALS(aaTarget) + 1;
1003   SET_IP(target);
1004 }
1005
1006 INVOKESPECIAL ( #aaTarget #iNargs #am ... -- ... acelloldfp ainstoldip ) 0xb7
1007 /* an indirect pointer to target is passed to avoid references to uncompiled code */
1008 {
1009   java_objectheader *aRef = (java_objectheader *)(sp[iNargs - 1]);
1010   Inst *target = *aaTarget;
1011   CHECK_NULL_PTR(aRef);
1012   acelloldfp = fp;
1013   ainstoldip = IP;
1014   fp = sp - 1 + iNargs; /* !! scale nargs at translation time */
1015   sp = fp - MAXLOCALS(aaTarget) + 1;
1016   SET_IP(target);
1017 }
1018
1019 INVOKEINTERFACE ( #iInterfaceOffset #vOffset #iNargs #am ... -- ... acelloldfp ainstoldip ) 0xd8
1020 {
1021   java_objectheader *aRef;
1022   char   *v, *t;
1023   Inst **stub;
1024   Inst *target;
1025   ;
1026   aRef = (java_objectheader *)sp[iNargs - 1];
1027   CHECK_NULL_PTR(aRef);
1028   v = (char *)(aRef->vftbl);
1029   t = *(char **)(v + iInterfaceOffset);
1030   stub = *(Inst ***)(t+vOffset);
1031   target = *stub;
1032   acelloldfp = fp;
1033   ainstoldip = IP;
1034   fp = sp - 1 + iNargs;
1035   sp = fp - MAXLOCALS(stub) + 1;
1036   SET_IP(target);
1037 }
1038
1039 \ the BUILTIN functions like NEW get their parameters on the stack
1040 \ instead of through immediate arguments.
1041
1042 \ !! do we need to synchronize the stack here?
1043 \ !! if so, is global_sp right?
1044
1045 NEW ( ... aClass -- ... aRef ) 0xbb
1046 {
1047   global_sp = sp;
1048   aRef = builtin_new((classinfo *) aClass);
1049   if (aRef == NULL) {
1050     global_sp = sp;
1051     *exceptionptr = stacktrace_inline_fillInStackTrace(NULL, (u1 *) fp, (u1 *) IP, (u1 *) IP);
1052     CLEAR_global_sp;
1053     THROW0;
1054   }
1055   CLEAR_global_sp;
1056 }
1057
1058 \ !! use a macro
1059
1060 NEWARRAY_BOOLEAN ( ... iSize -- ... aArray )
1061 {
1062   global_sp = sp;
1063   aArray = (java_arrayheader *) builtin_newarray_boolean(iSize);
1064   if (aArray == NULL) {
1065     global_sp = sp;
1066     *exceptionptr = stacktrace_inline_fillInStackTrace(NULL, (u1 *) fp, (u1 *) IP, (u1 *) IP);
1067     CLEAR_global_sp;
1068     THROW0;
1069   }
1070   CLEAR_global_sp;
1071 }
1072
1073 NEWARRAY_BYTE ( ... iSize -- ... aArray )
1074 {
1075   global_sp = sp;
1076   aArray = (java_arrayheader *) builtin_newarray_byte(iSize);
1077   if (aArray == NULL) {
1078     global_sp = sp;
1079     *exceptionptr = stacktrace_inline_fillInStackTrace(NULL, (u1 *) fp, (u1 *) IP, (u1 *) IP);
1080     CLEAR_global_sp;
1081     THROW0;
1082   }
1083   CLEAR_global_sp;
1084 }
1085
1086 NEWARRAY_CHAR ( ... iSize -- ... aArray )
1087 {
1088   global_sp = sp;
1089   aArray = (java_arrayheader *) builtin_newarray_char(iSize);
1090   if (aArray == NULL) {
1091     global_sp = sp;
1092     *exceptionptr = stacktrace_inline_fillInStackTrace(NULL, (u1 *) fp, (u1 *) IP, (u1 *) IP);
1093     CLEAR_global_sp;
1094     THROW0;
1095   }
1096   CLEAR_global_sp;
1097 }
1098
1099 NEWARRAY_SHORT ( ... iSize -- ... aArray )
1100 {
1101   global_sp = sp;
1102   aArray = (java_arrayheader *) builtin_newarray_short(iSize);
1103   if (aArray == NULL) {
1104     global_sp = sp;
1105     *exceptionptr = stacktrace_inline_fillInStackTrace(NULL, (u1 *) fp, (u1 *) IP, (u1 *) IP);
1106     CLEAR_global_sp;
1107     THROW0;
1108   }
1109   CLEAR_global_sp;
1110 }
1111
1112 NEWARRAY_INT ( ... iSize -- ... aArray )
1113 {
1114   global_sp = sp;
1115   aArray = (java_arrayheader *) builtin_newarray_int(iSize);
1116   if (aArray == NULL) {
1117     global_sp = sp;
1118     *exceptionptr = stacktrace_inline_fillInStackTrace(NULL, (u1 *) fp, (u1 *) IP, (u1 *) IP);
1119     CLEAR_global_sp;
1120     THROW0;
1121   }
1122   CLEAR_global_sp;
1123 }
1124
1125 NEWARRAY_LONG ( ... iSize -- ... aArray )
1126 {
1127   global_sp = sp;
1128   aArray = (java_arrayheader *) builtin_newarray_long(iSize);
1129   if (aArray == NULL) {
1130     global_sp = sp;
1131     *exceptionptr = stacktrace_inline_fillInStackTrace(NULL, (u1 *) fp, (u1 *) IP, (u1 *) IP);
1132     CLEAR_global_sp;
1133     THROW0;
1134   }
1135   CLEAR_global_sp;
1136 }
1137
1138 NEWARRAY_FLOAT ( ... iSize -- ... aArray )
1139 {
1140   global_sp = sp;
1141   aArray = (java_arrayheader *) builtin_newarray_float(iSize);
1142   if (aArray == NULL) {
1143     global_sp = sp;
1144     *exceptionptr = stacktrace_inline_fillInStackTrace(NULL, (u1 *) fp, (u1 *) IP, (u1 *) IP);
1145     CLEAR_global_sp;
1146     THROW0;
1147   }
1148   CLEAR_global_sp;
1149 }
1150
1151 NEWARRAY_DOUBLE ( ... iSize -- ... aArray )
1152 {
1153   global_sp = sp;
1154   aArray = (java_arrayheader *) builtin_newarray_double(iSize);
1155   if (aArray == NULL) {
1156     global_sp = sp;
1157     *exceptionptr = stacktrace_inline_fillInStackTrace(NULL, (u1 *) fp, (u1 *) IP, (u1 *) IP);
1158     CLEAR_global_sp;
1159     THROW0;
1160   }
1161   CLEAR_global_sp;
1162 }
1163
1164 NEWARRAY ( ... iSize aClass -- ... aArray )
1165 {
1166   global_sp = sp;
1167   aArray = (java_arrayheader *) builtin_newarray(iSize, aClass);
1168   if (aArray == NULL) {
1169     global_sp = sp;
1170     *exceptionptr = stacktrace_inline_fillInStackTrace(NULL, (u1 *) fp, (u1 *) IP, (u1 *) IP);
1171     CLEAR_global_sp;
1172     THROW0;
1173   }
1174   CLEAR_global_sp;
1175 }
1176
1177 ARRAYLENGTH ( aArray -- iResult )
1178 {
1179   CHECK_NULL_PTR(aArray);
1180   iResult = length_array(aArray);
1181 }
1182
1183 ATHROW ( ... aRef -- ... aRef1 )
1184 {
1185   Cell *new_sp, *new_fp;
1186   Inst *new_ip;
1187   CHECK_NULL_PTR(aRef);
1188   goto athrow;
1189 throw:
1190   CLEAR_global_sp;
1191   aRef = *exceptionptr;
1192   *exceptionptr = NULL;
1193 athrow:
1194   new_ip = intrp_asm_handle_exception(IP, aRef, fp, &new_sp, &new_fp);
1195   if (new_ip == NULL) {
1196     /* !! sp = new_sp; ? */
1197     global_sp = sp - 1;
1198     SUPER_END; /* ATHROW may end a basic block */
1199     return aRef;
1200   }
1201   SET_IP(new_ip);
1202   aRef1 = aRef;
1203   sp = new_sp;
1204   fp = new_fp;
1205 }
1206
1207 CHECKCAST ( #aClass #acr aRef -- aRef ) 0xc0
1208 {
1209   if (!builtin_checkcast((java_objectheader *) aRef, (classinfo *) aClass))
1210     THROW(classcastexception);
1211 }
1212
1213 ARRAYCHECKCAST ( #aClass #acr aRef -- aRef ) 0xc0
1214 {
1215   if (!builtin_arraycheckcast(aRef, aClass))
1216     THROW(classcastexception);
1217 }
1218
1219 PATCHER_ARRAYCHECKCAST ( #avftbl #acr ... -- ) 0xc0
1220 stackframeinfo sfi;
1221 bool result;
1222 global_sp = sp;
1223 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1224 result = intrp_patcher_builtin_arraycheckcast((u1 *) (IP - 3));
1225 stacktrace_remove_stackframeinfo(&sfi);
1226 CLEAR_global_sp;
1227 if (!result)
1228   THROW0;
1229 STORE_ORDER_BARRIER();
1230 IP[-3] = INST_ADDR(ARRAYCHECKCAST);
1231 SET_IP(IP - 3);
1232 patchersuper_rewrite(IP);
1233
1234 INSTANCEOF ( #aClass #acr aRef  -- iResult )
1235 {
1236   iResult = builtin_instanceof(aRef, aClass);
1237 }
1238
1239 ARRAYINSTANCEOF ( aRef aClass  -- iResult )
1240 {
1241   iResult = builtin_arrayinstanceof(aRef, aClass);
1242 }
1243
1244 MONITORENTER ( aRef -- )
1245 {
1246 #if defined(ENABLE_THREADS)
1247   /* CHECK_NULL_PTR(aRef); is now done explicitly */
1248   builtin_monitorenter(aRef);
1249 #endif
1250 }
1251
1252 MONITOREXIT ( aRef -- )
1253 {
1254 #if defined(ENABLE_THREADS)
1255   /* CHECK_NULL_PTR(aRef); cannot happen */
1256   builtin_monitorexit(aRef);
1257 #endif
1258 }
1259
1260 CHECKNULL ( aRef -- aRef )
1261 {
1262   CHECK_NULL_PTR(aRef);
1263 }
1264
1265 MULTIANEWARRAY ( #aClass #iSize #acr ... -- aRef )
1266 {
1267   long *dims;
1268   int i;
1269
1270   dims = MNEW(long, iSize);
1271
1272   for (i = 0; i < iSize; i++) {
1273     dims[i] = sp[iSize - i - 1];
1274   }
1275   global_sp = sp;
1276   aRef = (java_objectheader *) builtin_multianewarray(iSize, aClass, dims);
1277
1278   MFREE(dims, long, iSize);
1279
1280   if (aRef == NULL) {
1281     global_sp = sp;
1282     *exceptionptr = stacktrace_inline_fillInStackTrace(NULL, (u1 *) fp, (u1 *) IP, (u1 *) IP);
1283     CLEAR_global_sp;
1284     THROW0;
1285   }
1286   CLEAR_global_sp;
1287   sp += iSize;
1288 }
1289
1290 IFNULL ( #ainstTarget aRef -- )  0xc6
1291 {
1292   if ( aRef == NULL ) {
1293     SET_IP(ainstTarget);
1294   }
1295 }
1296
1297 IFNONNULL ( #ainstTarget aRef -- ) 0xc7
1298 {
1299   if ( aRef != NULL ) {
1300     SET_IP(ainstTarget);
1301   }
1302 }
1303
1304 \ patchers for resolving fields
1305
1306 PATCHER_GETSTATIC_INT ( #aRef #auf ... -- )
1307 stackframeinfo sfi;
1308 bool result;
1309 global_sp = sp;
1310 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1311 result = intrp_patcher_get_putstatic((u1 *) (IP - 3));
1312 stacktrace_remove_stackframeinfo(&sfi);
1313 CLEAR_global_sp;
1314 if (!result)
1315   THROW0;
1316 STORE_ORDER_BARRIER();
1317 IP[-3] = INST_ADDR(GETSTATIC_INT);
1318 SET_IP(IP-3);
1319 patchersuper_rewrite(IP);
1320
1321 PATCHER_GETSTATIC_FLOAT ( #aRef #auf ... -- )
1322 stackframeinfo sfi;
1323 bool result;
1324 global_sp = sp;
1325 stacktrace_create_stackframeinfo(&sfi, NULL, fp, (functionptr) IP);
1326 result = intrp_patcher_get_putstatic((u1 *)(IP-3));
1327 stacktrace_remove_stackframeinfo(&sfi);
1328 CLEAR_global_sp;
1329 if (!result)
1330   THROW0;
1331 STORE_ORDER_BARRIER();
1332 IP[-3] = INST_ADDR(GETSTATIC_FLOAT);
1333 SET_IP(IP-3);
1334 patchersuper_rewrite(IP);
1335
1336 PATCHER_GETSTATIC_LONG ( #aRef #auf ... -- )
1337 stackframeinfo sfi;
1338 bool result;
1339 global_sp = sp;
1340 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1341 result = intrp_patcher_get_putstatic((u1 *) (IP - 3));
1342 stacktrace_remove_stackframeinfo(&sfi);
1343 CLEAR_global_sp;
1344 if (!result)
1345   THROW0;
1346 STORE_ORDER_BARRIER();
1347 IP[-3] = INST_ADDR(GETSTATIC_LONG);
1348 SET_IP(IP-3);
1349 patchersuper_rewrite(IP);
1350
1351 PATCHER_GETSTATIC_CELL ( #aRef #auf ... -- )
1352 stackframeinfo sfi;
1353 bool result;
1354 global_sp = sp;
1355 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1356 result = intrp_patcher_get_putstatic((u1 *) (IP - 3));
1357 stacktrace_remove_stackframeinfo(&sfi);
1358 CLEAR_global_sp;
1359 if (!result)
1360   THROW0;
1361 STORE_ORDER_BARRIER();
1362 IP[-3] = INST_ADDR(GETSTATIC_CELL);
1363 SET_IP(IP-3);
1364 patchersuper_rewrite(IP);
1365
1366 \ patchers for statically initializing classes
1367
1368 PATCHER_GETSTATIC_CLINIT_INT ( #aRef #afi ... -- )
1369 stackframeinfo sfi;
1370 bool result;
1371 global_sp = sp;
1372 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1373 result = intrp_patcher_get_putstatic_clinit((u1 *) (IP - 3));
1374 stacktrace_remove_stackframeinfo(&sfi);
1375 CLEAR_global_sp;
1376 if (!result)
1377   THROW0;
1378 STORE_ORDER_BARRIER();
1379 IP[-3] = INST_ADDR(GETSTATIC_INT);
1380 SET_IP(IP-3);
1381 patchersuper_rewrite(IP);
1382
1383 PATCHER_GETSTATIC_CLINIT_FLOAT ( #aRef #afi ... -- )
1384 stackframeinfo sfi;
1385 bool result;
1386 global_sp = sp;
1387 stacktrace_create_stackframeinfo(&sfi, NULL, fp, (functionptr) IP);
1388 result = intrp_patcher_get_putstatic_clinit((u1 *)(IP-3));
1389 stacktrace_remove_stackframeinfo(&sfi);
1390 CLEAR_global_sp;
1391 if (!result)
1392   THROW0;
1393 STORE_ORDER_BARRIER();
1394 IP[-3] = INST_ADDR(GETSTATIC_FLOAT);
1395 SET_IP(IP-3);
1396 patchersuper_rewrite(IP);
1397
1398 PATCHER_GETSTATIC_CLINIT_LONG ( #aRef #afi ... -- )
1399 stackframeinfo sfi;
1400 bool result;
1401 global_sp = sp;
1402 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1403 result = intrp_patcher_get_putstatic_clinit((u1 *) (IP - 3));
1404 stacktrace_remove_stackframeinfo(&sfi);
1405 CLEAR_global_sp;
1406 if (!result)
1407   THROW0;
1408 STORE_ORDER_BARRIER();
1409 IP[-3] = INST_ADDR(GETSTATIC_LONG);
1410 SET_IP(IP-3);
1411 patchersuper_rewrite(IP);
1412
1413 PATCHER_GETSTATIC_CLINIT_CELL ( #aRef #afi ... -- )
1414 stackframeinfo sfi;
1415 bool result;
1416 global_sp = sp;
1417 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1418 result = intrp_patcher_get_putstatic_clinit((u1 *) (IP - 3));
1419 stacktrace_remove_stackframeinfo(&sfi);
1420 CLEAR_global_sp;
1421 if (!result)
1422   THROW0;
1423 STORE_ORDER_BARRIER();
1424 IP[-3] = INST_ADDR(GETSTATIC_CELL);
1425 SET_IP(IP-3);
1426 patchersuper_rewrite(IP);
1427
1428 \ patchers for resolving fields
1429
1430 PATCHER_PUTSTATIC_INT ( #aRef #auf ... -- )
1431 stackframeinfo sfi;
1432 bool result;
1433 global_sp = sp;
1434 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1435 result = intrp_patcher_get_putstatic((u1 *) (IP - 3));
1436 stacktrace_remove_stackframeinfo(&sfi);
1437 CLEAR_global_sp;
1438 if (!result)
1439   THROW0;
1440 STORE_ORDER_BARRIER();
1441 IP[-3] = INST_ADDR(PUTSTATIC_INT);
1442 SET_IP(IP-3);
1443 patchersuper_rewrite(IP);
1444
1445 PATCHER_PUTSTATIC_FLOAT ( #aRef #auf ... -- )
1446 stackframeinfo sfi;
1447 bool result;
1448 global_sp = sp;
1449 stacktrace_create_stackframeinfo(&sfi, NULL, fp, (functionptr) IP);
1450 result = intrp_patcher_get_putstatic((u1 *)(IP-3));
1451 stacktrace_remove_stackframeinfo(&sfi);
1452 CLEAR_global_sp;
1453 if (!result)
1454   THROW0;
1455 STORE_ORDER_BARRIER();
1456 IP[-3] = INST_ADDR(PUTSTATIC_FLOAT);
1457 SET_IP(IP-3);
1458 patchersuper_rewrite(IP);
1459
1460 PATCHER_PUTSTATIC_LONG ( #aRef #auf ... -- )
1461 stackframeinfo sfi;
1462 bool result;
1463 global_sp = sp;
1464 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1465 result = intrp_patcher_get_putstatic((u1 *) (IP - 3));
1466 stacktrace_remove_stackframeinfo(&sfi);
1467 CLEAR_global_sp;
1468 if (!result)
1469   THROW0;
1470 STORE_ORDER_BARRIER();
1471 IP[-3] = INST_ADDR(PUTSTATIC_LONG);
1472 SET_IP(IP-3);
1473 patchersuper_rewrite(IP);
1474
1475 PATCHER_PUTSTATIC_CELL ( #aRef #auf ... -- )
1476 stackframeinfo sfi;
1477 bool result;
1478 global_sp = sp;
1479 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1480 result = intrp_patcher_get_putstatic((u1 *) (IP - 3));
1481 stacktrace_remove_stackframeinfo(&sfi);
1482 CLEAR_global_sp;
1483 if (!result)
1484   THROW0;
1485 STORE_ORDER_BARRIER();
1486 IP[-3] = INST_ADDR(PUTSTATIC_CELL);
1487 SET_IP(IP-3);
1488 patchersuper_rewrite(IP);
1489
1490 \ patchers for statically initializing classes
1491
1492 PATCHER_PUTSTATIC_CLINIT_INT ( #aRef #afi ... -- )
1493 stackframeinfo sfi;
1494 bool result;
1495 global_sp = sp;
1496 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1497 result = intrp_patcher_get_putstatic_clinit((u1 *) (IP - 3));
1498 stacktrace_remove_stackframeinfo(&sfi);
1499 CLEAR_global_sp;
1500 if (!result)
1501   THROW0;
1502 STORE_ORDER_BARRIER();
1503 IP[-3] = INST_ADDR(PUTSTATIC_INT);
1504 SET_IP(IP-3);
1505 patchersuper_rewrite(IP);
1506
1507 PATCHER_PUTSTATIC_CLINIT_FLOAT ( #aRef #afi ... -- )
1508 stackframeinfo sfi;
1509 bool result;
1510 global_sp = sp;
1511 stacktrace_create_stackframeinfo(&sfi, NULL, fp, (functionptr) IP);
1512 result = intrp_patcher_get_putstatic_clinit((u1 *)(IP-3));
1513 stacktrace_remove_stackframeinfo(&sfi);
1514 CLEAR_global_sp;
1515 if (!result)
1516   THROW0;
1517 STORE_ORDER_BARRIER();
1518 IP[-3] = INST_ADDR(PUTSTATIC_FLOAT);
1519 SET_IP(IP-3);
1520 patchersuper_rewrite(IP);
1521
1522 PATCHER_PUTSTATIC_CLINIT_LONG ( #aRef #afi ... -- )
1523 stackframeinfo sfi;
1524 bool result;
1525 global_sp = sp;
1526 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1527 result = intrp_patcher_get_putstatic_clinit((u1 *) (IP - 3));
1528 stacktrace_remove_stackframeinfo(&sfi);
1529 CLEAR_global_sp;
1530 if (!result)
1531   THROW0;
1532 STORE_ORDER_BARRIER();
1533 IP[-3] = INST_ADDR(PUTSTATIC_LONG);
1534 SET_IP(IP-3);
1535 patchersuper_rewrite(IP);
1536
1537 PATCHER_PUTSTATIC_CLINIT_CELL ( #aRef #afi ... -- )
1538 stackframeinfo sfi;
1539 bool result;
1540 global_sp = sp;
1541 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1542 result = intrp_patcher_get_putstatic_clinit((u1 *) (IP - 3));
1543 stacktrace_remove_stackframeinfo(&sfi);
1544 CLEAR_global_sp;
1545 if (!result)
1546   THROW0;
1547 STORE_ORDER_BARRIER();
1548 IP[-3] = INST_ADDR(PUTSTATIC_CELL);
1549 SET_IP(IP-3);
1550 patchersuper_rewrite(IP);
1551
1552 \ patchers for resolving fields
1553
1554 PATCHER_GETFIELD_INT ( #vOffset #auf ... -- )
1555 stackframeinfo sfi;
1556 bool result;
1557 global_sp = sp;
1558 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1559 result = intrp_patcher_get_putfield((u1 *) (IP - 3));
1560 stacktrace_remove_stackframeinfo(&sfi);
1561 CLEAR_global_sp;
1562 if (!result)
1563   THROW0;
1564 STORE_ORDER_BARRIER();
1565 IP[-3] = INST_ADDR(GETFIELD_INT);
1566 SET_IP(IP-3);
1567 patchersuper_rewrite(IP);
1568
1569 PATCHER_GETFIELD_FLOAT ( #vOffset #auf ... -- )
1570 stackframeinfo sfi;
1571 bool result;
1572 global_sp = sp;
1573 stacktrace_create_stackframeinfo(&sfi, NULL, fp, (functionptr) IP);
1574 result = intrp_patcher_get_putfield((u1 *)(IP-3));
1575 stacktrace_remove_stackframeinfo(&sfi);
1576 CLEAR_global_sp;
1577 if (!result)
1578   THROW0;
1579 STORE_ORDER_BARRIER();
1580 IP[-3] = INST_ADDR(GETFIELD_FLOAT);
1581 SET_IP(IP-3);
1582 patchersuper_rewrite(IP);
1583
1584 PATCHER_GETFIELD_LONG ( #vOffset #auf ... -- )
1585 stackframeinfo sfi;
1586 bool result;
1587 global_sp = sp;
1588 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1589 result = intrp_patcher_get_putfield((u1 *) (IP - 3));
1590 stacktrace_remove_stackframeinfo(&sfi);
1591 CLEAR_global_sp;
1592 if (!result)
1593   THROW0;
1594 STORE_ORDER_BARRIER();
1595 IP[-3] = INST_ADDR(GETFIELD_LONG);
1596 SET_IP(IP-3);
1597 patchersuper_rewrite(IP);
1598
1599 PATCHER_GETFIELD_CELL ( #vOffset #auf ... -- )
1600 stackframeinfo sfi;
1601 bool result;
1602 global_sp = sp;
1603 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1604 result = intrp_patcher_get_putfield((u1 *) (IP - 3));
1605 stacktrace_remove_stackframeinfo(&sfi);
1606 CLEAR_global_sp;
1607 if (!result)
1608   THROW0;
1609 STORE_ORDER_BARRIER();
1610 IP[-3] = INST_ADDR(GETFIELD_CELL);
1611 SET_IP(IP-3);
1612 patchersuper_rewrite(IP);
1613
1614 PATCHER_PUTFIELD_INT ( #vOffset #auf ... -- )
1615 stackframeinfo sfi;
1616 bool result;
1617 global_sp = sp;
1618 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1619 result = intrp_patcher_get_putfield((u1 *) (IP - 3));
1620 stacktrace_remove_stackframeinfo(&sfi);
1621 CLEAR_global_sp;
1622 if (!result)
1623   THROW0;
1624 STORE_ORDER_BARRIER();
1625 IP[-3] = INST_ADDR(PUTFIELD_INT);
1626 SET_IP(IP-3);
1627 patchersuper_rewrite(IP);
1628
1629 PATCHER_PUTFIELD_FLOAT ( #vOffset #auf ... -- )
1630 stackframeinfo sfi;
1631 bool result;
1632 global_sp = sp;
1633 stacktrace_create_stackframeinfo(&sfi, NULL, fp, (functionptr) IP);
1634 result = intrp_patcher_get_putfield((u1 *)(IP-3));
1635 stacktrace_remove_stackframeinfo(&sfi);
1636 CLEAR_global_sp;
1637 if (!result)
1638   THROW0;
1639 STORE_ORDER_BARRIER();
1640 IP[-3] = INST_ADDR(PUTFIELD_FLOAT);
1641 SET_IP(IP-3);
1642 patchersuper_rewrite(IP);
1643
1644 PATCHER_PUTFIELD_LONG ( #vOffset #auf ... -- )
1645 stackframeinfo sfi;
1646 bool result;
1647 global_sp = sp;
1648 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1649 result = intrp_patcher_get_putfield((u1 *) (IP - 3));
1650 stacktrace_remove_stackframeinfo(&sfi);
1651 CLEAR_global_sp;
1652 if (!result)
1653   THROW0;
1654 STORE_ORDER_BARRIER();
1655 IP[-3] = INST_ADDR(PUTFIELD_LONG);
1656 SET_IP(IP-3);
1657 patchersuper_rewrite(IP);
1658
1659 PATCHER_PUTFIELD_CELL ( #vOffset #auf ... -- )
1660 stackframeinfo sfi;
1661 bool result;
1662 global_sp = sp;
1663 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1664 result = intrp_patcher_get_putfield((u1 *) (IP - 3));
1665 stacktrace_remove_stackframeinfo(&sfi);
1666 CLEAR_global_sp;
1667 if (!result)
1668   THROW0;
1669 STORE_ORDER_BARRIER();
1670 IP[-3] = INST_ADDR(PUTFIELD_CELL);
1671 SET_IP(IP-3);
1672 patchersuper_rewrite(IP);
1673
1674 \ other patchers for lazy resolving
1675
1676 PATCHER_MULTIANEWARRAY ( #aClass #iSize #acr ... -- )
1677 stackframeinfo sfi;
1678 bool result;
1679 global_sp = sp;
1680 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1681 result = intrp_patcher_builtin_multianewarray((u1 *) (IP - 4));
1682 stacktrace_remove_stackframeinfo(&sfi);
1683 CLEAR_global_sp;
1684 if (!result)
1685   THROW0;
1686 STORE_ORDER_BARRIER();
1687 IP[-4] = INST_ADDR(MULTIANEWARRAY);
1688 SET_IP(IP - 4);
1689 patchersuper_rewrite(IP);
1690
1691 PATCHER_INVOKESTATIC ( #aaTarget #iNargs #aum ... -- ) 0xd8
1692 stackframeinfo sfi;
1693 bool result;
1694 global_sp = sp;
1695 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1696 result = intrp_patcher_invokestatic_special((u1 *) (IP - 4));
1697 stacktrace_remove_stackframeinfo(&sfi);
1698 CLEAR_global_sp;
1699 if (!result)
1700   THROW0;
1701 STORE_ORDER_BARRIER();
1702 IP[-4] = INST_ADDR(INVOKESTATIC);
1703 SET_IP(IP-4);
1704 patchersuper_rewrite(IP);
1705
1706 PATCHER_INVOKESPECIAL ( #aaTarget #iNargs #aum ... -- ) 0xd8
1707 stackframeinfo sfi;
1708 bool result;
1709 global_sp = sp;
1710 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1711 result = intrp_patcher_invokestatic_special((u1 *) (IP - 4));
1712 stacktrace_remove_stackframeinfo(&sfi);
1713 CLEAR_global_sp;
1714 if (!result)
1715   THROW0;
1716 STORE_ORDER_BARRIER();
1717 IP[-4] = INST_ADDR(INVOKESPECIAL);
1718 SET_IP(IP-4);
1719 patchersuper_rewrite(IP);
1720
1721 PATCHER_INVOKEVIRTUAL ( #vOffset #iNargs #aum ... -- ) 0xd8
1722 stackframeinfo sfi;
1723 bool result;
1724 global_sp = sp;
1725 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1726 result = intrp_patcher_invokevirtual((u1 *) (IP - 4));
1727 stacktrace_remove_stackframeinfo(&sfi);
1728 CLEAR_global_sp;
1729 if (!result)
1730   THROW0;
1731 STORE_ORDER_BARRIER();
1732 IP[-4] = INST_ADDR(INVOKEVIRTUAL);
1733 SET_IP(IP-4);
1734 patchersuper_rewrite(IP);
1735
1736 PATCHER_INVOKEINTERFACE ( #iInterfaceoffset #vOffset #iNargs #aum ... -- ) 0xd8
1737 stackframeinfo sfi;
1738 bool result;
1739 global_sp = sp;
1740 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1741 result = intrp_patcher_invokeinterface((u1 *) (IP - 5));
1742 stacktrace_remove_stackframeinfo(&sfi);
1743 CLEAR_global_sp;
1744 if (!result)
1745   THROW0;
1746 STORE_ORDER_BARRIER();
1747 IP[-5] = INST_ADDR(INVOKEINTERFACE);
1748 SET_IP(IP-5);
1749 patchersuper_rewrite(IP);
1750
1751 PATCHER_CHECKCAST ( #aClass #acr ... -- ) 0xc
1752 stackframeinfo sfi;
1753 bool result;
1754 global_sp = sp;
1755 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1756 result = intrp_patcher_checkcast_instanceof((u1 *) (IP - 3));
1757 stacktrace_remove_stackframeinfo(&sfi);
1758 CLEAR_global_sp;
1759 if (!result)
1760   THROW0;
1761 STORE_ORDER_BARRIER();
1762 IP[-3] = INST_ADDR(CHECKCAST);
1763 SET_IP(IP-3);
1764 patchersuper_rewrite(IP);
1765
1766 PATCHER_INSTANCEOF ( #aClass #acr ... -- ) 0xc1
1767 stackframeinfo sfi;
1768 bool result;
1769 global_sp = sp;
1770 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1771 result = intrp_patcher_checkcast_instanceof((u1 *) (IP - 3));
1772 stacktrace_remove_stackframeinfo(&sfi);
1773 CLEAR_global_sp;
1774 if (!result)
1775   THROW0;
1776 STORE_ORDER_BARRIER();
1777 IP[-3] = INST_ADDR(INSTANCEOF);
1778 SET_IP(IP-3);
1779 patchersuper_rewrite(IP);
1780
1781 \ This is stub code for methods that we have not yet translated.
1782 \ Initially, the code for each method is set to this stub. The
1783 \ first time the method is called, the code in the stub runs, which
1784 \ translates the bytecode, and replaces the stub with the threaded code.
1785
1786 TRANSLATE ( #am ... --  )
1787 {
1788   Inst *codeptr;
1789   stackframeinfo sfi;
1790   Cell *acelloldfp;
1791   Inst *ainstoldip;
1792   ;
1793   vm_Cell2acell(sp[1],acelloldfp);
1794   vm_Cell2ainst(sp[0],ainstoldip);
1795   global_sp = sp;
1796   stacktrace_create_extern_stackframeinfo(&sfi, NULL, (u1 *) acelloldfp, (u1 *) ainstoldip, (u1 *) ainstoldip);
1797   codeptr = (Inst *) jit_compile(am);
1798   stacktrace_remove_stackframeinfo(&sfi);
1799   if (codeptr == NULL) {
1800     fp = acelloldfp;
1801     SET_IP(ainstoldip); /* set up ip and fp for throw */
1802     THROW0;
1803   }
1804   CLEAR_global_sp;
1805   IP[-4] = codeptr;
1806   SET_IP(codeptr);
1807 }
1808
1809 NATIVECALL ( #am #af #addrcif ... acelloldfp ainstoldip -- )
1810 sp = nativecall(af, am, sp, ainstoldip, acelloldfp, addrcif);
1811 fp = acelloldfp;
1812 SET_IP(ainstoldip);
1813 if (*exceptionptr)
1814   THROW0;
1815
1816
1817 TRACENATIVECALL ( #am #af #addrcif ... acelloldfp ainstoldip -- )
1818 sp = nativecall(af, am, sp, ainstoldip, acelloldfp, addrcif);
1819 fp = acelloldfp;
1820 SET_IP(ainstoldip);
1821 {
1822 Cell v = sp[0];
1823 float f;
1824 vm_Cell2f(v,f);
1825 #if !defined(NDEBUG)
1826 builtin_displaymethodstop(am, (s8) v, f, f);
1827 #endif
1828 }
1829 if (*exceptionptr)
1830   THROW0;
1831
1832 PATCHER_NATIVECALL ( #am #af #addrcif ... -- )
1833 #if !defined(WITH_STATIC_CLASSPATH)
1834 stackframeinfo sfi;
1835 bool result;
1836 global_sp = sp;
1837 stacktrace_create_stackframeinfo(&sfi, NULL, (u1 *) fp, (u1 *) IP);
1838 result = intrp_patcher_resolve_native((u1 *) (IP - 4));
1839 stacktrace_remove_stackframeinfo(&sfi);
1840 CLEAR_global_sp;
1841 if (!result)
1842   THROW0;
1843 STORE_ORDER_BARRIER();
1844 IP[-4] = opt_verbosecall ? INST_ADDR(TRACENATIVECALL) : INST_ADDR(NATIVECALL);
1845 SET_IP(IP - 4);
1846 patchersuper_rewrite(IP);
1847 #else
1848 assert(false);
1849 #endif
1850
1851 TRACECALL ( #am -- )
1852 #if !defined(NDEBUG)
1853 builtin_trace_args(
1854         access_local_cell(0 * -SIZEOF_VOID_P),
1855         access_local_cell(1 * -SIZEOF_VOID_P),
1856         access_local_cell(2 * -SIZEOF_VOID_P),
1857         access_local_cell(3 * -SIZEOF_VOID_P),
1858 #if TRACE_ARGS_NUM > 4
1859         access_local_cell(4 * -SIZEOF_VOID_P),
1860         access_local_cell(5 * -SIZEOF_VOID_P),
1861 #endif
1862 #if TRACE_ARGS_NUM == 8
1863         access_local_cell(6 * -SIZEOF_VOID_P),
1864         access_local_cell(7 * -SIZEOF_VOID_P),
1865 #endif
1866         am);
1867 #endif /* !defined(NDEBUG) */
1868
1869 TRACERETURN ( #am v -- v )
1870 float f;
1871 vm_Cell2f(v,f);
1872 #if !defined(NDEBUG)
1873 builtin_displaymethodstop(am, (s8) v, f, f);
1874 #endif
1875
1876 TRACELRETURN ( #am l -- l )
1877 Double_Store ds;
1878 ds.l = l;
1879 #if !defined(NDEBUG)
1880 builtin_displaymethodstop(am, l, ds.d, ds.d);
1881 #endif
1882
1883 END ( ... -- )
1884 global_sp = sp;
1885 SUPER_END;
1886 vm_uncount_block(IP); /* undo the count part of SUPER_END,
1887                          because there is no fallthrough */
1888 return NULL;
1889
1890 _ALOAD_GETFIELD_CELL_ =  ALOAD GETFIELD_CELL 
1891 _DUP_ICONST_ =  DUP ICONST 
1892 _ALOAD_ALOAD_ =  ALOAD ALOAD 
1893 _ICONST_ICONST_ =  ICONST ICONST 
1894 _DUP_ICONST_ICONST_ =  DUP ICONST ICONST 
1895 _ICONST_CASTORE_ =  ICONST CASTORE 
1896 _ICONST_ICONST_CASTORE_ =  ICONST ICONST CASTORE 
1897 _DUP_ICONST_ICONST_CASTORE_ =  DUP ICONST ICONST CASTORE 
1898 _CASTORE_DUP_ =  CASTORE DUP 
1899 _CASTORE_DUP_ICONST_ =  CASTORE DUP ICONST 
1900 _DUP_ICONST_ICONST_CASTORE_DUP_ =  DUP ICONST ICONST CASTORE DUP 
1901 _ICONST_CASTORE_DUP_ =  ICONST CASTORE DUP 
1902 _ICONST_CASTORE_DUP_ICONST_ =  ICONST CASTORE DUP ICONST 
1903 _ICONST_ICONST_CASTORE_DUP_ =  ICONST ICONST CASTORE DUP 
1904 _ICONST_ICONST_CASTORE_DUP_ICONST_ =  ICONST ICONST CASTORE DUP ICONST 
1905 _CASTORE_DUP_ICONST_ICONST_ =  CASTORE DUP ICONST ICONST 
1906 _CASTORE_DUP_ICONST_ICONST_CASTORE_ =  CASTORE DUP ICONST ICONST CASTORE 
1907 _ICONST_CASTORE_DUP_ICONST_ICONST_ =  ICONST CASTORE DUP ICONST ICONST 
1908 _ASTORE_ALOAD_ =  ASTORE ALOAD 
1909 _ALOAD_GETFIELD_INT_ =  ALOAD GETFIELD_INT 
1910 _ALOAD_ILOAD_ =  ALOAD ILOAD 
1911 _ALOAD_ACONST_ =  ALOAD ACONST 
1912 _ICONST_ACONST_ =  ICONST ACONST 
1913 _AASTORE_DUP_ =  AASTORE DUP 
1914 _AASTORE_DUP_ICONST_ =  AASTORE DUP ICONST 
1915 _ALOAD_ICONST_ =  ALOAD ICONST 
1916 _ILOAD_ICONST_ =  ILOAD ICONST 
1917 _ILOAD_ILOAD_ =  ILOAD ILOAD 
1918 _DUP_ICONST_ACONST_ =  DUP ICONST ACONST 
1919 _GETFIELD_CELL_ALOAD_ =  GETFIELD_CELL ALOAD 
1920 _AASTORE_DUP_ICONST_ACONST_ =  AASTORE DUP ICONST ACONST 
1921 _ACONST_AASTORE_ =  ACONST AASTORE 
1922 _ICONST_ACONST_AASTORE_ =  ICONST ACONST AASTORE 
1923 _DUP_ICONST_ACONST_AASTORE_ =  DUP ICONST ACONST AASTORE 
1924 _ALOAD_GETFIELD_CELL_ALOAD_ =  ALOAD GETFIELD_CELL ALOAD 
1925 _ACONST_AASTORE_DUP_ =  ACONST AASTORE DUP 
1926 _ACONST_AASTORE_DUP_ICONST_ =  ACONST AASTORE DUP ICONST 
1927 _DUP_ICONST_ACONST_AASTORE_DUP_ =  DUP ICONST ACONST AASTORE DUP 
1928 _ICONST_ACONST_AASTORE_DUP_ =  ICONST ACONST AASTORE DUP 
1929 _ICONST_ACONST_AASTORE_DUP_ICONST_ =  ICONST ACONST AASTORE DUP ICONST 
1930 _AASTORE_DUP_ICONST_ACONST_AASTORE_ =  AASTORE DUP ICONST ACONST AASTORE 
1931 _DUP_ACONST_ =  DUP ACONST 
1932 _ACONST_AASTORE_DUP_ICONST_ACONST_ =  ACONST AASTORE DUP ICONST ACONST 
1933 _PUTFIELD_CELL_ALOAD_ =  PUTFIELD_CELL ALOAD 
1934 _ILOAD_ALOAD_ =  ILOAD ALOAD 
1935 _ICONST_ALOAD_ =  ICONST ALOAD 
1936 _DUP_ALOAD_ =  DUP ALOAD 
1937 _ICONST_ISTORE_ =  ICONST ISTORE 
1938 _ASTORE_ALOAD_ALOAD_ =  ASTORE ALOAD ALOAD 
1939 _ALOAD_PUTFIELD_CELL_ =  ALOAD PUTFIELD_CELL 
1940 _PUTFIELD_INT_ALOAD_ =  PUTFIELD_INT ALOAD 
1941 _ALOAD_ALOAD_PUTFIELD_CELL_ =  ALOAD ALOAD PUTFIELD_CELL 
1942 _ICONST_IADD_ =  ICONST IADD 
1943 _ISTORE_GOTO_ =  ISTORE GOTO 
1944 _ACONST_ACONST_ =  ACONST ACONST 
1945 _POP_ALOAD_ =  POP ALOAD 
1946 _ACONST_ICONST_ =  ACONST ICONST 
1947 _ALOAD_ALOAD_ALOAD_ =  ALOAD ALOAD ALOAD 
1948 _ALOAD_ALOAD_GETFIELD_CELL_ =  ALOAD ALOAD GETFIELD_CELL 
1949 _ISTORE_ALOAD_ =  ISTORE ALOAD 
1950 _GETFIELD_CELL_ILOAD_ =  GETFIELD_CELL ILOAD 
1951 _IINC_ILOAD_ =  IINC ILOAD 
1952 _ISTORE_ILOAD_ =  ISTORE ILOAD 
1953 _ALOAD_GETFIELD_CELL_ILOAD_ =  ALOAD GETFIELD_CELL ILOAD 
1954 _ILOAD_ICONST_IADD_ =  ILOAD ICONST IADD 
1955 _CHECKCAST_ASTORE_ =  CHECKCAST ASTORE 
1956 _ASTORE_ACONST_ =  ASTORE ACONST 
1957 _GETFIELD_INT_ALOAD_ =  GETFIELD_INT ALOAD 
1958 _ACONST_ALOAD_ =  ACONST ALOAD 
1959 _ICONST_ISTORE_GOTO_ =  ICONST ISTORE GOTO 
1960 _CHECKCAST_ASTORE_ALOAD_ =  CHECKCAST ASTORE ALOAD 
1961 _ASTORE_GOTO_ =  ASTORE GOTO 
1962 _ALOAD_PUTFIELD_CELL_ALOAD_ =  ALOAD PUTFIELD_CELL ALOAD 
1963 _ALOAD_ALOAD_PUTFIELD_CELL_ALOAD_ =  ALOAD ALOAD PUTFIELD_CELL ALOAD 
1964 _ICONST_PUTFIELD_INT_ =  ICONST PUTFIELD_INT 
1965 _ALOAD_IFNULL_ =  ALOAD IFNULL 
1966 _ALOAD_IFNONNULL_ =  ALOAD IFNONNULL 
1967 _ALOAD_ICONST_PUTFIELD_INT_ =  ALOAD ICONST PUTFIELD_INT 
1968 _ALOAD_GETFIELD_INT_ALOAD_ =  ALOAD GETFIELD_INT ALOAD 
1969 _ALOAD_ILOAD_ILOAD_ =  ALOAD ILOAD ILOAD 
1970 _DUP_ICONST_ALOAD_ =  DUP ICONST ALOAD 
1971 _IADD_ILOAD_ =  IADD ILOAD 
1972 _GETFIELD_CELL_ICONST_ =  GETFIELD_CELL ICONST 
1973 _ILOAD_PUTFIELD_INT_ =  ILOAD PUTFIELD_INT 
1974 _GETFIELD_INT_ALOAD_GETFIELD_INT_ =  GETFIELD_INT ALOAD GETFIELD_INT 
1975 _GETFIELD_CELL_GETFIELD_CELL_ =  GETFIELD_CELL GETFIELD_CELL 
1976 _ALOAD_ACONST_ACONST_ =  ALOAD ACONST ACONST 
1977 _ALOAD_ARRAYLENGTH_ =  ALOAD ARRAYLENGTH 
1978 _GETFIELD_CELL_IFNULL_ =  GETFIELD_CELL IFNULL 
1979 _ICONST_ISUB_ =  ICONST ISUB 
1980 _ALOAD_ILOAD_PUTFIELD_INT_ =  ALOAD ILOAD PUTFIELD_INT 
1981 _ALOAD_GETFIELD_CELL_GETFIELD_CELL_ =  ALOAD GETFIELD_CELL GETFIELD_CELL 
1982 _PUTFIELD_CELL_ALOAD_ALOAD_ =  PUTFIELD_CELL ALOAD ALOAD 
1983 _ILOAD_AALOAD_ =  ILOAD AALOAD 
1984 _ALOAD_MONITOREXIT_ =  ALOAD MONITOREXIT 
1985 _ALOAD_CHECKCAST_ =  ALOAD CHECKCAST 
1986 _ALOAD_GETFIELD_CELL_ICONST_ =  ALOAD GETFIELD_CELL ICONST 
1987 _ICONST_ILOAD_ =  ICONST ILOAD 
1988 _ACONST_ICONST_ICONST_ =  ACONST ICONST ICONST 
1989 _ALOAD_GETFIELD_CELL_IFNULL_ =  ALOAD GETFIELD_CELL IFNULL