Stuart McCulloch | 39cc9ac | 2012-07-16 13:43:38 +0000 | [diff] [blame] | 1 | package aQute.bnd.osgi; |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 2 | |
| 3 | public class OpCodes { |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 4 | final static short nop = 0x00; // [No change] |
| 5 | // performs |
| 6 | // no |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 7 | // operation |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 8 | final static short aconst_null = 0x01; // ? null pushes a |
| 9 | // null |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 10 | // reference onto the stack |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 11 | final static short iconst_m1 = 0x02; // ? -1 loads the |
| 12 | // int |
| 13 | // value -1 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 14 | // onto the stack |
| 15 | final static short iconst_0 = 0x03; // ? 0 loads the int |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 16 | // value 0 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 17 | // onto the stack |
| 18 | final static short iconst_1 = 0x04; // ? 1 loads the int |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 19 | // value 1 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 20 | // onto the stack |
| 21 | final static short iconst_2 = 0x05; // ? 2 loads the int |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 22 | // value 2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 23 | // onto the stack |
| 24 | final static short iconst_3 = 0x06; // ? 3 loads the int |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 25 | // value 3 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 26 | // onto the stack |
| 27 | final static short iconst_4 = 0x07; // ? 4 loads the int |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 28 | // value 4 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 29 | // onto the stack |
| 30 | final static short iconst_5 = 0x08; // ? 5 loads the int |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 31 | // value 5 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 32 | // onto the stack |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 33 | final static short lconst_0 = 0x09; // ? 0L pushes the |
| 34 | // long |
| 35 | // 0 onto |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 36 | // the stack |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 37 | final static short bipush = 0x10; // byte ? value |
| 38 | // pushes a |
| 39 | // byte |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 40 | // onto the stack as an integer |
| 41 | // value |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 42 | final static short sipush = 0x11; // byte1, byte2 ? |
| 43 | // value |
| 44 | // pushes a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 45 | // signed integer (byte1 << 8 + |
| 46 | // byte2) onto the stack |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 47 | final static short ldc = 0x12; // index ? value |
| 48 | // pushes |
| 49 | // a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 50 | // constant #index from a |
| 51 | // constant pool (String, int, |
| 52 | // float or class type) onto the |
| 53 | // stack |
| 54 | final static short ldc_w = 0x13; // indexbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 55 | // indexbyte2 ? |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 56 | // value pushes a constant |
| 57 | // #index from a constant pool |
| 58 | // (String, int, float or class |
| 59 | // type) onto the stack (wide |
| 60 | // index is constructed as |
| 61 | // indexbyte1 << 8 + indexbyte2) |
| 62 | final static short ldc2_w = 0x14; // indexbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 63 | // indexbyte2 ? |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 64 | // value pushes a constant |
| 65 | // #index from a constant pool |
| 66 | // (double or long) onto the |
| 67 | // stack (wide index is |
| 68 | // constructed as indexbyte1 << |
| 69 | // 8 + indexbyte2) |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 70 | final static short iload = 0x15; // index ? value |
| 71 | // loads |
| 72 | // an int |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 73 | // value from a variable #index |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 74 | final static short lload = 0x16; // index ? value |
| 75 | // load a |
| 76 | // long |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 77 | // value from a local variable |
| 78 | // #index |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 79 | final static short fload = 0x17; // index ? value |
| 80 | // loads a |
| 81 | // float |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 82 | // value from a local variable |
| 83 | // #index |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 84 | final static short dload = 0x18; // index ? value |
| 85 | // loads a |
| 86 | // double |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 87 | // value from a local variable |
| 88 | // #index |
| 89 | final static short aload = 0x19; // index ? objectref |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 90 | // loads a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 91 | // reference onto the stack from |
| 92 | // a local variable #index |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 93 | final static short lload_2 = 0x20; // ? value load a |
| 94 | // long |
| 95 | // value |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 96 | // from a local variable 2 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 97 | final static short lload_3 = 0x21; // ? value load a |
| 98 | // long |
| 99 | // value |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 100 | // from a local variable 3 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 101 | final static short fload_0 = 0x22; // ? value loads a |
| 102 | // float |
| 103 | // value |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 104 | // from local variable 0 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 105 | final static short fload_1 = 0x23; // ? value loads a |
| 106 | // float |
| 107 | // value |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 108 | // from local variable 1 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 109 | final static short fload_2 = 0x24; // ? value loads a |
| 110 | // float |
| 111 | // value |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 112 | // from local variable 2 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 113 | final static short fload_3 = 0x25; // ? value loads a |
| 114 | // float |
| 115 | // value |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 116 | // from local variable 3 |
| 117 | final static short dload_0 = 0x26; // ? value loads a |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 118 | // double from |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 119 | // local variable 0 |
| 120 | final static short dload_1 = 0x27; // ? value loads a |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 121 | // double from |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 122 | // local variable 1 |
| 123 | final static short dload_2 = 0x28; // ? value loads a |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 124 | // double from |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 125 | // local variable 2 |
| 126 | final static short dload_3 = 0x29; // ? value loads a |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 127 | // double from |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 128 | // local variable 3 |
| 129 | final static short faload = 0x30; // arrayref, index ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 130 | // value loads |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 131 | // a float from an array |
| 132 | final static short daload = 0x31; // arrayref, index ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 133 | // value loads |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 134 | // a double from an array |
| 135 | final static short aaload = 0x32; // arrayref, index ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 136 | // value loads |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 137 | // onto the stack a reference |
| 138 | // from an array |
| 139 | final static short baload = 0x33; // arrayref, index ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 140 | // value loads |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 141 | // a byte or Boolean value from |
| 142 | // an array |
| 143 | final static short caload = 0x34; // arrayref, index ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 144 | // value loads |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 145 | // a char from an array |
| 146 | final static short saload = 0x35; // arrayref, index ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 147 | // value load |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 148 | // short from array |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 149 | final static short istore = 0x36; // index value ? |
| 150 | // store |
| 151 | // int value |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 152 | // into variable #index |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 153 | final static short lstore = 0x37; // index value ? |
| 154 | // store a |
| 155 | // long |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 156 | // value in a local variable |
| 157 | // #index |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 158 | final static short fstore = 0x38; // index value ? |
| 159 | // stores |
| 160 | // a float |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 161 | // value into a local variable |
| 162 | // #index |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 163 | final static short dstore = 0x39; // index value ? |
| 164 | // stores |
| 165 | // a double |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 166 | // value into a local variable |
| 167 | // #index |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 168 | final static short lstore_1 = 0x40; // value ? store a |
| 169 | // long |
| 170 | // value in |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 171 | // a local variable 1 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 172 | final static short lstore_2 = 0x41; // value ? store a |
| 173 | // long |
| 174 | // value in |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 175 | // a local variable 2 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 176 | final static short lstore_3 = 0x42; // value ? store a |
| 177 | // long |
| 178 | // value in |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 179 | // a local variable 3 |
| 180 | final static short fstore_0 = 0x43; // value ? stores a |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 181 | // float value |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 182 | // into local variable 0 |
| 183 | final static short fstore_1 = 0x44; // value ? stores a |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 184 | // float value |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 185 | // into local variable 1 |
| 186 | final static short fstore_2 = 0x45; // value ? stores a |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 187 | // float value |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 188 | // into local variable 2 |
| 189 | final static short fstore_3 = 0x46; // value ? stores a |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 190 | // float value |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 191 | // into local variable 3 |
| 192 | final static short dstore_0 = 0x47; // value ? stores a |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 193 | // double into |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 194 | // local variable 0 |
| 195 | final static short dstore_1 = 0x48; // value ? stores a |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 196 | // double into |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 197 | // local variable 1 |
| 198 | final static short dstore_2 = 0x49; // value ? stores a |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 199 | // double into |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 200 | // local variable 2 |
| 201 | final static short lastore = 0x50; // arrayref, index, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 202 | // value ? |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 203 | // store a long to an array |
| 204 | final static short fastore = 0x51; // arreyref, index, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 205 | // value ? |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 206 | // stores a float in an array |
| 207 | final static short dastore = 0x52; // arrayref, index, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 208 | // value ? |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 209 | // stores a double into an array |
| 210 | final static short aastore = 0x53; // arrayref, index, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 211 | // value ? |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 212 | // stores into a reference to an |
| 213 | // array |
| 214 | final static short bastore = 0x54; // arrayref, index, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 215 | // value ? |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 216 | // stores a byte or Boolean |
| 217 | // value into an array |
| 218 | final static short castore = 0x55; // arrayref, index, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 219 | // value ? |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 220 | // stores a char into an array |
| 221 | final static short sastore = 0x56; // arrayref, index, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 222 | // value ? |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 223 | // store short to array |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 224 | final static short pop = 0x57; // value ? discards |
| 225 | // the |
| 226 | // top |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 227 | // value on the stack |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 228 | final static short pop2 = 0x58; // {value2, value1} |
| 229 | // ? |
| 230 | // discards |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 231 | // the top two values on the |
| 232 | // stack (or one value, if it is |
| 233 | // a double or long) |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 234 | final static short dup = 0x59; // value ? value, |
| 235 | // value |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 236 | // duplicates the value on top |
| 237 | // of the stack |
| 238 | final static short iadd = 0x60; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 239 | // result adds |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 240 | // two ints together |
| 241 | final static short ladd = 0x61; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 242 | // result add |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 243 | // two longs |
| 244 | final static short fadd = 0x62; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 245 | // result adds |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 246 | // two floats |
| 247 | final static short dadd = 0x63; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 248 | // result adds |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 249 | // two doubles |
| 250 | final static short isub = 0x64; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 251 | // result int |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 252 | // subtract |
| 253 | final static short lsub = 0x65; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 254 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 255 | // subtract two longs |
| 256 | final static short fsub = 0x66; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 257 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 258 | // subtracts two floats |
| 259 | final static short dsub = 0x67; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 260 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 261 | // subtracts a double from |
| 262 | // another |
| 263 | final static short imul = 0x68; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 264 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 265 | // multiply two integers |
| 266 | final static short lmul = 0x69; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 267 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 268 | // multiplies two longs |
| 269 | final static short irem = 0x70; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 270 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 271 | // logical int remainder |
| 272 | final static short lrem = 0x71; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 273 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 274 | // remainder of division of two |
| 275 | // longs |
| 276 | final static short frem = 0x72; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 277 | // result gets |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 278 | // the remainder from a division |
| 279 | // between two floats |
| 280 | final static short drem = 0x73; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 281 | // result gets |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 282 | // the remainder from a division |
| 283 | // between two doubles |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 284 | final static short ineg = 0x74; // value ? result |
| 285 | // negate |
| 286 | // int |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 287 | final static short lneg = 0x75; // value ? result |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 288 | // negates a long |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 289 | final static short fneg = 0x76; // value ? result |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 290 | // negates a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 291 | // float |
| 292 | final static short dneg = 0x77; // value ? result |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 293 | // negates a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 294 | // double |
| 295 | final static short ishl = 0x78; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 296 | // result int |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 297 | // shift left |
| 298 | final static short lshl = 0x79; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 299 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 300 | // bitwise shift left of a long |
| 301 | // value1 by value2 positions |
| 302 | final static short ior = 0x80; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 303 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 304 | // logical int or |
| 305 | final static short lor = 0x81; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 306 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 307 | // bitwise or of two longs |
| 308 | final static short ixor = 0x82; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 309 | // result int |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 310 | // xor |
| 311 | final static short lxor = 0x83; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 312 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 313 | // bitwise exclusive or of two |
| 314 | // longs |
| 315 | final static short iinc = 0x84; // index, const [No |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 316 | // change] |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 317 | // increment local variable |
| 318 | // #index by signed byte const |
| 319 | final static short i2l = 0x85; // value ? result |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 320 | // converts an |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 321 | // int into a long |
| 322 | final static short i2f = 0x86; // value ? result |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 323 | // converts an |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 324 | // int into a float |
| 325 | final static short i2d = 0x87; // value ? result |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 326 | // converts an |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 327 | // int into a double |
| 328 | final static short l2i = 0x88; // value ? result |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 329 | // converts a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 330 | // long to an int |
| 331 | final static short l2f = 0x89; // value ? result |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 332 | // converts a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 333 | // long to a float |
| 334 | final static short d2f = 0x90; // value ? result |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 335 | // converts a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 336 | // double to a float |
| 337 | final static short i2b = 0x91; // value ? result |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 338 | // converts an |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 339 | // int into a byte |
| 340 | final static short i2c = 0x92; // value ? result |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 341 | // converts an |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 342 | // int into a character |
| 343 | final static short i2s = 0x93; // value ? result |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 344 | // converts an |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 345 | // int into a short |
| 346 | final static short lcmp = 0x94; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 347 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 348 | // compares two longs values |
| 349 | final static short fcmpl = 0x95; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 350 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 351 | // compares two floats |
| 352 | final static short fcmpg = 0x96; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 353 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 354 | // compares two floats |
| 355 | final static short dcmpl = 0x97; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 356 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 357 | // compares two doubles |
| 358 | final static short dcmpg = 0x98; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 359 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 360 | // compares two doubles |
| 361 | final static short ifeq = 0x99; // branchbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 362 | // branchbyte2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 363 | // value ? if value is 0, branch |
| 364 | // to instruction at |
| 365 | // branchoffset (signed short |
| 366 | // constructed from unsigned |
| 367 | // bytes branchbyte1 << 8 + |
| 368 | // branchbyte2) |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 369 | final static short lconst_1 = 0x0a; // ? 1L pushes the |
| 370 | // long |
| 371 | // 1 onto |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 372 | // the stack |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 373 | final static short fconst_0 = 0x0b; // ? 0.0f pushes |
| 374 | // 0.0f on |
| 375 | // the |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 376 | // stack |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 377 | final static short fconst_1 = 0x0c; // ? 1.0f pushes |
| 378 | // 1.0f on |
| 379 | // the |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 380 | // stack |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 381 | final static short fconst_2 = 0x0d; // ? 2.0f pushes |
| 382 | // 2.0f on |
| 383 | // the |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 384 | // stack |
| 385 | final static short dconst_0 = 0x0e; // ? 0.0 pushes the |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 386 | // constant 0.0 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 387 | // onto the stack |
| 388 | final static short dconst_1 = 0x0f; // ? 1.0 pushes the |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 389 | // constant 1.0 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 390 | // onto the stack |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 391 | final static short iload_0 = 0x1a; // ? value loads an |
| 392 | // int |
| 393 | // value |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 394 | // from variable 0 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 395 | final static short iload_1 = 0x1b; // ? value loads an |
| 396 | // int |
| 397 | // value |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 398 | // from variable 1 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 399 | final static short iload_2 = 0x1c; // ? value loads an |
| 400 | // int |
| 401 | // value |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 402 | // from variable 2 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 403 | final static short iload_3 = 0x1d; // ? value loads an |
| 404 | // int |
| 405 | // value |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 406 | // from variable 3 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 407 | final static short lload_0 = 0x1e; // ? value load a |
| 408 | // long |
| 409 | // value |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 410 | // from a local variable 0 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 411 | final static short lload_1 = 0x1f; // ? value load a |
| 412 | // long |
| 413 | // value |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 414 | // from a local variable 1 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 415 | final static short aload_0 = 0x2a; // ? objectref loads |
| 416 | // a |
| 417 | // reference |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 418 | // onto the stack from local |
| 419 | // variable 0 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 420 | final static short aload_1 = 0x2b; // ? objectref loads |
| 421 | // a |
| 422 | // reference |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 423 | // onto the stack from local |
| 424 | // variable 1 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 425 | final static short aload_2 = 0x2c; // ? objectref loads |
| 426 | // a |
| 427 | // reference |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 428 | // onto the stack from local |
| 429 | // variable 2 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 430 | final static short aload_3 = 0x2d; // ? objectref loads |
| 431 | // a |
| 432 | // reference |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 433 | // onto the stack from local |
| 434 | // variable 3 |
| 435 | final static short iaload = 0x2e; // arrayref, index ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 436 | // value loads |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 437 | // an int from an array |
| 438 | final static short laload = 0x2f; // arrayref, index ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 439 | // value load |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 440 | // a long from an array |
| 441 | final static short astore = 0x3a; // index objectref ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 442 | // stores a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 443 | // reference into a local |
| 444 | // variable #index |
| 445 | final static short istore_0 = 0x3b; // value ? store int |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 446 | // value into |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 447 | // variable 0 |
| 448 | final static short istore_1 = 0x3c; // value ? store int |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 449 | // value into |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 450 | // variable 1 |
| 451 | final static short istore_2 = 0x3d; // value ? store int |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 452 | // value into |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 453 | // variable 2 |
| 454 | final static short istore_3 = 0x3e; // value ? store int |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 455 | // value into |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 456 | // variable 3 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 457 | final static short lstore_0 = 0x3f; // value ? store a |
| 458 | // long |
| 459 | // value in |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 460 | // a local variable 0 |
| 461 | final static short dstore_3 = 0x4a; // value ? stores a |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 462 | // double into |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 463 | // local variable 3 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 464 | final static short astore_0 = 0x4b; // objectref ? |
| 465 | // stores a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 466 | // reference into local variable |
| 467 | // 0 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 468 | final static short astore_1 = 0x4c; // objectref ? |
| 469 | // stores a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 470 | // reference into local variable |
| 471 | // 1 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 472 | final static short astore_2 = 0x4d; // objectref ? |
| 473 | // stores a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 474 | // reference into local variable |
| 475 | // 2 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 476 | final static short astore_3 = 0x4e; // objectref ? |
| 477 | // stores a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 478 | // reference into local variable |
| 479 | // 3 |
| 480 | final static short iastore = 0x4f; // arrayref, index, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 481 | // value ? |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 482 | // stores an int into an array |
| 483 | final static short dup_x1 = 0x5a; // value2, value1 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 484 | // value1, |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 485 | // value2, value1 inserts a copy |
| 486 | // of the top value into the |
| 487 | // stack two values from the top |
| 488 | final static short dup_x2 = 0x5b; // value3, value2, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 489 | // value1 ? |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 490 | // value1, value3, value2, |
| 491 | // value1 inserts a copy of the |
| 492 | // top value into the stack two |
| 493 | // (if value2 is double or long |
| 494 | // it takes up the entry of |
| 495 | // value3, too) or three values |
| 496 | // (if value2 is neither double |
| 497 | // nor long) from the top |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 498 | final static short dup2 = 0x5c; // {value2, value1} |
| 499 | // ? |
| 500 | // {value2, |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 501 | // value1}, {value2, value1} |
| 502 | // duplicate top two stack words |
| 503 | // (two values, if value1 is not |
| 504 | // double nor long; a single |
| 505 | // value, if value1 is double or |
| 506 | // long) |
| 507 | final static short dup2_x1 = 0x5d; // value3, {value2, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 508 | // value1} ? |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 509 | // {value2, value1}, value3, |
| 510 | // {value2, value1} duplicate |
| 511 | // two words and insert beneath |
| 512 | // third word (see explanation |
| 513 | // above) |
| 514 | final static short dup2_x2 = 0x5e; // {value4, value3}, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 515 | // {value2, |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 516 | // value1} ? {value2, value1}, |
| 517 | // {value4, value3}, {value2, |
| 518 | // value1} duplicate two words |
| 519 | // and insert beneath fourth |
| 520 | // word |
| 521 | final static short swap = 0x5f; // value2, value1 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 522 | // value1, |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 523 | // value2 swaps two top words on |
| 524 | // the stack (note that value1 |
| 525 | // and value2 must not be double |
| 526 | // or long) |
| 527 | final static short fmul = 0x6a; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 528 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 529 | // multiplies two floats |
| 530 | final static short dmul = 0x6b; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 531 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 532 | // multiplies two doubles |
| 533 | final static short idiv = 0x6c; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 534 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 535 | // divides two integers |
| 536 | final static short ldiv = 0x6d; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 537 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 538 | // divide two longs |
| 539 | final static short fdiv = 0x6e; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 540 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 541 | // divides two floats |
| 542 | final static short ddiv = 0x6f; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 543 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 544 | // divides two doubles |
| 545 | final static short ishr = 0x7a; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 546 | // result int |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 547 | // shift right |
| 548 | final static short lshr = 0x7b; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 549 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 550 | // bitwise shift right of a long |
| 551 | // value1 by value2 positions |
| 552 | final static short iushr = 0x7c; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 553 | // result int |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 554 | // shift right |
| 555 | final static short lushr = 0x7d; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 556 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 557 | // bitwise shift right of a long |
| 558 | // value1 by value2 positions, |
| 559 | // unsigned |
| 560 | final static short iand = 0x7e; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 561 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 562 | // performs a logical and on two |
| 563 | // integers |
| 564 | final static short land = 0x7f; // value1, value2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 565 | // result |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 566 | // bitwise and of two longs |
| 567 | final static short l2d = 0x8a; // value ? result |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 568 | // converts a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 569 | // long to a double |
| 570 | final static short f2i = 0x8b; // value ? result |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 571 | // converts a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 572 | // float to an int |
| 573 | final static short f2l = 0x8c; // value ? result |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 574 | // converts a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 575 | // float to a long |
| 576 | final static short f2d = 0x8d; // value ? result |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 577 | // converts a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 578 | // float to a double |
| 579 | final static short d2i = 0x8e; // value ? result |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 580 | // converts a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 581 | // double to an int |
| 582 | final static short d2l = 0x8f; // value ? result |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 583 | // converts a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 584 | // double to a long |
| 585 | final static short ifne = 0x9a; // branchbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 586 | // branchbyte2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 587 | // value ? if value is not 0, |
| 588 | // branch to instruction at |
| 589 | // branchoffset (signed short |
| 590 | // constructed from unsigned |
| 591 | // bytes branchbyte1 << 8 + |
| 592 | // branchbyte2) |
| 593 | final static short iflt = 0x9b; // branchbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 594 | // branchbyte2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 595 | // value ? if value is less than |
| 596 | // 0, branch to instruction at |
| 597 | // branchoffset (signed short |
| 598 | // constructed from unsigned |
| 599 | // bytes branchbyte1 << 8 + |
| 600 | // branchbyte2) |
| 601 | final static short ifge = 0x9c; // branchbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 602 | // branchbyte2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 603 | // value ? if value is greater |
| 604 | // than or equal to 0, branch to |
| 605 | // instruction at branchoffset |
| 606 | // (signed short constructed |
| 607 | // from unsigned bytes |
| 608 | // branchbyte1 << 8 + |
| 609 | // branchbyte2) |
| 610 | final static short ifgt = 0x9d; // branchbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 611 | // branchbyte2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 612 | // value ? if value is greater |
| 613 | // than 0, branch to instruction |
| 614 | // at branchoffset (signed short |
| 615 | // constructed from unsigned |
| 616 | // bytes branchbyte1 << 8 + |
| 617 | // branchbyte2) |
| 618 | final static short ifle = 0x9e; // branchbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 619 | // branchbyte2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 620 | // value ? if value is less than |
| 621 | // or equal to 0, branch to |
| 622 | // instruction at branchoffset |
| 623 | // (signed short constructed |
| 624 | // from unsigned bytes |
| 625 | // branchbyte1 << 8 + |
| 626 | // branchbyte2) |
| 627 | final static short if_icmpeq = 0x9f; // branchbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 628 | // branchbyte2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 629 | // value1, value2 ? if ints are |
| 630 | // equal, branch to instruction |
| 631 | // at branchoffset (signed short |
| 632 | // constructed from unsigned |
| 633 | // bytes branchbyte1 << 8 + |
| 634 | // branchbyte2) |
| 635 | final static short if_icmpne = 0xa0; // branchbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 636 | // branchbyte2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 637 | // value1, value2 ? if ints are |
| 638 | // not equal, branch to |
| 639 | // instruction at branchoffset |
| 640 | // (signed short constructed |
| 641 | // from unsigned bytes |
| 642 | // branchbyte1 << 8 + |
| 643 | // branchbyte2) |
| 644 | final static short if_icmplt = 0xa1; // branchbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 645 | // branchbyte2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 646 | // value1, value2 ? if value1 is |
| 647 | // less than value2, branch to |
| 648 | // instruction at branchoffset |
| 649 | // (signed short constructed |
| 650 | // from unsigned bytes |
| 651 | // branchbyte1 << 8 + |
| 652 | // branchbyte2) |
| 653 | final static short if_icmpge = 0xa2; // branchbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 654 | // branchbyte2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 655 | // value1, value2 ? if value1 is |
| 656 | // greater than or equal to |
| 657 | // value2, branch to instruction |
| 658 | // at branchoffset (signed short |
| 659 | // constructed from unsigned |
| 660 | // bytes branchbyte1 << 8 + |
| 661 | // branchbyte2) |
| 662 | final static short if_icmpgt = 0xa3; // branchbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 663 | // branchbyte2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 664 | // value1, value2 ? if value1 is |
| 665 | // greater than value2, branch |
| 666 | // to instruction at |
| 667 | // branchoffset (signed short |
| 668 | // constructed from unsigned |
| 669 | // bytes branchbyte1 << 8 + |
| 670 | // branchbyte2) |
| 671 | final static short if_icmple = 0xa4; // branchbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 672 | // branchbyte2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 673 | // value1, value2 ? if value1 is |
| 674 | // less than or equal to value2, |
| 675 | // branch to instruction at |
| 676 | // branchoffset (signed short |
| 677 | // constructed from unsigned |
| 678 | // bytes branchbyte1 << 8 + |
| 679 | // branchbyte2) |
| 680 | final static short if_acmpeq = 0xa5; // branchbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 681 | // branchbyte2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 682 | // value1, value2 ? if |
| 683 | // references are equal, branch |
| 684 | // to instruction at |
| 685 | // branchoffset (signed short |
| 686 | // constructed from unsigned |
| 687 | // bytes branchbyte1 << 8 + |
| 688 | // branchbyte2) |
| 689 | final static short if_acmpne = 0xa6; // branchbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 690 | // branchbyte2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 691 | // value1, value2 ? if |
| 692 | // references are not equal, |
| 693 | // branch to instruction at |
| 694 | // branchoffset (signed short |
| 695 | // constructed from unsigned |
| 696 | // bytes branchbyte1 << 8 + |
| 697 | // branchbyte2) |
| 698 | final static short goto_ = 0xa7; // branchbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 699 | // branchbyte2 [no |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 700 | // change] goes to another |
| 701 | // instruction at branchoffset |
| 702 | // (signed short constructed |
| 703 | // from unsigned bytes |
| 704 | // branchbyte1 << 8 + |
| 705 | // branchbyte2) |
| 706 | final static short jsr = 0xa8; // branchbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 707 | // branchbyte2 ? |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 708 | // address jump to subroutine at |
| 709 | // branchoffset (signed short |
| 710 | // constructed from unsigned |
| 711 | // bytes branchbyte1 << 8 + |
| 712 | // branchbyte2) and place the |
| 713 | // return address on the stack |
| 714 | final static short ret = 0xa9; // index [No change] |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 715 | // continue |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 716 | // execution from address taken |
| 717 | // from a local variable #index |
| 718 | // (the asymmetry with jsr is |
| 719 | // intentional) |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 720 | final static short tableswitch = 0xaa; // [0-3 bytes |
| 721 | // padding], |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 722 | // defaultbyte1, defaultbyte2, |
| 723 | // defaultbyte3, defaultbyte4, |
| 724 | // lowbyte1, lowbyte2, lowbyte3, |
| 725 | // lowbyte4, highbyte1, |
| 726 | // highbyte2, highbyte3, |
| 727 | // highbyte4, jump offsets... |
| 728 | // index ? continue execution |
| 729 | // from an address in the table |
| 730 | // at offset index |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 731 | final static short lookupswitch = 0xab; // <0-3 bytes |
| 732 | // padding>, |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 733 | // defaultbyte1, defaultbyte2, |
| 734 | // defaultbyte3, defaultbyte4, |
| 735 | // npairs1, npairs2, npairs3, |
| 736 | // npairs4, match-offset |
| 737 | // pairs... key ? a target |
| 738 | // address is looked up from a |
| 739 | // table using a key and |
| 740 | // execution continues from the |
| 741 | // instruction at that address |
| 742 | final static short ireturn = 0xac; // value ? [empty] |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 743 | // returns an |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 744 | // integer from a method |
| 745 | final static short lreturn = 0xad; // value ? [empty] |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 746 | // returns a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 747 | // long value |
| 748 | final static short freturn = 0xae; // value ? [empty] |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 749 | // returns a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 750 | // float |
| 751 | final static short dreturn = 0xaf; // value ? [empty] |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 752 | // returns a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 753 | // double from a method |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 754 | final static short areturn = 0xb0; // objectref ? |
| 755 | // [empty] |
| 756 | // returns a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 757 | // reference from a method |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 758 | final static short return_ = 0xb1; // ? [empty] return |
| 759 | // void |
| 760 | // from |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 761 | // method |
| 762 | final static short getstatic = 0xb2; // index1, index2 ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 763 | // value gets a |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 764 | // static field value of a |
| 765 | // class, where the field is |
| 766 | // identified by field reference |
| 767 | // in the constant pool index |
| 768 | // (index1 << 8 + index2) |
| 769 | final static short putstatic = 0xb3; // indexbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 770 | // indexbyte2 value |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 771 | // ? set static field to value |
| 772 | // in a class, where the field |
| 773 | // is identified by a field |
| 774 | // reference index in constant |
| 775 | // pool (indexbyte1 << 8 + |
| 776 | // indexbyte2) |
| 777 | final static short getfield = 0xb4; // index1, index2 |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 778 | // objectref ? |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 779 | // value gets a field value of |
| 780 | // an object objectref, where |
| 781 | // the field is identified by |
| 782 | // field reference in the |
| 783 | // constant pool index (index1 |
| 784 | // << 8 + index2) |
| 785 | final static short putfield = 0xb5; // indexbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 786 | // indexbyte2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 787 | // objectref, value ? set field |
| 788 | // to value in an object |
| 789 | // objectref, where the field is |
| 790 | // identified by a field |
| 791 | // reference index in constant |
| 792 | // pool (indexbyte1 << 8 + |
| 793 | // indexbyte2) |
| 794 | final static short invokevirtual = 0xb6; // indexbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 795 | // indexbyte2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 796 | // objectref, [arg1, arg2, ...] |
| 797 | // ? invoke virtual method on |
| 798 | // object objectref, where the |
| 799 | // method is identified by |
| 800 | // method reference index in |
| 801 | // constant pool (indexbyte1 << |
| 802 | // 8 + indexbyte2) |
| 803 | final static short invokespecial = 0xb7; // indexbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 804 | // indexbyte2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 805 | // objectref, [arg1, arg2, ...] |
| 806 | // ? invoke instance method on |
| 807 | // object objectref, where the |
| 808 | // method is identified by |
| 809 | // method reference index in |
| 810 | // constant pool (indexbyte1 << |
| 811 | // 8 + indexbyte2) |
| 812 | final static short invokestatic = 0xb8; // indexbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 813 | // indexbyte2 [arg1, |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 814 | // arg2, ...] ? invoke a static |
| 815 | // method, where the method is |
| 816 | // identified by method |
| 817 | // reference index in constant |
| 818 | // pool (indexbyte1 << 8 + |
| 819 | // indexbyte2) |
| 820 | final static short invokeinterface = 0xb9; // indexbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 821 | // indexbyte2, |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 822 | // count, 0 objectref, [arg1, |
| 823 | // arg2, ...] ? invokes an |
| 824 | // interface method on object |
| 825 | // objectref, where the |
| 826 | // interface method is |
| 827 | // identified by method |
| 828 | // reference index in constant |
| 829 | // pool (indexbyte1 << 8 + |
| 830 | // indexbyte2) |
| 831 | final static short xxxunusedxxx = 0xba; // this opcode is |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 832 | // reserved "for |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 833 | // historical reasons" |
| 834 | final static short new_ = 0xbb; // indexbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 835 | // indexbyte2 ? |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 836 | // objectref creates new object |
| 837 | // of type identified by class |
| 838 | // reference in constant pool |
| 839 | // index (indexbyte1 << 8 + |
| 840 | // indexbyte2) |
| 841 | final static short newarray = 0xbc; // atype count ? |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 842 | // arrayref |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 843 | // creates new array with count |
| 844 | // elements of primitive type |
| 845 | // identified by atype |
| 846 | final static short anewarray = 0xbd; // indexbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 847 | // indexbyte2 count |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 848 | // ? arrayref creates a new |
| 849 | // array of references of length |
| 850 | // count and component type |
| 851 | // identified by the class |
| 852 | // reference index (indexbyte1 |
| 853 | // << 8 + indexbyte2) in the |
| 854 | // constant pool |
| 855 | final static short arraylength = 0xbe; // arrayref ? length |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 856 | // gets the |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 857 | // length of an array |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 858 | final static short athrow = 0xbf; // objectref ? |
| 859 | // [empty], |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 860 | // objectref throws an error or |
| 861 | // exception (notice that the |
| 862 | // rest of the stack is cleared, |
| 863 | // leaving only a reference to |
| 864 | // the Throwable) |
| 865 | final static short checkcast = 0xc0; // indexbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 866 | // indexbyte2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 867 | // objectref ? objectref checks |
| 868 | // whether an objectref is of a |
| 869 | // certain type, the class |
| 870 | // reference of which is in the |
| 871 | // constant pool at index |
| 872 | // (indexbyte1 << 8 + |
| 873 | // indexbyte2) |
| 874 | final static short instanceof_ = 0xc1; // indexbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 875 | // indexbyte2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 876 | // objectref ? result determines |
| 877 | // if an object objectref is of |
| 878 | // a given type, identified by |
| 879 | // class reference index in |
| 880 | // constant pool (indexbyte1 << |
| 881 | // 8 + indexbyte2) |
| 882 | final static short monitorenter = 0xc2; // objectref ? enter |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 883 | // monitor for |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 884 | // object ("grab the lock" - |
| 885 | // start of synchronized() |
| 886 | // section) |
| 887 | final static short monitorexit = 0xc3; // objectref ? exit |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 888 | // monitor for |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 889 | // object ("release the lock" - |
| 890 | // end of synchronized() |
| 891 | // section) |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 892 | final static short wide = 0xc4; // opcode, |
| 893 | // indexbyte1, |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 894 | // indexbyte2 |
| 895 | final static short multianewarray = 0xc5; // indexbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 896 | // indexbyte2, |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 897 | // dimensions count1, |
| 898 | // [count2,...] ? arrayref |
| 899 | // create a new array of |
| 900 | // dimensions dimensions with |
| 901 | // elements of type identified |
| 902 | // by class reference in |
| 903 | // constant pool index |
| 904 | // (indexbyte1 << 8 + |
| 905 | // indexbyte2); the sizes of |
| 906 | // each dimension is identified |
| 907 | // by count1, [count2, etc] |
| 908 | final static short ifnull = 0xc6; // branchbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 909 | // branchbyte2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 910 | // value ? if value is null, |
| 911 | // branch to instruction at |
| 912 | // branchoffset (signed short |
| 913 | // constructed from unsigned |
| 914 | // bytes branchbyte1 << 8 + |
| 915 | // branchbyte2) |
| 916 | final static short ifnonnull = 0xc7; // branchbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 917 | // branchbyte2 |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 918 | // value ? if value is not null, |
| 919 | // branch to instruction at |
| 920 | // branchoffset (signed short |
| 921 | // constructed from unsigned |
| 922 | // bytes branchbyte1 << 8 + |
| 923 | // branchbyte2) |
| 924 | final static short goto_w = 0xc8; // branchbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 925 | // branchbyte2, |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 926 | // branchbyte3, branchbyte4 [no |
| 927 | // change] goes to another |
| 928 | // instruction at branchoffset |
| 929 | // (signed int constructed from |
| 930 | // unsigned bytes branchbyte1 << |
| 931 | // 24 + branchbyte2 << 16 + |
| 932 | // branchbyte3 << 8 + |
| 933 | // branchbyte4) |
| 934 | final static short jsr_w = 0xc9; // branchbyte1, |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 935 | // branchbyte2, |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 936 | // branchbyte3, branchbyte4 ? |
| 937 | // address jump to subroutine at |
| 938 | // branchoffset (signed int |
| 939 | // constructed from unsigned |
| 940 | // bytes branchbyte1 << 24 + |
| 941 | // branchbyte2 << 16 + |
| 942 | // branchbyte3 << 8 + |
| 943 | // branchbyte4) and place the |
| 944 | // return address on the stack |
| 945 | final static short breakpoint = 0xca; // reserved for |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame] | 946 | // breakpoints in |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 947 | // Java debuggers; should not |
| 948 | // appear in any class file |
| 949 | final static short impdep1 = 0xfe; // reserved for |
| 950 | // implementation-dependent |
| 951 | // operations within debuggers; |
| 952 | // should not appear in any |
| 953 | // class file |
| 954 | final static short impdep2 = 0xff; // reserved for |
| 955 | // implementation-dependent |
| 956 | // operations within debuggers; |
| 957 | // should not appear in any |
| 958 | // class file |
| 959 | |
| 960 | final static byte OFFSETS[] = new byte[256]; |
| 961 | |
| 962 | static { |
| 963 | OFFSETS[bipush] = 1; // byte ? value pushes a byte onto the |
| 964 | // stack as an integer value |
| 965 | OFFSETS[sipush] = 2; // byte1, byte2 ? value pushes a signed |
| 966 | // integer (byte1 << 8 + byte2) onto the |
| 967 | // stack |
| 968 | OFFSETS[ldc] = 1; // index ? value pushes a constant |
| 969 | // #index from a constant pool (String, |
| 970 | // int, float or class type) onto the |
| 971 | // stack |
| 972 | OFFSETS[ldc_w] = 2; // indexbyte1, indexbyte2 ? value pushes |
| 973 | // a constant #index from a constant |
| 974 | // pool (String, int, float or class |
| 975 | // type) onto the stack (wide index is |
| 976 | // constructed as indexbyte1 << 8 + |
| 977 | // indexbyte2) |
| 978 | OFFSETS[ldc2_w] = 2; // indexbyte1, indexbyte2 ? value pushes |
| 979 | // a constant #index from a constant |
| 980 | // pool (double or long) onto the stack |
| 981 | // (wide index is constructed as |
| 982 | // indexbyte1 << 8 + indexbyte2) |
| 983 | OFFSETS[iload] = 1; // index ? value loads an int value from |
| 984 | // a variable #index |
| 985 | OFFSETS[lload] = 1; // index ? value load a long value from |
| 986 | // a local variable #index |
| 987 | OFFSETS[fload] = 1; // index ? value loads a float value |
| 988 | // from a local variable #index |
| 989 | OFFSETS[dload] = 1; // index ? value loads a double value |
| 990 | // from a local variable #index |
| 991 | OFFSETS[aload] = 1; // index ? objectref loads a reference |
| 992 | // onto the stack from a local variable |
| 993 | // #index |
| 994 | OFFSETS[istore] = 1; // index value ? store int value into |
| 995 | // variable #index |
| 996 | OFFSETS[lstore] = 1; // index value ? store a long value in a |
| 997 | // local variable #index |
| 998 | OFFSETS[fstore] = 1; // index value ? stores a float value |
| 999 | // into a local variable #index |
| 1000 | OFFSETS[dstore] = 1; // index value ? stores a double value |
| 1001 | // into a local variable #index |
| 1002 | OFFSETS[iinc] = 2; // index, const [No change] increment |
| 1003 | // local variable #index by signed byte |
| 1004 | // const |
| 1005 | OFFSETS[ifeq] = 2; // branchbyte1, branchbyte2 value ? if |
| 1006 | // value is 0, branch to instruction at |
| 1007 | // branchoffset (signed short |
| 1008 | // constructed from unsigned bytes |
| 1009 | // branchbyte1 << 8 + branchbyte2) |
| 1010 | OFFSETS[astore] = 1; // index objectref ? stores a reference |
| 1011 | // into a local variable #index |
| 1012 | OFFSETS[ifne] = 2; // branchbyte1, branchbyte2 value ? if |
| 1013 | // value is not 0, branch to instruction |
| 1014 | // at branchoffset (signed short |
| 1015 | // constructed from unsigned bytes |
| 1016 | // branchbyte1 << 8 + branchbyte2) |
| 1017 | OFFSETS[iflt] = 2; // branchbyte1, branchbyte2 value ? if |
| 1018 | // value is less than 0, branch to |
| 1019 | // instruction at branchoffset (signed |
| 1020 | // short constructed from unsigned bytes |
| 1021 | // branchbyte1 << 8 + branchbyte2) |
| 1022 | OFFSETS[ifge] = 2; // branchbyte1, branchbyte2 value ? if |
| 1023 | // value is greater than or equal to 0, |
| 1024 | // branch to instruction at branchoffset |
| 1025 | // (signed short constructed from |
| 1026 | // unsigned bytes branchbyte1 << 8 + |
| 1027 | // branchbyte2) |
| 1028 | OFFSETS[ifgt] = 2; // branchbyte1, branchbyte2 value ? if |
| 1029 | // value is greater than 0, branch to |
| 1030 | // instruction at branchoffset (signed |
| 1031 | // short constructed from unsigned bytes |
| 1032 | // branchbyte1 << 8 + branchbyte2) |
| 1033 | OFFSETS[ifle] = 2; // branchbyte1, branchbyte2 value ? if |
| 1034 | // value is less than or equal to 0, |
| 1035 | // branch to instruction at branchoffset |
| 1036 | // (signed short constructed from |
| 1037 | // unsigned bytes branchbyte1 << 8 + |
| 1038 | // branchbyte2) |
| 1039 | OFFSETS[if_icmpeq] = 2; // branchbyte1, branchbyte2 value1, |
| 1040 | // value2 ? if ints are equal, |
| 1041 | // branch to instruction at |
| 1042 | // branchoffset (signed short |
| 1043 | // constructed from unsigned bytes |
| 1044 | // branchbyte1 << 8 + branchbyte2) |
| 1045 | OFFSETS[if_icmpne] = 2; // branchbyte1, branchbyte2 value1, |
| 1046 | // value2 ? if ints are not equal, |
| 1047 | // branch to instruction at |
| 1048 | // branchoffset (signed short |
| 1049 | // constructed from unsigned bytes |
| 1050 | // branchbyte1 << 8 + branchbyte2) |
| 1051 | OFFSETS[if_icmplt] = 2; // branchbyte1, branchbyte2 value1, |
| 1052 | // value2 ? if value1 is less than |
| 1053 | // value2, branch to instruction at |
| 1054 | // branchoffset (signed short |
| 1055 | // constructed from unsigned bytes |
| 1056 | // branchbyte1 << 8 + branchbyte2) |
| 1057 | OFFSETS[if_icmpge] = 2; // branchbyte1, branchbyte2 value1, |
| 1058 | // value2 ? if value1 is greater |
| 1059 | // than or equal to value2, branch |
| 1060 | // to instruction at branchoffset |
| 1061 | // (signed short constructed from |
| 1062 | // unsigned bytes branchbyte1 << 8 + |
| 1063 | // branchbyte2) |
| 1064 | OFFSETS[if_icmpgt] = 2; // branchbyte1, branchbyte2 value1, |
| 1065 | // value2 ? if value1 is greater |
| 1066 | // than value2, branch to |
| 1067 | // instruction at branchoffset |
| 1068 | // (signed short constructed from |
| 1069 | // unsigned bytes branchbyte1 << 8 + |
| 1070 | // branchbyte2) |
| 1071 | OFFSETS[if_icmple] = 2; // branchbyte1, branchbyte2 value1, |
| 1072 | // value2 ? if value1 is less than |
| 1073 | // or equal to value2, branch to |
| 1074 | // instruction at branchoffset |
| 1075 | // (signed short constructed from |
| 1076 | // unsigned bytes branchbyte1 << 8 + |
| 1077 | // branchbyte2) |
| 1078 | OFFSETS[if_acmpeq] = 2; // branchbyte1, branchbyte2 value1, |
| 1079 | // value2 ? if references are equal, |
| 1080 | // branch to instruction at |
| 1081 | // branchoffset (signed short |
| 1082 | // constructed from unsigned bytes |
| 1083 | // branchbyte1 << 8 + branchbyte2) |
| 1084 | OFFSETS[if_acmpne] = 2; // branchbyte1, branchbyte2 value1, |
| 1085 | // value2 ? if references are not |
| 1086 | // equal, branch to instruction at |
| 1087 | // branchoffset (signed short |
| 1088 | // constructed from unsigned bytes |
| 1089 | // branchbyte1 << 8 + branchbyte2) |
| 1090 | OFFSETS[goto_] = 2; // branchbyte1, branchbyte2 [no change] |
| 1091 | // goes to another instruction at |
| 1092 | // branchoffset (signed short |
| 1093 | // constructed from unsigned bytes |
| 1094 | // branchbyte1 << 8 + branchbyte2) |
| 1095 | OFFSETS[jsr] = 2; // branchbyte1, branchbyte2 ? address |
| 1096 | // jump to subroutine at branchoffset |
| 1097 | // (signed short constructed from |
| 1098 | // unsigned bytes branchbyte1 << 8 + |
| 1099 | // branchbyte2) and place the return |
| 1100 | // address on the stack |
| 1101 | OFFSETS[ret] = 1; // index [No change] continue execution |
| 1102 | // from address taken from a local |
| 1103 | // variable #index (the asymmetry with |
| 1104 | // jsr is intentional) |
| 1105 | OFFSETS[tableswitch] = -1; // [0-3 bytes padding], |
| 1106 | // defaultbyte1, defaultbyte2, |
| 1107 | // defaultbyte3, defaultbyte4, |
| 1108 | // lowbyte1, lowbyte2, lowbyte3, |
| 1109 | // lowbyte4, highbyte1, |
| 1110 | // highbyte2, highbyte3, |
| 1111 | // highbyte4, jump offsets... |
| 1112 | // index ? continue execution |
| 1113 | // from an address in the table |
| 1114 | // at offset index |
| 1115 | OFFSETS[lookupswitch] = -1; // <0-3 bytes padding>, |
| 1116 | // defaultbyte1, defaultbyte2, |
| 1117 | // defaultbyte3, defaultbyte4, |
| 1118 | // npairs1, npairs2, npairs3, |
| 1119 | // npairs4, match-offset |
| 1120 | // pairs... key ? a target |
| 1121 | // address is looked up from a |
| 1122 | // table using a key and |
| 1123 | // execution continues from the |
| 1124 | // instruction at that address |
| 1125 | OFFSETS[getstatic] = 2; // index1, index2 ? value gets a |
| 1126 | // static field value of a class, |
| 1127 | // where the field is identified by |
| 1128 | // field reference in the constant |
| 1129 | // pool index (index1 << 8 + index2) |
| 1130 | OFFSETS[putstatic] = 2; // indexbyte1, indexbyte2 value ? |
| 1131 | // set static field to value in a |
| 1132 | // class, where the field is |
| 1133 | // identified by a field reference |
| 1134 | // index in constant pool |
| 1135 | // (indexbyte1 << 8 + indexbyte2) |
| 1136 | OFFSETS[getfield] = 2; // index1, index2 objectref ? value |
| 1137 | // gets a field value of an object |
| 1138 | // objectref, where the field is |
| 1139 | // identified by field reference in |
| 1140 | // the constant pool index (index1 |
| 1141 | // << 8 + index2) |
| 1142 | OFFSETS[putfield] = 2; // indexbyte1, indexbyte2 objectref, |
| 1143 | // value ? set field to value in an |
| 1144 | // object objectref, where the field |
| 1145 | // is identified by a field |
| 1146 | // reference index in constant pool |
| 1147 | // (indexbyte1 << 8 + indexbyte2) |
| 1148 | OFFSETS[invokevirtual] = 2; // indexbyte1, indexbyte2 |
| 1149 | // objectref, [arg1, arg2, ...] |
| 1150 | // ? invoke virtual method on |
| 1151 | // object objectref, where the |
| 1152 | // method is identified by |
| 1153 | // method reference index in |
| 1154 | // constant pool (indexbyte1 << |
| 1155 | // 8 + indexbyte2) |
| 1156 | OFFSETS[invokespecial] = 2; // indexbyte1, indexbyte2 |
| 1157 | // objectref, [arg1, arg2, ...] |
| 1158 | // ? invoke instance method on |
| 1159 | // object objectref, where the |
| 1160 | // method is identified by |
| 1161 | // method reference index in |
| 1162 | // constant pool (indexbyte1 << |
| 1163 | // 8 + indexbyte2) |
| 1164 | OFFSETS[invokestatic] = 2; // indexbyte1, indexbyte2 [arg1, |
| 1165 | // arg2, ...] ? invoke a static |
| 1166 | // method, where the method is |
| 1167 | // identified by method |
| 1168 | // reference index in constant |
| 1169 | // pool (indexbyte1 << 8 + |
| 1170 | // indexbyte2) |
| 1171 | OFFSETS[invokeinterface] = 2; // indexbyte1, indexbyte2, |
| 1172 | // count, 0 objectref, |
| 1173 | // [arg1, arg2, ...] ? |
| 1174 | // invokes an interface |
| 1175 | // method on object |
| 1176 | // objectref, where the |
| 1177 | // interface method is |
| 1178 | // identified by method |
| 1179 | // reference index in |
| 1180 | // constant pool (indexbyte1 |
| 1181 | // << 8 + indexbyte2) |
| 1182 | OFFSETS[new_] = 2; // indexbyte1, indexbyte2 ? objectref |
| 1183 | // creates new object of type identified |
| 1184 | // by class reference in constant pool |
| 1185 | // index (indexbyte1 << 8 + indexbyte2) |
| 1186 | OFFSETS[newarray] = 1; // atype count ? arrayref creates |
| 1187 | // new array with count elements of |
| 1188 | // primitive type identified by |
| 1189 | // atype |
| 1190 | OFFSETS[anewarray] = 2; // indexbyte1, indexbyte2 count ? |
| 1191 | // arrayref creates a new array of |
| 1192 | // references of length count and |
| 1193 | // component type identified by the |
| 1194 | // class reference index (indexbyte1 |
| 1195 | // << 8 + indexbyte2) in the |
| 1196 | // constant pool |
| 1197 | OFFSETS[checkcast] = 2; // indexbyte1, indexbyte2 objectref |
| 1198 | // ? objectref checks whether an |
| 1199 | // objectref is of a certain type, |
| 1200 | // the class reference of which is |
| 1201 | // in the constant pool at index |
| 1202 | // (indexbyte1 << 8 + indexbyte2) |
| 1203 | OFFSETS[instanceof_] = 2; // indexbyte1, indexbyte2 objectref |
| 1204 | // ? result determines if an object |
| 1205 | // objectref is of a given type, |
| 1206 | // identified by class reference |
| 1207 | // index in constant pool |
| 1208 | // (indexbyte1 << 8 + indexbyte2) |
| 1209 | OFFSETS[wide] = 3; // opcode, indexbyte1, indexbyte2 |
| 1210 | OFFSETS[multianewarray] = 3; // indexbyte1, indexbyte2, |
| 1211 | // dimensions count1, |
| 1212 | // [count2,...] ? arrayref |
| 1213 | // create a new array of |
| 1214 | // dimensions dimensions with |
| 1215 | // elements of type identified |
| 1216 | // by class reference in |
| 1217 | // constant pool index |
| 1218 | // (indexbyte1 << 8 + |
| 1219 | // indexbyte2); the sizes of |
| 1220 | // each dimension is identified |
| 1221 | // by count1, [count2, etc] |
| 1222 | OFFSETS[ifnull] = 2; // branchbyte1, branchbyte2 value ? if |
| 1223 | // value is null, branch to instruction |
| 1224 | // at branchoffset (signed short |
| 1225 | // constructed from unsigned bytes |
| 1226 | // branchbyte1 << 8 + branchbyte2) |
| 1227 | OFFSETS[ifnonnull] = 2; // branchbyte1, branchbyte2 value ? |
| 1228 | // if value is not null, branch to |
| 1229 | // instruction at branchoffset |
| 1230 | // (signed short constructed from |
| 1231 | // unsigned bytes branchbyte1 << 8 + |
| 1232 | // branchbyte2) |
| 1233 | OFFSETS[goto_w] = 4; // branchbyte1, branchbyte2, |
| 1234 | // branchbyte3, branchbyte4 [no change] |
| 1235 | // goes to another instruction at |
| 1236 | // branchoffset (signed int constructed |
| 1237 | // from unsigned bytes branchbyte1 << 24 |
| 1238 | // + branchbyte2 << 16 + branchbyte3 << |
| 1239 | // 8 + branchbyte4) |
| 1240 | OFFSETS[jsr_w] = 4; // branchbyte1, branchbyte2, |
| 1241 | // branchbyte3, branchbyte4 ? address |
| 1242 | // jump to subroutine at branchoffset |
| 1243 | // (signed int constructed from unsigned |
| 1244 | // bytes branchbyte1 << 24 + branchbyte2 |
| 1245 | // << 16 + branchbyte3 << 8 + |
| 1246 | // branchbyte4) and place the return |
| 1247 | // address on the stack |
| 1248 | } |
| 1249 | |
| 1250 | } |