Rizin
unix-like reverse engineering framework and cli tools
bytecode.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2021 deroad <wargio@libero.it>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 
4 #ifndef RZ_ASM_JAVA_BYTECODE_H
5 #define RZ_ASM_JAVA_BYTECODE_H
6 #include <rz_types.h>
7 
8 #define BYTECODE_00_NOP (0x00)
9 #define BYTECODE_01_ACONST_NULL (0x01)
10 #define BYTECODE_02_ICONST_M1 (0x02)
11 #define BYTECODE_03_ICONST_0 (0x03)
12 #define BYTECODE_04_ICONST_1 (0x04)
13 #define BYTECODE_05_ICONST_2 (0x05)
14 #define BYTECODE_06_ICONST_3 (0x06)
15 #define BYTECODE_07_ICONST_4 (0x07)
16 #define BYTECODE_08_ICONST_5 (0x08)
17 #define BYTECODE_09_LCONST_0 (0x09)
18 #define BYTECODE_0A_LCONST_1 (0x0A)
19 #define BYTECODE_0B_FCONST_0 (0x0B)
20 #define BYTECODE_0C_FCONST_1 (0x0C)
21 #define BYTECODE_0D_FCONST_2 (0x0D)
22 #define BYTECODE_0E_DCONST_0 (0x0E)
23 #define BYTECODE_0F_DCONST_1 (0x0F)
24 #define BYTECODE_10_BIPUSH (0x10)
25 #define BYTECODE_11_SIPUSH (0x11)
26 #define BYTECODE_12_LDC (0x12)
27 #define BYTECODE_13_LDC_W (0x13)
28 #define BYTECODE_14_LDC2_W (0x14)
29 #define BYTECODE_15_ILOAD (0x15)
30 #define BYTECODE_16_LLOAD (0x16)
31 #define BYTECODE_17_FLOAD (0x17)
32 #define BYTECODE_18_DLOAD (0x18)
33 #define BYTECODE_19_ALOAD (0x19)
34 #define BYTECODE_1A_ILOAD_0 (0x1A)
35 #define BYTECODE_1B_ILOAD_1 (0x1B)
36 #define BYTECODE_1C_ILOAD_2 (0x1C)
37 #define BYTECODE_1D_ILOAD_3 (0x1D)
38 #define BYTECODE_1E_LLOAD_0 (0x1E)
39 #define BYTECODE_1F_LLOAD_1 (0x1F)
40 #define BYTECODE_20_LLOAD_2 (0x20)
41 #define BYTECODE_21_LLOAD_3 (0x21)
42 #define BYTECODE_22_FLOAD_0 (0x22)
43 #define BYTECODE_23_FLOAD_1 (0x23)
44 #define BYTECODE_24_FLOAD_2 (0x24)
45 #define BYTECODE_25_FLOAD_3 (0x25)
46 #define BYTECODE_26_DLOAD_0 (0x26)
47 #define BYTECODE_27_DLOAD_1 (0x27)
48 #define BYTECODE_28_DLOAD_2 (0x28)
49 #define BYTECODE_29_DLOAD_3 (0x29)
50 #define BYTECODE_2A_ALOAD_0 (0x2A)
51 #define BYTECODE_2B_ALOAD_1 (0x2B)
52 #define BYTECODE_2C_ALOAD_2 (0x2C)
53 #define BYTECODE_2D_ALOAD_3 (0x2D)
54 #define BYTECODE_2E_IALOAD (0x2E)
55 #define BYTECODE_2F_LALOAD (0x2F)
56 #define BYTECODE_30_FALOAD (0x30)
57 #define BYTECODE_31_DALOAD (0x31)
58 #define BYTECODE_32_AALOAD (0x32)
59 #define BYTECODE_33_BALOAD (0x33)
60 #define BYTECODE_34_CALOAD (0x34)
61 #define BYTECODE_35_SALOAD (0x35)
62 #define BYTECODE_36_ISTORE (0x36)
63 #define BYTECODE_37_LSTORE (0x37)
64 #define BYTECODE_38_FSTORE (0x38)
65 #define BYTECODE_39_DSTORE (0x39)
66 #define BYTECODE_3A_ASTORE (0x3A)
67 #define BYTECODE_3B_ISTORE_0 (0x3B)
68 #define BYTECODE_3C_ISTORE_1 (0x3C)
69 #define BYTECODE_3D_ISTORE_2 (0x3D)
70 #define BYTECODE_3E_ISTORE_3 (0x3E)
71 #define BYTECODE_3F_LSTORE_0 (0x3F)
72 #define BYTECODE_40_LSTORE_1 (0x40)
73 #define BYTECODE_41_LSTORE_2 (0x41)
74 #define BYTECODE_42_LSTORE_3 (0x42)
75 #define BYTECODE_43_FSTORE_0 (0x43)
76 #define BYTECODE_44_FSTORE_1 (0x44)
77 #define BYTECODE_45_FSTORE_2 (0x45)
78 #define BYTECODE_46_FSTORE_3 (0x46)
79 #define BYTECODE_47_DSTORE_0 (0x47)
80 #define BYTECODE_48_DSTORE_1 (0x48)
81 #define BYTECODE_49_DSTORE_2 (0x49)
82 #define BYTECODE_4A_DSTORE_3 (0x4A)
83 #define BYTECODE_4B_ASTORE_0 (0x4B)
84 #define BYTECODE_4C_ASTORE_1 (0x4C)
85 #define BYTECODE_4D_ASTORE_2 (0x4D)
86 #define BYTECODE_4E_ASTORE_3 (0x4E)
87 #define BYTECODE_4F_IASTORE (0x4F)
88 #define BYTECODE_50_LASTORE (0x50)
89 #define BYTECODE_51_FASTORE (0x51)
90 #define BYTECODE_52_DASTORE (0x52)
91 #define BYTECODE_53_AASTORE (0x53)
92 #define BYTECODE_54_BASTORE (0x54)
93 #define BYTECODE_55_CASTORE (0x55)
94 #define BYTECODE_56_SASTORE (0x56)
95 #define BYTECODE_57_POP (0x57)
96 #define BYTECODE_58_POP2 (0x58)
97 #define BYTECODE_59_DUP (0x59)
98 #define BYTECODE_5A_DUP_X1 (0x5A)
99 #define BYTECODE_5B_DUP_X2 (0x5B)
100 #define BYTECODE_5C_DUP2 (0x5C)
101 #define BYTECODE_5D_DUP2_X1 (0x5D)
102 #define BYTECODE_5E_DUP2_X2 (0x5E)
103 #define BYTECODE_5F_SWAP (0x5F)
104 #define BYTECODE_60_IADD (0x60)
105 #define BYTECODE_61_LADD (0x61)
106 #define BYTECODE_62_FADD (0x62)
107 #define BYTECODE_63_DADD (0x63)
108 #define BYTECODE_64_ISUB (0x64)
109 #define BYTECODE_65_LSUB (0x65)
110 #define BYTECODE_66_FSUB (0x66)
111 #define BYTECODE_67_DSUB (0x67)
112 #define BYTECODE_68_IMUL (0x68)
113 #define BYTECODE_69_LMUL (0x69)
114 #define BYTECODE_6A_FMUL (0x6A)
115 #define BYTECODE_6B_DMUL (0x6B)
116 #define BYTECODE_6C_IDIV (0x6C)
117 #define BYTECODE_6D_LDIV (0x6D)
118 #define BYTECODE_6E_FDIV (0x6E)
119 #define BYTECODE_6F_DDIV (0x6F)
120 #define BYTECODE_70_IREM (0x70)
121 #define BYTECODE_71_LREM (0x71)
122 #define BYTECODE_72_FREM (0x72)
123 #define BYTECODE_73_DREM (0x73)
124 #define BYTECODE_74_INEG (0x74)
125 #define BYTECODE_75_LNEG (0x75)
126 #define BYTECODE_76_FNEG (0x76)
127 #define BYTECODE_77_DNEG (0x77)
128 #define BYTECODE_78_ISHL (0x78)
129 #define BYTECODE_79_LSHL (0x79)
130 #define BYTECODE_7A_ISHR (0x7A)
131 #define BYTECODE_7B_LSHR (0x7B)
132 #define BYTECODE_7C_IUSHR (0x7C)
133 #define BYTECODE_7D_LUSHR (0x7D)
134 #define BYTECODE_7E_IAND (0x7E)
135 #define BYTECODE_7F_LAND (0x7F)
136 #define BYTECODE_80_IOR (0x80)
137 #define BYTECODE_81_LOR (0x81)
138 #define BYTECODE_82_IXOR (0x82)
139 #define BYTECODE_83_LXOR (0x83)
140 #define BYTECODE_84_IINC (0x84)
141 #define BYTECODE_85_I2L (0x85)
142 #define BYTECODE_86_I2F (0x86)
143 #define BYTECODE_87_I2D (0x87)
144 #define BYTECODE_88_L2I (0x88)
145 #define BYTECODE_89_L2F (0x89)
146 #define BYTECODE_8A_L2D (0x8A)
147 #define BYTECODE_8B_F2I (0x8B)
148 #define BYTECODE_8C_F2L (0x8C)
149 #define BYTECODE_8D_F2D (0x8D)
150 #define BYTECODE_8E_D2I (0x8E)
151 #define BYTECODE_8F_D2L (0x8F)
152 #define BYTECODE_90_D2F (0x90)
153 #define BYTECODE_91_I2B (0x91)
154 #define BYTECODE_92_I2C (0x92)
155 #define BYTECODE_93_I2S (0x93)
156 #define BYTECODE_94_LCMP (0x94)
157 #define BYTECODE_95_FCMPL (0x95)
158 #define BYTECODE_96_FCMPG (0x96)
159 #define BYTECODE_97_DCMPL (0x97)
160 #define BYTECODE_98_DCMPG (0x98)
161 #define BYTECODE_99_IFEQ (0x99)
162 #define BYTECODE_9A_IFNE (0x9A)
163 #define BYTECODE_9B_IFLT (0x9B)
164 #define BYTECODE_9C_IFGE (0x9C)
165 #define BYTECODE_9D_IFGT (0x9D)
166 #define BYTECODE_9E_IFLE (0x9E)
167 #define BYTECODE_9F_IF_ICMPEQ (0x9F)
168 #define BYTECODE_A0_IF_ICMPNE (0xA0)
169 #define BYTECODE_A1_IF_ICMPLT (0xA1)
170 #define BYTECODE_A2_IF_ICMPGE (0xA2)
171 #define BYTECODE_A3_IF_ICMPGT (0xA3)
172 #define BYTECODE_A4_IF_ICMPLE (0xA4)
173 #define BYTECODE_A5_IF_ACMPEQ (0xA5)
174 #define BYTECODE_A6_IF_ACMPNE (0xA6)
175 #define BYTECODE_A7_GOTO (0xA7)
176 #define BYTECODE_A8_JSR (0xA8)
177 #define BYTECODE_A9_RET (0xA9)
178 #define BYTECODE_AA_TABLESWITCH (0xAA)
179 #define BYTECODE_AB_LOOKUPSWITCH (0xAB)
180 #define BYTECODE_AC_IRETURN (0xAC)
181 #define BYTECODE_AD_LRETURN (0xAD)
182 #define BYTECODE_AE_FRETURN (0xAE)
183 #define BYTECODE_AF_DRETURN (0xAF)
184 #define BYTECODE_B0_ARETURN (0xB0)
185 #define BYTECODE_B1_RETURN (0xB1)
186 #define BYTECODE_B2_GETSTATIC (0xB2)
187 #define BYTECODE_B3_PUTSTATIC (0xB3)
188 #define BYTECODE_B4_GETFIELD (0xB4)
189 #define BYTECODE_B5_PUTFIELD (0xB5)
190 #define BYTECODE_B6_INVOKEVIRTUAL (0xB6)
191 #define BYTECODE_B7_INVOKESPECIAL (0xB7)
192 #define BYTECODE_B8_INVOKESTATIC (0xB8)
193 #define BYTECODE_B9_INVOKEINTERFACE (0xB9)
194 #define BYTECODE_BA_INVOKEDYNAMIC (0xBA)
195 #define BYTECODE_BB_NEW (0xBB)
196 #define BYTECODE_BC_NEWARRAY (0xBC)
197 #define BYTECODE_BD_ANEWARRAY (0xBD)
198 #define BYTECODE_BE_ARRAYLENGTH (0xBE)
199 #define BYTECODE_BF_ATHROW (0xBF)
200 #define BYTECODE_C0_CHECKCAST (0xC0)
201 #define BYTECODE_C1_INSTANCEOF (0xC1)
202 #define BYTECODE_C2_MONITORENTER (0xC2)
203 #define BYTECODE_C3_MONITOREXIT (0xC3)
204 #define BYTECODE_C4_WIDE (0xC4)
205 #define BYTECODE_C5_MULTIANEWARRAY (0xC5)
206 #define BYTECODE_C6_IFNULL (0xC6)
207 #define BYTECODE_C7_IFNONNULL (0xC7)
208 #define BYTECODE_C8_GOTO_W (0xC8)
209 #define BYTECODE_C9_JSR_W (0xC9)
210 #define BYTECODE_CA_BREAKPOINT (0xCA)
211 #define BYTECODE_FE_IMPDEP1 (0xFE)
212 #define BYTECODE_FF_IMPDEP2 (0xFF)
213 
214 typedef enum {
220 } BytecodeType;
221 
222 typedef struct tableswitch_t {
228 
229 typedef struct lookupswitch_t {
233 
234 typedef struct bytecode_t {
235  char name[32];
240  st32 args[2];
241  ut32 type[2];
244  void *extra;
246 
247 #endif /* RZ_ASM_JAVA_BYTECODE_H */
struct lookupswitch_t LookupSwitch
struct bytecode_t Bytecode
struct tableswitch_t TableSwitch
BytecodeType
Definition: bytecode.h:214
@ BYTECODE_TYPE_INVALID
Definition: bytecode.h:215
@ BYTECODE_TYPE_CONST_POOL
Definition: bytecode.h:217
@ BYTECODE_TYPE_ATYPE
Definition: bytecode.h:219
@ BYTECODE_TYPE_ADDRESS
Definition: bytecode.h:218
@ BYTECODE_TYPE_NUMBER
Definition: bytecode.h:216
uint16_t ut16
uint32_t ut32
#define st32
Definition: rz_types_base.h:12
ut64 atype
Definition: bytecode.h:236
void * extra
Definition: bytecode.h:244
ut64 pc
Definition: bytecode.h:239
st32 stack_output
Definition: bytecode.h:243
ut16 opcode
Definition: bytecode.h:237
ut32 type[2]
Definition: bytecode.h:241
ut16 size
Definition: bytecode.h:238
st32 args[2]
Definition: bytecode.h:240
st32 stack_input
Definition: bytecode.h:242
ut32 pc_default
Definition: bytecode.h:230
Definition: z80asm.h:102
ut32 pc_default
Definition: bytecode.h:223
ut64(WINAPI *w32_GetEnabledXStateFeatures)()