ROSE  0.11.145.0
InstructionEnumsJvm.h
1 #ifndef ROSE_BinaryAnalysis_InstructionEnumsJvm_H
2 #define ROSE_BinaryAnalysis_InstructionEnumsJvm_H
3 #include <featureTests.h>
4 #ifdef ROSE_ENABLE_BINARY_ANALYSIS
5 
6 /* References:
7  * [1] "The Java® Virtual Machine Specification Java SE 17 Edition"
8  * authors: Tim Lindholm Frank Yellin Gilad Bracha Alex Buckley Daniel Smith
9  * date: 2021-08-09
10  */
11 
12 namespace Rose {
13 namespace BinaryAnalysis {
14 
29 enum class JvmInstructionKind {
30  nop = 0,
31  aconst_null = 1,
32  iconst_m1 = 2,
33  iconst_0 = 3,
34  iconst_1 = 4,
35  iconst_2 = 5,
36  iconst_3 = 6,
37  iconst_4 = 7,
38  iconst_5 = 8,
39  lconst_0 = 9,
40  lconst_1 = 10,
41  fconst_0 = 11,
42  fconst_1 = 12,
43  fconst_2 = 13,
44  dconst_0 = 14,
45  dconst_1 = 15,
46  bipush = 16,
47  sipush = 17,
48  ldc = 18,
49  ldc_w = 19,
50  ldc2_w = 20,
51  iload = 21,
52  lload = 22,
53  fload = 23,
54  dload = 24,
55  aload = 25,
56  iload_0 = 26,
57  iload_1 = 27,
58  iload_2 = 28,
59  iload_3 = 29,
60  lload_0 = 30,
61  lload_1 = 31,
62  lload_2 = 32,
63  lload_3 = 33,
64  fload_0 = 34,
65  fload_1 = 35,
66  fload_2 = 36,
67  fload_3 = 37,
68  dload_0 = 38,
69  dload_1 = 39,
70  dload_2 = 40,
71  dload_3 = 41,
72  aload_0 = 42,
73  aload_1 = 43,
74  aload_2 = 44,
75  aload_3 = 45,
76  iaload = 46,
77  laload = 47,
78  faload = 48,
79  daload = 49,
80  aaload = 50,
81  baload = 51,
82  caload = 52,
83  saload = 53,
84  istore = 54,
85  lstore = 55,
86  fstore = 56,
87  dstore = 57,
88  astore = 58,
89  istore_0 = 59,
90  istore_1 = 60,
91  istore_2 = 61,
92  istore_3 = 62,
93  lstore_0 = 63,
94  lstore_1 = 64,
95  lstore_2 = 65,
96  lstore_3 = 66,
97  fstore_0 = 67,
98  fstore_1 = 68,
99  fstore_2 = 69,
100  fstore_3 = 70,
101  dstore_0 = 71,
102  dstore_1 = 72,
103  dstore_2 = 73,
104  dstore_3 = 74,
105  astore_0 = 75,
106  astore_1 = 76,
107  astore_2 = 77,
108  astore_3 = 78,
109  iastore = 79,
110  lastore = 80,
111  fastore = 81,
112  dastore = 82,
113  aastore = 83,
114  bastore = 84,
115  castore = 85,
116  sastore = 86,
117  pop = 87,
118  pop2 = 88,
119  dup = 89,
120  dup_x1 = 90,
121  dup_x2 = 91,
122  dup2 = 92,
123  dup2_x1 = 93,
124  dup2_x2 = 94,
125  swap = 95,
126  iadd = 96,
127  ladd = 97,
128  fadd = 98,
129  dadd = 99,
130  isub = 100,
131  lsub = 101,
132  fsub = 102,
133  dsub = 103,
134  imul = 104,
135  lmul = 105,
136  fmul = 106,
137  dmul = 107,
138  idiv = 108,
139  ldiv = 109,
140  fdiv = 110,
141  ddiv = 111,
142  irem = 112,
143  lrem = 113,
144  frem = 114,
145  drem = 115,
146  ineg = 116,
147  lneg = 117,
148  fneg = 118,
149  dneg = 119,
150  ishl = 120,
151  lshl = 121,
152  ishr = 122,
153  lshr = 123,
154  iushr = 124,
155  lushr = 125,
156  iand = 126,
157  land = 127,
158  ior = 128,
159  lor = 129,
160  ixor = 130,
161  lxor = 131,
162  iinc = 132,
163  i2l = 133,
164  i2f = 134,
165  i2d = 135,
166  l2i = 136,
167  l2f = 137,
168  l2d = 138,
169  f2i = 139,
170  f2l = 140,
171  f2d = 141,
172  d2i = 142,
173  d2l = 143,
174  d2f = 144,
175  i2b = 145,
176  i2c = 146,
177  i2s = 147,
178  lcmp = 148,
179  fcmpl = 149,
180  fcmpg = 150,
181  dcmpl = 151,
182  dcmpg = 152,
183  ifeq = 153,
184  ifne = 154,
185  iflt = 155,
186  ifge = 156,
187  ifgt = 157,
188  ifle = 158,
189  if_icmpeq = 159,
190  if_icmpne = 160,
191  if_icmplt = 161,
192  if_icmpge = 162,
193  if_icmpgt = 163,
194  if_icmple = 164,
195  if_acmpeq = 165,
196  if_acmpne = 166,
197  goto_ = 167,
198  jsr = 168,
199  ret = 169,
200  tableswitch = 170,
201  lookupswitch = 171,
202  ireturn = 172,
203  lreturn = 173,
204  freturn = 174,
205  dreturn = 175,
206  areturn = 176,
207  return_ = 177,
208  getstatic = 178,
209  putstatic = 179,
210  getfield = 180,
211  putfield = 181,
212  invokevirtual = 182,
213  invokespecial = 183,
214  invokestatic = 184,
215  invokeinterface = 185,
216  invokedynamic = 186,
217  new_ = 187,
218  newarray = 188,
219  anewarray = 189,
220  arraylength = 190,
221  athrow = 191,
222  checkcast = 192,
223  instanceof = 193,
224  monitorenter = 194,
225  monitorexit = 195,
226  wide = 196,
227  multianewarray = 197,
228  ifnull = 198,
229  ifnonnull = 199,
230  goto_w = 200,
231  jsr_w = 201,
232  breakpoint = 202,
233  impdep1 = 254,
234  impdep2 = 255,
235  unknown = 666
236 };
237 
238 } // namespace
239 } // namespace
240 
241 #endif
242 #endif
0x7c: "Logical shift right int"
0xaf: "Return double from method"
0x24: "Load float from local variable 2"
0x47: "Store double into local variable 0"
0xc4 3/5: opcode,indexbyte1,indexbyte2 or iinc,indexbyte1,indexbyte2,countbyte1,countbye2 ...
0x41: "Store long into local variable 2"
0x23: "Load float from local variable 1"
0xa4 2: branchbyte1, branchbyte2: "Branch if int comparison .le. succeeds"
0x8e: "Convert double to int"
0x1a: "Load int from local variable 0"
0x99 2: branchbyte1, branchbyte2: "Branch if int comparison .eq. with zero succeeds" ...
0x1b: "Load int from local variable 1"
0x2b: "Load reference from local variable 1"
0xc1 2: indexbyte1, indexbyte2: "Determine if object is of given type"
0x11 2: byte1, byte2: "Push short"
0x4a: "Store double into local variable 3"
0x22: "Load float from local variable 0"
0x1f: "Load long from local variable 1"
0xa7 2: branchbyte1, branchbyte2
0x1d: "Load int from local variable 3"
0xaa 16+: [0-3 bytes padding],defaultbyte1,defaultbyte2,defaultbyte3,defaultbyte4,lowbye1,lowbyte2,lowbyte3,lowbyte4,highbyte1,highbyte2,highbyte3,highbyte4,jump offsets...
0x9e 2: branchbyte1, branchbyte2
0x7d: "Logical shift right long"
0x5a: "Duplicate the top operand stack value and insert two values down"
0xb4 2: indexbyte1, indexbyte2: "Fetch field from object"
0xae: "Return float from method"
0x2c: "Load reference from local variable 2"
JvmInstructionKind
The Java Virtual Machine (JVM) instruction set.
0x5c: "Duplicate the top one or two operand stack values"
0xc6 2: branchbyte1, branchbyte2: "Branch if reference is null"
0xb3 2: indexbyte1, indexbyte2: "Set static field in class"
Main namespace for the ROSE library.
0xbc 1: atype: "Create new array"
0xa8 2: branchbyte1, branchbyte2
0xb0: "Return reference from method"
0x8d: "Convert float to double"
0x9d 2: branchbyte1, branchbyte2
0xab 8+: <0-3 bytes padding>,defaultbyte1,defaultbyte2,defaultbyte3,defaultbyte4,npairs,npairs2,npairs3,npairs4,match-offset pairs...
0x8a: "Convert long to double"
0x4b: "Store reference into local variable 0"
0x58: "Pop the top one or two operand stack values"
0x28: "Load double from local variable 2"
0x15 1: index: "Load int from local variable"
0x84:2: index, const: "Increment local variable"
0x87: "Convert int to double"
0x27: "Load double from local variable 1"
0x9a 2: branchbyte1, branchbyte2
0x42: "Store long into local variable 3"
0x8f: "Convert double to long"
0xb2 2: indexbyte1, indexbyte2: "Get static field in class"
0x1c: "Load int from local variable 2"
0x25: "Load float from local variable 3"
0xc0 2: indexbyte1, indexbyte2: "Check whether object is of given type"
0xc9 4: branchbyte1, branchbyte2, branchbyte3, branchbyte4
0x3f: "Store long into local variable 0"
0xb9 4: indexbyte1, indexbyte2, count, 0
0x14 2: indexbyte1, indexbyte2: "Push long or double from run-time constant pool (wide index)" ...
0x90: "Convert double to float"
0x5d: "Duplicate the top one or two operand stack values and insert two or three values down" ...
0x59: "Duplicate the top operand stack value"
0x19 1: index: "Load reference from local variable"
0x43: "Store float into local variable 0"
0x18 1: index: "Load double from local variable"
0x46: "Store float into local variable 3"
0x3e: "Store int into local variable 3"
0x5b: "Duplicate the top operand stack value and insert two or three values down" ...
0x33: "Load byte or boolean from array"
0x40: "Store long into local variable 1"
0x48: "Store double into local variable 1"
0x4d: "Store reference into local variable 2"
0x8c: "Convert float to long"
0xc8 4: branchbyte1, branchbyte2, branchbyte3, branchbyte4
0x16 1: index: "Load long from local variable"
0x89: "Convert long to float"
0x9c 2: branchbyte1, branchbyte2
0xbf: "Throw exception or error"
0x53: "Store into reference array"
0x57: "Pop the top operand stack value"
0x1e: "Load long from local variable 0"
0x13 2: indexbyte1, indexbyte2: "Push item from run-time constant pool (wide index)" ...
0xbd 2: indexbyte1, indexbyte2: "Create new array of reference"
0x5f: "Swap the top two operand stack values"
0x45: "Store float into local variable 2"
0xc5 3: indexbyte1, indexbyte2, dimensions
0x4c: "Store reference into local variable 1"
0x2a: "Load reference from local variable 0"
0x54: "Store into byte or boolean array"
0x36 1: index "Store int into local variable at index"
0xba 4: indexbyte1, indexbyte2, 0, 0
0x4e: "Store reference into local variable 3"
0x3d: "Store int into local variable 2"
0x44: "Store float into local variable 1"
0x5e: "Duplicate the top one or two operand stack values and insert two, three, or four values down" ...
0x9b 2: branchbyte1, branchbyte2
0x29: "Load double from local variable 3"
0x32: "Load reference from array"
0x49: "Store double into local variable 2"
0x20: "Load long from local variable 2"
0x2d: "Load reference from local variable 3"
0x21: "Load long from local variable 3"
0xb7 2: indexbyte1, indexbyte2: "Invoke instance method; direct invocation of instance initialization...
0x3b: "Store int into local variable 0"
0x12 1: index: "Push item from run-time constant pool"
0x3c: "Store int into local variable 1"
0x17 1: index: "Load float from local variable"
0xbb 2: indexbyte1, indexbyte2
0x26: "Load double from local variable 0"
0xb5 2: indexbyte1, indexbyte2: "Set field in object"