J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 1998 Sun Microsystems, Inc. All Rights Reserved. |
| 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| 4 | * |
| 5 | * This code is free software; you can redistribute it and/or modify it |
| 6 | * under the terms of the GNU General Public License version 2 only, as |
| 7 | * published by the Free Software Foundation. Sun designates this |
| 8 | * particular file as subject to the "Classpath" exception as provided |
| 9 | * by Sun in the LICENSE file that accompanied this code. |
| 10 | * |
| 11 | * This code is distributed in the hope that it will be useful, but WITHOUT |
| 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 14 | * version 2 for more details (a copy is included in the LICENSE file that |
| 15 | * accompanied this code). |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License version |
| 18 | * 2 along with this work; if not, write to the Free Software Foundation, |
| 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 | * |
| 21 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
| 22 | * CA 95054 USA or visit www.sun.com if you need additional information or |
| 23 | * have any questions. |
| 24 | */ |
| 25 | |
| 26 | char * const opcode_in_out[][2] = { |
| 27 | {"", ""}, /* nop */ |
| 28 | {"", "A"}, /* aconst_null */ |
| 29 | {"", "I"}, /* iconst_m1 */ |
| 30 | {"", "I"}, /* iconst_0 */ |
| 31 | {"", "I"}, /* iconst_1 */ |
| 32 | {"", "I"}, /* iconst_2 */ |
| 33 | {"", "I"}, /* iconst_3 */ |
| 34 | {"", "I"}, /* iconst_4 */ |
| 35 | {"", "I"}, /* iconst_5 */ |
| 36 | {"", "L"}, /* lconst_0 */ |
| 37 | {"", "L"}, /* lconst_1 */ |
| 38 | {"", "F"}, /* fconst_0 */ |
| 39 | {"", "F"}, /* fconst_1 */ |
| 40 | {"", "F"}, /* fconst_2 */ |
| 41 | {"", "D"}, /* dconst_0 */ |
| 42 | {"", "D"}, /* dconst_1 */ |
| 43 | {"", "I"}, /* bipush */ |
| 44 | {"", "I"}, /* sipush */ |
| 45 | {"", "?"}, /* ldc */ |
| 46 | {"", "?"}, /* ldc_w */ |
| 47 | {"", "?"}, /* ldc2_w */ |
| 48 | {"", "I"}, /* iload */ |
| 49 | {"", "L"}, /* lload */ |
| 50 | {"", "F"}, /* fload */ |
| 51 | {"", "D"}, /* dload */ |
| 52 | {"", "A"}, /* aload */ |
| 53 | {"", "I"}, /* iload_0 */ |
| 54 | {"", "I"}, /* iload_1 */ |
| 55 | {"", "I"}, /* iload_2 */ |
| 56 | {"", "I"}, /* iload_3 */ |
| 57 | {"", "L"}, /* lload_0 */ |
| 58 | {"", "L"}, /* lload_1 */ |
| 59 | {"", "L"}, /* lload_2 */ |
| 60 | {"", "L"}, /* lload_3 */ |
| 61 | {"", "F"}, /* fload_0 */ |
| 62 | {"", "F"}, /* fload_1 */ |
| 63 | {"", "F"}, /* fload_2 */ |
| 64 | {"", "F"}, /* fload_3 */ |
| 65 | {"", "D"}, /* dload_0 */ |
| 66 | {"", "D"}, /* dload_1 */ |
| 67 | {"", "D"}, /* dload_2 */ |
| 68 | {"", "D"}, /* dload_3 */ |
| 69 | {"", "A"}, /* aload_0 */ |
| 70 | {"", "A"}, /* aload_1 */ |
| 71 | {"", "A"}, /* aload_2 */ |
| 72 | {"", "A"}, /* aload_3 */ |
| 73 | {"[I]I", "I"}, /* iaload */ |
| 74 | {"[L]I", "L"}, /* laload */ |
| 75 | {"[F]I", "F"}, /* faload */ |
| 76 | {"[D]I", "D"}, /* daload */ |
| 77 | {"[A]I", "A"}, /* aaload */ |
| 78 | {"[B]I", "I"}, /* baload */ |
| 79 | {"[C]I", "I"}, /* caload */ |
| 80 | {"[S]I", "I"}, /* saload */ |
| 81 | {"I", ""}, /* istore */ |
| 82 | {"L", ""}, /* lstore */ |
| 83 | {"F", ""}, /* fstore */ |
| 84 | {"D", ""}, /* dstore */ |
| 85 | {"A", ""}, /* astore */ |
| 86 | {"I", ""}, /* istore_0 */ |
| 87 | {"I", ""}, /* istore_1 */ |
| 88 | {"I", ""}, /* istore_2 */ |
| 89 | {"I", ""}, /* istore_3 */ |
| 90 | {"L", ""}, /* lstore_0 */ |
| 91 | {"L", ""}, /* lstore_1 */ |
| 92 | {"L", ""}, /* lstore_2 */ |
| 93 | {"L", ""}, /* lstore_3 */ |
| 94 | {"F", ""}, /* fstore_0 */ |
| 95 | {"F", ""}, /* fstore_1 */ |
| 96 | {"F", ""}, /* fstore_2 */ |
| 97 | {"F", ""}, /* fstore_3 */ |
| 98 | {"D", ""}, /* dstore_0 */ |
| 99 | {"D", ""}, /* dstore_1 */ |
| 100 | {"D", ""}, /* dstore_2 */ |
| 101 | {"D", ""}, /* dstore_3 */ |
| 102 | {"A", ""}, /* astore_0 */ |
| 103 | {"A", ""}, /* astore_1 */ |
| 104 | {"A", ""}, /* astore_2 */ |
| 105 | {"A", ""}, /* astore_3 */ |
| 106 | {"[I]II", ""}, /* iastore */ |
| 107 | {"[L]IL", ""}, /* lastore */ |
| 108 | {"[F]IF", ""}, /* fastore */ |
| 109 | {"[D]ID", ""}, /* dastore */ |
| 110 | {"[A]IA", ""}, /* aastore */ |
| 111 | {"[B]II", ""}, /* bastore */ |
| 112 | {"[C]II", ""}, /* castore */ |
| 113 | {"[S]II", ""}, /* sastore */ |
| 114 | {"1", ""}, /* pop */ |
| 115 | {"2+1", ""}, /* pop2 */ |
| 116 | {"1", "11"}, /* dup */ |
| 117 | {"21", "121"}, /* dup_x1 */ |
| 118 | {"3+21", "1321"}, /* dup_x2 */ |
| 119 | {"2+1", "2121"}, /* dup2 */ |
| 120 | {"32+1", "21321"}, /* dup2_x1 */ |
| 121 | {"4+32+1", "214321"}, /* dup2_x2 */ |
| 122 | {"21", "12"}, /* swap */ |
| 123 | {"II", "I"}, /* iadd */ |
| 124 | {"LL", "L"}, /* ladd */ |
| 125 | {"FF", "F"}, /* fadd */ |
| 126 | {"DD", "D"}, /* dadd */ |
| 127 | {"II", "I"}, /* isub */ |
| 128 | {"LL", "L"}, /* lsub */ |
| 129 | {"FF", "F"}, /* fsub */ |
| 130 | {"DD", "D"}, /* dsub */ |
| 131 | {"II", "I"}, /* imul */ |
| 132 | {"LL", "L"}, /* lmul */ |
| 133 | {"FF", "F"}, /* fmul */ |
| 134 | {"DD", "D"}, /* dmul */ |
| 135 | {"II", "I"}, /* idiv */ |
| 136 | {"LL", "L"}, /* ldiv */ |
| 137 | {"FF", "F"}, /* fdiv */ |
| 138 | {"DD", "D"}, /* ddiv */ |
| 139 | {"II", "I"}, /* irem */ |
| 140 | {"LL", "L"}, /* lrem */ |
| 141 | {"FF", "F"}, /* frem */ |
| 142 | {"DD", "D"}, /* drem */ |
| 143 | {"I", "I"}, /* ineg */ |
| 144 | {"L", "L"}, /* lneg */ |
| 145 | {"F", "F"}, /* fneg */ |
| 146 | {"D", "D"}, /* dneg */ |
| 147 | {"II", "I"}, /* ishl */ |
| 148 | {"LI", "L"}, /* lshl */ |
| 149 | {"II", "I"}, /* ishr */ |
| 150 | {"LI", "L"}, /* lshr */ |
| 151 | {"II", "I"}, /* iushr */ |
| 152 | {"LI", "L"}, /* lushr */ |
| 153 | {"II", "I"}, /* iand */ |
| 154 | {"LL", "L"}, /* land */ |
| 155 | {"II", "I"}, /* ior */ |
| 156 | {"LL", "L"}, /* lor */ |
| 157 | {"II", "I"}, /* ixor */ |
| 158 | {"LL", "L"}, /* lxor */ |
| 159 | {"", ""}, /* iinc */ |
| 160 | {"I", "L"}, /* i2l */ |
| 161 | {"I", "F"}, /* i2f */ |
| 162 | {"I", "D"}, /* i2d */ |
| 163 | {"L", "I"}, /* l2i */ |
| 164 | {"L", "F"}, /* l2f */ |
| 165 | {"L", "D"}, /* l2d */ |
| 166 | {"F", "I"}, /* f2i */ |
| 167 | {"F", "L"}, /* f2l */ |
| 168 | {"F", "D"}, /* f2d */ |
| 169 | {"D", "I"}, /* d2i */ |
| 170 | {"D", "L"}, /* d2l */ |
| 171 | {"D", "F"}, /* d2f */ |
| 172 | {"I", "I"}, /* i2b */ |
| 173 | {"I", "I"}, /* i2c */ |
| 174 | {"I", "I"}, /* i2s */ |
| 175 | {"LL", "I"}, /* lcmp */ |
| 176 | {"FF", "I"}, /* fcmpl */ |
| 177 | {"FF", "I"}, /* fcmpg */ |
| 178 | {"DD", "I"}, /* dcmpl */ |
| 179 | {"DD", "I"}, /* dcmpg */ |
| 180 | {"I", ""}, /* ifeq */ |
| 181 | {"I", ""}, /* ifne */ |
| 182 | {"I", ""}, /* iflt */ |
| 183 | {"I", ""}, /* ifge */ |
| 184 | {"I", ""}, /* ifgt */ |
| 185 | {"I", ""}, /* ifle */ |
| 186 | {"II", ""}, /* if_icmpeq */ |
| 187 | {"II", ""}, /* if_icmpne */ |
| 188 | {"II", ""}, /* if_icmplt */ |
| 189 | {"II", ""}, /* if_icmpge */ |
| 190 | {"II", ""}, /* if_icmpgt */ |
| 191 | {"II", ""}, /* if_icmple */ |
| 192 | {"AA", ""}, /* if_acmpeq */ |
| 193 | {"AA", ""}, /* if_acmpne */ |
| 194 | {"", ""}, /* goto */ |
| 195 | {"", "R"}, /* jsr */ |
| 196 | {"", ""}, /* ret */ |
| 197 | {"I", ""}, /* tableswitch */ |
| 198 | {"I", ""}, /* lookupswitch */ |
| 199 | {"I", ""}, /* ireturn */ |
| 200 | {"L", ""}, /* lreturn */ |
| 201 | {"F", ""}, /* freturn */ |
| 202 | {"D", ""}, /* dreturn */ |
| 203 | {"A", ""}, /* areturn */ |
| 204 | {"", ""}, /* return */ |
| 205 | {"", "?"}, /* getstatic */ |
| 206 | {"?", ""}, /* putstatic */ |
| 207 | {"A", "?"}, /* getfield */ |
| 208 | {"?", ""}, /* putfield */ |
| 209 | {"?", "?"}, /* invokevirtual */ |
| 210 | {"?", "?"}, /* invokespecial */ |
| 211 | {"?", "?"}, /* invokestatic */ |
| 212 | {"?", "?"}, /* invokeinterface */ |
| 213 | {"?", "?"}, /* xxxunusedxxx */ |
| 214 | {"", "A"}, /* new */ |
| 215 | {"I", "A"}, /* newarray */ |
| 216 | {"I", "A"}, /* anewarray */ |
| 217 | {"[?]", "I"}, /* arraylength */ |
| 218 | {"O", ""}, /* athrow */ |
| 219 | {"A", "A"}, /* checkcast */ |
| 220 | {"A", "I"}, /* instanceof */ |
| 221 | {"A", ""}, /* monitorenter */ |
| 222 | {"A", ""}, /* monitorexit */ |
| 223 | {"", ""}, /* wide */ |
| 224 | {"?", "A"}, /* multianewarray */ |
| 225 | {"A", ""}, /* ifnull */ |
| 226 | {"A", ""}, /* ifnonnull */ |
| 227 | {"", ""}, /* goto_w */ |
| 228 | {"", "R"}, /* jsr_w */ |
| 229 | {"", ""}, /* breakpoint */ |
| 230 | {"", "?"}, /* ldc_quick */ |
| 231 | {"", "?"}, /* ldc_w_quick */ |
| 232 | {"", "?"}, /* ldc2_w_quick */ |
| 233 | {"A", "?"}, /* getfield_quick */ |
| 234 | {"?", ""}, /* putfield_quick */ |
| 235 | {"A", "?"}, /* getfield2_quick */ |
| 236 | {"?", ""}, /* putfield2_quick */ |
| 237 | {"", "?"}, /* getstatic_quick */ |
| 238 | {"?", ""}, /* putstatic_quick */ |
| 239 | {"", "?"}, /* getstatic2_quick */ |
| 240 | {"?", "_"}, /* putstatic2_quick */ |
| 241 | {"?", "?"}, /* invokevirtual_quick */ |
| 242 | {"?", "?"}, /* invokenonvirtual_quick */ |
| 243 | {"?", "?"}, /* invokesuper_quick */ |
| 244 | {"?", "?"}, /* invokestatic_quick */ |
| 245 | {"?", "?"}, /* invokeinterface_quick */ |
| 246 | {"?", "?"}, /* invokevirtualobject_quick */ |
| 247 | {"?", "?"}, /* invokeignored_quick */ |
| 248 | {"", "A"}, /* new_quick */ |
| 249 | {"I", "A"}, /* anewarray_quick */ |
| 250 | {"?", "A"}, /* multianewarray_quick */ |
| 251 | {"A", "A"}, /* checkcast_quick */ |
| 252 | {"A", "I"}, /* instanceof_quick */ |
| 253 | {"?", "?"}, /* invokevirtual_quick_w */ |
| 254 | {"A", "?"}, /* getfield_quick_w */ |
| 255 | {"?", ""}, /* putfield_quick_w */ |
| 256 | {"A", ""}, /* nonnull_quick */ |
| 257 | }; |