DEADSOFTWARE

Mirror gpcp-32255
[gpcp-linux.git] / gpcp / JVMcodes.cp
1 (* ============================================================ *)
2 (* JVMcodes is the module which defines jasmin name ordinals. *)
3 (* Name spelling is defined by the lexical rules of Jasmin. *)
4 (* Copyright (c) John Gough 1999, 2000. *)
5 (* ============================================================ *)
7 MODULE JVMcodes;
8 IMPORT GPCPcopyright;
10 (* ============================================================ *)
12 CONST
13 dot_error* = 0;
14 dot_catch* = 1;
15 dot_class* = 2;
16 dot_end* = 3;
17 dot_field* = 4;
18 dot_implements*= 5;
19 dot_interface* = 6;
20 dot_limit* = 7;
21 dot_line* = 8;
22 dot_method* = 9;
23 dot_source* = 10;
24 dot_super* = 11;
25 dot_throws* = 12;
26 dot_var* = 13;
28 CONST
29 att_empty* = {};
30 att_public* = {0};
31 att_private* = {1};
32 att_protected* = {2};
33 att_static* = {3};
34 att_final* = {4};
35 att_synchronized*= {5};
36 att_native* = {6};
37 att_volatile* = {7};
38 att_abstract* = {8};
39 att_transient* = {9};
40 att_interface* = {10};
42 (* Constants for java class files *)
44 CONST
45 (* access flags *)
46 acc_package* = 0000H;
47 acc_public* = 0001H;
48 acc_private* = 0002H;
49 acc_protected* = 0004H;
50 acc_static* = 0008H;
51 acc_final* = 0010H;
52 acc_synchronized* = 0020H;
53 acc_volatile* = 0040H;
54 acc_transient* = 0080H;
55 acc_super* = 0020H;
56 acc_native* = 0100H;
57 acc_interface* = 0200H;
58 acc_abstract* = 0400H;
60 (* constant pool tags *)
61 const_utf8* = 1;
62 const_integer* = 3;
63 const_float* = 4;
64 const_long* = 5;
65 const_double* = 6;
66 const_class* = 7;
67 const_string* = 8;
68 const_fieldref* = 9;
69 const_methodref* = 10;
70 const_interfacemethodref* = 11;
71 const_nameandtype* = 12;
73 (* ============================================================ *)
75 CONST
76 opc_nop* = 0;
77 opc_aconst_null*= 1;
78 opc_iconst_m1* = 2;
79 opc_iconst_0* = 3;
80 opc_iconst_1* = 4;
81 opc_iconst_2* = 5;
82 opc_iconst_3* = 6;
83 opc_iconst_4* = 7;
84 opc_iconst_5* = 8;
85 opc_lconst_0* = 9;
86 opc_lconst_1* = 10;
87 opc_fconst_0* = 11;
88 opc_fconst_1* = 12;
89 opc_fconst_2* = 13;
90 opc_dconst_0* = 14;
91 opc_dconst_1* = 15;
92 opc_bipush* = 16;
93 opc_sipush* = 17;
94 opc_ldc* = 18;
95 opc_ldc_w* = 19;
96 opc_ldc2_w* = 20;
97 opc_iload* = 21;
98 opc_lload* = 22;
99 opc_fload* = 23;
100 opc_dload* = 24;
101 opc_aload* = 25;
102 opc_iload_0* = 26;
103 opc_iload_1* = 27;
104 opc_iload_2* = 28;
105 opc_iload_3* = 29;
106 opc_lload_0* = 30;
107 opc_lload_1* = 31;
108 opc_lload_2* = 32;
109 opc_lload_3* = 33;
110 opc_fload_0* = 34;
111 opc_fload_1* = 35;
112 opc_fload_2* = 36;
113 opc_fload_3* = 37;
114 opc_dload_0* = 38;
115 opc_dload_1* = 39;
116 opc_dload_2* = 40;
117 opc_dload_3* = 41;
118 opc_aload_0* = 42;
119 opc_aload_1* = 43;
120 opc_aload_2* = 44;
121 opc_aload_3* = 45;
122 opc_iaload* = 46;
123 opc_laload* = 47;
124 opc_faload* = 48;
125 opc_daload* = 49;
126 opc_aaload* = 50;
127 opc_baload* = 51;
128 opc_caload* = 52;
129 opc_saload* = 53;
130 opc_istore* = 54;
131 opc_lstore* = 55;
132 opc_fstore* = 56;
133 opc_dstore* = 57;
134 opc_astore* = 58;
135 opc_istore_0* = 59;
136 opc_istore_1* = 60;
137 opc_istore_2* = 61;
138 opc_istore_3* = 62;
139 opc_lstore_0* = 63;
140 opc_lstore_1* = 64;
141 opc_lstore_2* = 65;
142 opc_lstore_3* = 66;
143 opc_fstore_0* = 67;
144 opc_fstore_1* = 68;
145 opc_fstore_2* = 69;
146 opc_fstore_3* = 70;
147 opc_dstore_0* = 71;
148 opc_dstore_1* = 72;
149 opc_dstore_2* = 73;
150 opc_dstore_3* = 74;
151 opc_astore_0* = 75;
152 opc_astore_1* = 76;
153 opc_astore_2* = 77;
154 opc_astore_3* = 78;
155 opc_iastore* = 79;
156 opc_lastore* = 80;
157 opc_fastore* = 81;
158 opc_dastore* = 82;
159 opc_aastore* = 83;
160 opc_bastore* = 84;
161 opc_castore* = 85;
162 opc_sastore* = 86;
163 opc_pop* = 87;
164 opc_pop2* = 88;
165 opc_dup* = 89;
166 opc_dup_x1* = 90;
167 opc_dup_x2* = 91;
168 opc_dup2* = 92;
169 opc_dup2_x1* = 93;
170 opc_dup2_x2* = 94;
171 opc_swap* = 95;
172 opc_iadd* = 96;
173 opc_ladd* = 97;
174 opc_fadd* = 98;
175 opc_dadd* = 99;
176 opc_isub* = 100;
177 opc_lsub* = 101;
178 opc_fsub* = 102;
179 opc_dsub* = 103;
180 opc_imul* = 104;
181 opc_lmul* = 105;
182 opc_fmul* = 106;
183 opc_dmul* = 107;
184 opc_idiv* = 108;
185 opc_ldiv* = 109;
186 opc_fdiv* = 110;
187 opc_ddiv* = 111;
188 opc_irem* = 112;
189 opc_lrem* = 113;
190 opc_frem* = 114;
191 opc_drem* = 115;
192 opc_ineg* = 116;
193 opc_lneg* = 117;
194 opc_fneg* = 118;
195 opc_dneg* = 119;
196 opc_ishl* = 120;
197 opc_lshl* = 121;
198 opc_ishr* = 122;
199 opc_lshr* = 123;
200 opc_iushr* = 124;
201 opc_lushr* = 125;
202 opc_iand* = 126;
203 opc_land* = 127;
204 opc_ior* = 128;
205 opc_lor* = 129;
206 opc_ixor* = 130;
207 opc_lxor* = 131;
208 opc_iinc* = 132;
209 opc_i2l* = 133;
210 opc_i2f* = 134;
211 opc_i2d* = 135;
212 opc_l2i* = 136;
213 opc_l2f* = 137;
214 opc_l2d* = 138;
215 opc_f2i* = 139;
216 opc_f2l* = 140;
217 opc_f2d* = 141;
218 opc_d2i* = 142;
219 opc_d2l* = 143;
220 opc_d2f* = 144;
221 opc_i2b* = 145;
222 opc_i2c* = 146;
223 opc_i2s* = 147;
224 opc_lcmp* = 148;
225 opc_fcmpl* = 149;
226 opc_fcmpg* = 150;
227 opc_dcmpl* = 151;
228 opc_dcmpg* = 152;
229 opc_ifeq* = 153;
230 opc_ifne* = 154;
231 opc_iflt* = 155;
232 opc_ifge* = 156;
233 opc_ifgt* = 157;
234 opc_ifle* = 158;
235 opc_if_icmpeq* = 159;
236 opc_if_icmpne* = 160;
237 opc_if_icmplt* = 161;
238 opc_if_icmpge* = 162;
239 opc_if_icmpgt* = 163;
240 opc_if_icmple* = 164;
241 opc_if_acmpeq* = 165;
242 opc_if_acmpne* = 166;
243 opc_goto* = 167;
244 opc_jsr* = 168;
245 opc_ret* = 169;
246 opc_tableswitch* = 170;
247 opc_lookupswitch* = 171;
248 opc_ireturn* = 172;
249 opc_lreturn* = 173;
250 opc_freturn* = 174;
251 opc_dreturn* = 175;
252 opc_areturn* = 176;
253 opc_return* = 177;
254 opc_getstatic* = 178;
255 opc_putstatic* = 179;
256 opc_getfield* = 180;
257 opc_putfield* = 181;
258 opc_invokevirtual* = 182;
259 opc_invokespecial* = 183;
260 opc_invokestatic* = 184;
261 opc_invokeinterface* = 185;
262 opc_xxxunusedxxx = 186;
263 opc_new* = 187;
264 opc_newarray* = 188;
265 opc_anewarray* = 189;
266 opc_arraylength* = 190;
267 opc_athrow* = 191;
268 opc_checkcast* = 192;
269 opc_instanceof* = 193;
270 opc_monitorenter* = 194;
271 opc_monitorexit* = 195;
272 opc_wide* = 196;
273 opc_multianewarray* = 197;
274 opc_ifnull* = 198;
275 opc_ifnonnull* = 199;
276 opc_goto_w* = 200;
277 opc_jsr_w* = 201;
278 opc_breakpoint* = 202;
280 (* ============================================================ *)
282 TYPE
283 OpName* = ARRAY 24 OF CHAR;
285 (* ============================================================ *)
287 VAR op* : ARRAY 203 OF OpName;
288 dl* : ARRAY 203 OF INTEGER;
290 VAR dirStr* : ARRAY 14 OF OpName;
291 access* : ARRAY 12 OF OpName;
293 (* ============================================================ *)
295 BEGIN
296 dirStr[dot_error] := ".ERROR";
297 dirStr[dot_catch] := ".catch";
298 dirStr[dot_class] := ".class";
299 dirStr[dot_end] := ".end method";
300 dirStr[dot_field] := ".field";
301 dirStr[dot_implements] := ".implements";
302 dirStr[dot_interface] := ".interface";
303 dirStr[dot_limit] := ".limit";
304 dirStr[dot_line] := ".line";
305 dirStr[dot_method] := ".method";
306 dirStr[dot_source] := ".source";
307 dirStr[dot_super] := ".super";
308 dirStr[dot_throws] := ".throws";
309 dirStr[dot_var] := ".var";
311 access[ 0] := "public";
312 access[ 1] := "private";
313 access[ 2] := "protected";
314 access[ 3] := "static";
315 access[ 4] := "final";
316 access[ 5] := "synchronized";
317 access[ 6] := "native";
318 access[ 7] := "volatile";
319 access[ 8] := "abstract";
320 access[ 9] := "transient";
321 access[10] := "interface";
323 op[opc_nop] := "nop";
324 op[opc_aconst_null] := "aconst_null";
325 op[opc_iconst_m1] := "iconst_m1";
326 op[opc_iconst_0] := "iconst_0";
327 op[opc_iconst_1] := "iconst_1";
328 op[opc_iconst_2] := "iconst_2";
329 op[opc_iconst_3] := "iconst_3";
330 op[opc_iconst_4] := "iconst_4";
331 op[opc_iconst_5] := "iconst_5";
332 op[opc_lconst_0] := "lconst_0";
333 op[opc_lconst_1] := "lconst_1";
334 op[opc_fconst_0] := "fconst_0";
335 op[opc_fconst_1] := "fconst_1";
336 op[opc_fconst_2] := "fconst_2";
337 op[opc_dconst_0] := "dconst_0";
338 op[opc_dconst_1] := "dconst_1";
339 op[opc_bipush] := "bipush";
340 op[opc_sipush] := "sipush";
341 op[opc_ldc] := "ldc";
342 op[opc_ldc_w] := "ldc_w";
343 op[opc_ldc2_w] := "ldc2_w";
344 op[opc_iload] := "iload";
345 op[opc_lload] := "lload";
346 op[opc_fload] := "fload";
347 op[opc_dload] := "dload";
348 op[opc_aload] := "aload";
349 op[opc_iload_0] := "iload_0";
350 op[opc_iload_1] := "iload_1";
351 op[opc_iload_2] := "iload_2";
352 op[opc_iload_3] := "iload_3";
353 op[opc_lload_0] := "lload_0";
354 op[opc_lload_1] := "lload_1";
355 op[opc_lload_2] := "lload_2";
356 op[opc_lload_3] := "lload_3";
357 op[opc_fload_0] := "fload_0";
358 op[opc_fload_1] := "fload_1";
359 op[opc_fload_2] := "fload_2";
360 op[opc_fload_3] := "fload_3";
361 op[opc_dload_0] := "dload_0";
362 op[opc_dload_1] := "dload_1";
363 op[opc_dload_2] := "dload_2";
364 op[opc_dload_3] := "dload_3";
365 op[opc_aload_0] := "aload_0";
366 op[opc_aload_1] := "aload_1";
367 op[opc_aload_2] := "aload_2";
368 op[opc_aload_3] := "aload_3";
369 op[opc_iaload] := "iaload";
370 op[opc_laload] := "laload";
371 op[opc_faload] := "faload";
372 op[opc_daload] := "daload";
373 op[opc_aaload] := "aaload";
374 op[opc_baload] := "baload";
375 op[opc_caload] := "caload";
376 op[opc_saload] := "saload";
377 op[opc_istore] := "istore";
378 op[opc_lstore] := "lstore";
379 op[opc_fstore] := "fstore";
380 op[opc_dstore] := "dstore";
381 op[opc_astore] := "astore";
382 op[opc_istore_0] := "istore_0";
383 op[opc_istore_1] := "istore_1";
384 op[opc_istore_2] := "istore_2";
385 op[opc_istore_3] := "istore_3";
386 op[opc_lstore_0] := "lstore_0";
387 op[opc_lstore_1] := "lstore_1";
388 op[opc_lstore_2] := "lstore_2";
389 op[opc_lstore_3] := "lstore_3";
390 op[opc_fstore_0] := "fstore_0";
391 op[opc_fstore_1] := "fstore_1";
392 op[opc_fstore_2] := "fstore_2";
393 op[opc_fstore_3] := "fstore_3";
394 op[opc_dstore_0] := "dstore_0";
395 op[opc_dstore_1] := "dstore_1";
396 op[opc_dstore_2] := "dstore_2";
397 op[opc_dstore_3] := "dstore_3";
398 op[opc_astore_0] := "astore_0";
399 op[opc_astore_1] := "astore_1";
400 op[opc_astore_2] := "astore_2";
401 op[opc_astore_3] := "astore_3";
402 op[opc_iastore] := "iastore";
403 op[opc_lastore] := "lastore";
404 op[opc_fastore] := "fastore";
405 op[opc_dastore] := "dastore";
406 op[opc_aastore] := "aastore";
407 op[opc_bastore] := "bastore";
408 op[opc_castore] := "castore";
409 op[opc_sastore] := "sastore";
410 op[opc_pop] := "pop";
411 op[opc_pop2] := "pop2";
412 op[opc_dup] := "dup";
413 op[opc_dup_x1] := "dup_x1";
414 op[opc_dup_x2] := "dup_x2";
415 op[opc_dup2] := "dup2";
416 op[opc_dup2_x1] := "dup2_x1";
417 op[opc_dup2_x2] := "dup2_x2";
418 op[opc_swap] := "swap";
419 op[opc_iadd] := "iadd";
420 op[opc_ladd] := "ladd";
421 op[opc_fadd] := "fadd";
422 op[opc_dadd] := "dadd";
423 op[opc_isub] := "isub";
424 op[opc_lsub] := "lsub";
425 op[opc_fsub] := "fsub";
426 op[opc_dsub] := "dsub";
427 op[opc_imul] := "imul";
428 op[opc_lmul] := "lmul";
429 op[opc_fmul] := "fmul";
430 op[opc_dmul] := "dmul";
431 op[opc_idiv] := "idiv";
432 op[opc_ldiv] := "ldiv";
433 op[opc_fdiv] := "fdiv";
434 op[opc_ddiv] := "ddiv";
435 op[opc_irem] := "irem";
436 op[opc_lrem] := "lrem";
437 op[opc_frem] := "frem";
438 op[opc_drem] := "drem";
439 op[opc_ineg] := "ineg";
440 op[opc_lneg] := "lneg";
441 op[opc_fneg] := "fneg";
442 op[opc_dneg] := "dneg";
443 op[opc_ishl] := "ishl";
444 op[opc_lshl] := "lshl";
445 op[opc_ishr] := "ishr";
446 op[opc_lshr] := "lshr";
447 op[opc_iushr] := "iushr";
448 op[opc_lushr] := "lushr";
449 op[opc_iand] := "iand";
450 op[opc_land] := "land";
451 op[opc_ior] := "ior";
452 op[opc_lor] := "lor";
453 op[opc_ixor] := "ixor";
454 op[opc_lxor] := "lxor";
455 op[opc_iinc] := "iinc";
456 op[opc_i2l] := "i2l";
457 op[opc_i2f] := "i2f";
458 op[opc_i2d] := "i2d";
459 op[opc_l2i] := "l2i";
460 op[opc_l2f] := "l2f";
461 op[opc_l2d] := "l2d";
462 op[opc_f2i] := "f2i";
463 op[opc_f2l] := "f2l";
464 op[opc_f2d] := "f2d";
465 op[opc_d2i] := "d2i";
466 op[opc_d2l] := "d2l";
467 op[opc_d2f] := "d2f";
468 op[opc_i2b] := "i2b";
469 op[opc_i2c] := "i2c";
470 op[opc_i2s] := "i2s";
471 op[opc_lcmp] := "lcmp";
472 op[opc_fcmpl] := "fcmpl";
473 op[opc_fcmpg] := "fcmpg";
474 op[opc_dcmpl] := "dcmpl";
475 op[opc_dcmpg] := "dcmpg";
476 op[opc_ifeq] := "ifeq";
477 op[opc_ifne] := "ifne";
478 op[opc_iflt] := "iflt";
479 op[opc_ifge] := "ifge";
480 op[opc_ifgt] := "ifgt";
481 op[opc_ifle] := "ifle";
482 op[opc_if_icmpeq] := "if_icmpeq";
483 op[opc_if_icmpne] := "if_icmpne";
484 op[opc_if_icmplt] := "if_icmplt";
485 op[opc_if_icmpge] := "if_icmpge";
486 op[opc_if_icmpgt] := "if_icmpgt";
487 op[opc_if_icmple] := "if_icmple";
488 op[opc_if_acmpeq] := "if_acmpeq";
489 op[opc_if_acmpne] := "if_acmpne";
490 op[opc_goto] := "goto";
491 op[opc_jsr] := "jsr";
492 op[opc_ret] := "ret";
493 op[opc_tableswitch] := "tableswitch";
494 op[opc_lookupswitch] := "lookupswitch";
495 op[opc_ireturn] := "ireturn";
496 op[opc_lreturn] := "lreturn";
497 op[opc_freturn] := "freturn";
498 op[opc_dreturn] := "dreturn";
499 op[opc_areturn] := "areturn";
500 op[opc_return] := "return";
501 op[opc_getstatic] := "getstatic";
502 op[opc_putstatic] := "putstatic";
503 op[opc_getfield] := "getfield";
504 op[opc_putfield] := "putfield";
505 op[opc_invokevirtual] := "invokevirtual";
506 op[opc_invokespecial] := "invokespecial";
507 op[opc_invokestatic] := "invokestatic";
508 op[opc_invokeinterface] := "invokeinterface";
509 op[opc_xxxunusedxxx] := "xxxunusedxxx";
510 op[opc_new] := "new";
511 op[opc_newarray] := "newarray";
512 op[opc_anewarray] := "anewarray";
513 op[opc_arraylength] := "arraylength";
514 op[opc_athrow] := "athrow";
515 op[opc_checkcast] := "checkcast";
516 op[opc_instanceof] := "instanceof";
517 op[opc_monitorenter] := "monitorenter";
518 op[opc_monitorexit] := "monitorexit";
519 op[opc_wide] := "wide";
520 op[opc_multianewarray] := "multianewarray";
521 op[opc_ifnull] := "ifnull";
522 op[opc_ifnonnull] := "ifnonnull";
523 op[opc_goto_w] := "goto_w";
524 op[opc_jsr_w] := "jsr_w";
525 op[opc_breakpoint] := "breakpoint";
527 dl[opc_nop] := 0;
528 dl[opc_aconst_null] := 1;
529 dl[opc_iconst_m1] := 1;
530 dl[opc_iconst_0] := 1;
531 dl[opc_iconst_1] := 1;
532 dl[opc_iconst_2] := 1;
533 dl[opc_iconst_3] := 1;
534 dl[opc_iconst_4] := 1;
535 dl[opc_iconst_5] := 1;
536 dl[opc_lconst_0] := 2;
537 dl[opc_lconst_1] := 2;
538 dl[opc_fconst_0] := 1;
539 dl[opc_fconst_1] := 1;
540 dl[opc_fconst_2] := 1;
541 dl[opc_dconst_0] := 2;
542 dl[opc_dconst_1] := 2;
543 dl[opc_bipush] := 1;
544 dl[opc_sipush] := 1;
545 dl[opc_ldc] := 1;
546 dl[opc_ldc_w] := 1;
547 dl[opc_ldc2_w] := 2;
548 dl[opc_iload] := 1;
549 dl[opc_lload] := 2;
550 dl[opc_fload] := 1;
551 dl[opc_dload] := 2;
552 dl[opc_aload] := 1;
553 dl[opc_iload_0] := 1;
554 dl[opc_iload_1] := 1;
555 dl[opc_iload_2] := 1;
556 dl[opc_iload_3] := 1;
557 dl[opc_lload_0] := 2;
558 dl[opc_lload_1] := 2;
559 dl[opc_lload_2] := 2;
560 dl[opc_lload_3] := 2;
561 dl[opc_fload_0] := 1;
562 dl[opc_fload_1] := 1;
563 dl[opc_fload_2] := 1;
564 dl[opc_fload_3] := 1;
565 dl[opc_dload_0] := 2;
566 dl[opc_dload_1] := 2;
567 dl[opc_dload_2] := 2;
568 dl[opc_dload_3] := 2;
569 dl[opc_aload_0] := 1;
570 dl[opc_aload_1] := 1;
571 dl[opc_aload_2] := 1;
572 dl[opc_aload_3] := 1;
573 dl[opc_iaload] := -1; (* pop 2, push 1 *)
574 dl[opc_laload] := 0; (* pop 2, push 2 *)
575 dl[opc_faload] := -1; (* pop 2, push 1 *)
576 dl[opc_daload] := 0; (* pop 2, push 2 *)
577 dl[opc_aaload] := -1; (* pop 2, push 1 *)
578 dl[opc_baload] := -1; (* pop 2, push 1 *)
579 dl[opc_caload] := -1; (* pop 2, push 1 *)
580 dl[opc_saload] := -1; (* pop 2, push 1 *)
581 dl[opc_istore] := -1;
582 dl[opc_lstore] := -2;
583 dl[opc_fstore] := -1;
584 dl[opc_dstore] := -2;
585 dl[opc_astore] := -1;
586 dl[opc_istore_0] := -1;
587 dl[opc_istore_1] := -1;
588 dl[opc_istore_2] := -1;
589 dl[opc_istore_3] := -1;
590 dl[opc_lstore_0] := -2;
591 dl[opc_lstore_1] := -2;
592 dl[opc_lstore_2] := -2;
593 dl[opc_lstore_3] := -2;
594 dl[opc_fstore_0] := -1;
595 dl[opc_fstore_1] := -1;
596 dl[opc_fstore_2] := -1;
597 dl[opc_fstore_3] := -1;
598 dl[opc_dstore_0] := -2;
599 dl[opc_dstore_1] := -2;
600 dl[opc_dstore_2] := -2;
601 dl[opc_dstore_3] := -2;
602 dl[opc_astore_0] := -1;
603 dl[opc_astore_1] := -1;
604 dl[opc_astore_2] := -1;
605 dl[opc_astore_3] := -1;
606 dl[opc_iastore] := -3;
607 dl[opc_lastore] := -4;
608 dl[opc_fastore] := -3;
609 dl[opc_dastore] := -4;
610 dl[opc_aastore] := -3;
611 dl[opc_bastore] := -3;
612 dl[opc_castore] := -3;
613 dl[opc_sastore] := -3;
614 dl[opc_pop] := -1;
615 dl[opc_pop2] := -2;
616 dl[opc_dup] := 1;
617 dl[opc_dup_x1] := 1;
618 dl[opc_dup_x2] := 1;
619 dl[opc_dup2] := 2;
620 dl[opc_dup2_x1] := 2;
621 dl[opc_dup2_x2] := 2;
622 dl[opc_swap] := 0;
623 dl[opc_iadd] := -1;
624 dl[opc_ladd] := -2;
625 dl[opc_fadd] := -1;
626 dl[opc_dadd] := -2;
627 dl[opc_isub] := -1;
628 dl[opc_lsub] := -2;
629 dl[opc_fsub] := -1;
630 dl[opc_dsub] := -2;
631 dl[opc_imul] := -1;
632 dl[opc_lmul] := -2;
633 dl[opc_fmul] := -1;
634 dl[opc_dmul] := -2;
635 dl[opc_idiv] := -1;
636 dl[opc_ldiv] := -2;
637 dl[opc_fdiv] := -1;
638 dl[opc_ddiv] := -2;
639 dl[opc_irem] := -1;
640 dl[opc_lrem] := -2;
641 dl[opc_frem] := -1;
642 dl[opc_drem] := -2;
643 dl[opc_ineg] := 0;
644 dl[opc_lneg] := 0;
645 dl[opc_fneg] := 0;
646 dl[opc_dneg] := 0;
647 dl[opc_ishl] := -1;
648 dl[opc_lshl] := -1;
649 dl[opc_ishr] := -1;
650 dl[opc_lshr] := -1;
651 dl[opc_iushr] := -1;
652 dl[opc_lushr] := -1;
653 dl[opc_iand] := -1;
654 dl[opc_land] := -2;
655 dl[opc_ior] := -1;
656 dl[opc_lor] := -2;
657 dl[opc_ixor] := -1;
658 dl[opc_lxor] := -2;
659 dl[opc_iinc] := 0;
660 dl[opc_i2l] := 1;
661 dl[opc_i2f] := 0;
662 dl[opc_i2d] := 1;
663 dl[opc_l2i] := -1;
664 dl[opc_l2f] := -1;
665 dl[opc_l2d] := 0;
666 dl[opc_f2i] := 0;
667 dl[opc_f2l] := 1;
668 dl[opc_f2d] := 1;
669 dl[opc_d2i] := -1;
670 dl[opc_d2l] := 0;
671 dl[opc_d2f] := -1;
672 dl[opc_i2b] := 0;
673 dl[opc_i2c] := 0;
674 dl[opc_i2s] := 0;
675 dl[opc_lcmp] := -3;
676 dl[opc_fcmpl] := -1;
677 dl[opc_fcmpg] := -1;
678 dl[opc_dcmpl] := -3;
679 dl[opc_dcmpg] := -3;
680 dl[opc_ifeq] := -1;
681 dl[opc_ifne] := -1;
682 dl[opc_iflt] := -1;
683 dl[opc_ifge] := -1;
684 dl[opc_ifgt] := -1;
685 dl[opc_ifle] := -1;
686 dl[opc_if_icmpeq] := -2;
687 dl[opc_if_icmpne] := -2;
688 dl[opc_if_icmplt] := -2;
689 dl[opc_if_icmpge] := -2;
690 dl[opc_if_icmpgt] := -2;
691 dl[opc_if_icmple] := -2;
692 dl[opc_if_acmpeq] := -2;
693 dl[opc_if_acmpne] := -2;
694 dl[opc_goto] := 0;
695 dl[opc_jsr] := 1;
696 dl[opc_ret] := 0;
697 dl[opc_tableswitch] := -1;
698 dl[opc_lookupswitch] := -1;
699 dl[opc_ireturn] := -1; (* don't care ? *)
700 dl[opc_lreturn] := -2; (* don't care ? *)
701 dl[opc_freturn] := -1; (* don't care ? *)
702 dl[opc_dreturn] := -2; (* don't care ? *)
703 dl[opc_areturn] := -1; (* don't care ? *)
704 dl[opc_return] := 0; (* don't care ? *)
706 (* Defaults for single word load/store short Vs long *)
707 dl[opc_getstatic] := 1; (* Special case 1 or 2 *)
708 dl[opc_putstatic] := -1; (* Special case -1 or -2 *)
709 dl[opc_getfield] := 0; (* Special case 0 or 1 *)
710 dl[opc_putfield] := -2; (* Special case -2 or -3 *)
712 dl[opc_invokevirtual] := 0; (* Special case *)
713 dl[opc_invokespecial] := -1; (* Special case *)
714 dl[opc_invokestatic] := 0; (* Special case *)
715 dl[opc_invokeinterface] := 0; (* Special case *)
716 dl[opc_xxxunusedxxx] := 0;
717 dl[opc_new] := 1;
718 dl[opc_newarray] := 0;
719 dl[opc_anewarray] := 0;
720 dl[opc_arraylength] := 0;
721 dl[opc_athrow] := -1; (* don't care *)
722 dl[opc_checkcast] := 0;
723 dl[opc_instanceof] := 0;
724 dl[opc_monitorenter] := -1;
725 dl[opc_monitorexit] := -1;
726 dl[opc_wide] := 0;
727 dl[opc_multianewarray] := 0; (* Special case (1-dim#) *)
728 dl[opc_ifnull] := -1;
729 dl[opc_ifnonnull] := -1;
730 dl[opc_goto_w] := 0;
731 dl[opc_jsr_w] := 1;
732 dl[opc_breakpoint] := 0;
733 END JVMcodes.
734 (* ============================================================ *)