java.rs/src/opcodes.rs
2023-10-16 19:29:14 +02:00

138 lines
8.4 KiB
Rust

pub const NOP: u8 = 0; // (0x0) Do nothing
pub const ACONST_NULL: u8 = 1; // (0x01) Push null
pub const ICONST_M1: u8 = 2; // (0x2) Push int constant -1
pub const ICONST_0: u8 = 3; // (0x3) Push int constant 0
pub const ICONST_1: u8 = 4; // (0x4) Push int constant 1
pub const ICONST_2: u8 = 5; // (0x5) Push int constant 2
pub const ICONST_3: u8 = 6; // (0x6) Push int constant 3
pub const ICONST_4: u8 = 7; // (0x7) Push int constant 4
pub const ICONST_5: u8 = 8; // (0x8) Push int constant 5
pub const LCONST_0: u8 = 9; // (0x9) Push long constant 0
pub const LCONST_1: u8 = 10; // (0xa) Push long constant 1
pub const FCONST_0: u8 = 11; // (0xb) Push float 0
pub const FCONST_1: u8 = 12; // (0xc) Push float 1
pub const FCONST_2: u8 = 13; // (0xd) Push float 2
pub const DCONST_0: u8 = 14; // (0xe) push double 0
pub const DCONST_1: u8 = 15; // (0xe) push double 1
pub const BIPUSH: u8 = 16; // (0x10) Push byte
pub const SIPUSH: u8 = 17; // (0x11) Push short
pub const LDC: u8 = 18; // (0x12) Push item from run-time pub constant pool
pub const LDC_W: u8 = 19; // (0x13) Push item from run-time constant pool (wide index)
pub const LDC2_W: u8 = 20; // (0x14) Push long or double from run-time constant pool (wide index)
pub const ILOAD: u8 = 21; // (0x15) Load int from local variable
pub const LLOAD: u8 = 22; // (0x16) Load long from local variable
pub const FLOAD: u8 = 23; // (0x16) Load float from local variable
pub const DLOAD: u8 = 24; // (0x18) load double from local variable
pub const ALOAD: u8 = 25; // 0x19 Load reference from local variable
pub const ILOAD_0: u8 = 26; // (0x1a) Load int from local variable 0
pub const ILOAD_1: u8 = 27; // (0x1b) Load int from local variable 1
pub const ILOAD_2: u8 = 28; // (0x1c) Load int from local variable 2
pub const ILOAD_3: u8 = 29; // (0x1d) Load int from local variable 3
pub const LLOAD_0: u8 = 30; // (0x1e) Load long from local variable 0
pub const LLOAD_1: u8 = 31; // (0x1f) Load long from local variable 1
pub const LLOAD_2: u8 = 32; // (0x20) Load long from local variable 2
pub const LLOAD_3: u8 = 33; // (0x21) Load long from local variable 3
pub const FLOAD_0: u8 = 34; // (0x22) Load float from local variable 0
pub const FLOAD_1: u8 = 35; // (0x23) Load float from local variable 1
pub const FLOAD_2: u8 = 36; // (0x24) Load float from local variable 2
pub const FLOAD_3: u8 = 37; // (0x25) Load float from local variable 3
pub const DLOAD_0: u8 = 38; // (0x26) Load double from local variable 0
pub const DLOAD_1: u8 = 39; // (0x27) Load double from local variable 1
pub const DLOAD_2: u8 = 40; // (0x28) Load double from local variable 2
pub const DLOAD_3: u8 = 41; // (0x29) Load double from local variable 3
pub const ALOAD_0: u8 = 42; // (0x2a) Load reference from local variable 0
pub const ALOAD_1: u8 = 43; // (0x2b) Load reference from local variable 1
pub const ALOAD_2: u8 = 44; // (0x2c) Load reference from local variable 2
pub const ALOAD_3: u8 = 45; // (0x2d) Load reference from local variable 3
pub const IALOAD: u8 = 46; // (0x2e) Load int from array
pub const LALOAD: u8 = 47; // (0x2f) Load long from array
pub const FALOAD: u8 = 48; // (0x30) Load float from array
pub const DALOAD: u8 = 49; // (0x31) Load double from array
pub const AALOAD: u8 = 50; // (0x3d) Load reference from array
pub const BALOAD: u8 = 51; // (0x33) Load byte or boolean from array
pub const CALOAD: u8 = 52; // (0x34) Load char from array
pub const SALOAD: u8 = 53; // (0x34) Load short from array
pub const ISTORE: u8 = 54; // (0x36) Store int into local variable
pub const LSTORE: u8 = 55; // (0x37) Store long into local variable
pub const FSTORE: u8 = 56; // (0x38) Store float into local variable
pub const DSTORE: u8 = 57; // (0x39) store double in local variable
pub const ASTORE: u8 = 58; // (0x3a)
pub const ISTORE_0: u8 = 59; // (0x3b) Store int into local variable 0
pub const ISTORE_1: u8 = 60; // (0x3c) Store int into local variable 1
pub const ISTORE_2: u8 = 61; // (0x3d) Store int into local variable 2
pub const ISTORE_3: u8 = 62; // (0x3e) Store int into local variable 3
pub const LSTORE_0: u8 = 63; // (0x3f) Store long into local variable 0
pub const LSTORE_1: u8 = 64; // (0x40) Store long into local variable 1
pub const LSTORE_2: u8 = 65; // (0x41) Store long into local variable 2
pub const LSTORE_3: u8 = 66; // (0x42) Store long into local variable 3
pub const FSTORE_0: u8 = 67; // (0x43) Store float into local variable 0
pub const FSTORE_1: u8 = 68; // (0x44) Store float into local variable 1
pub const FSTORE_2: u8 = 69; // (0x45) Store float into local variable 2
pub const FSTORE_3: u8 = 70; // (0x46) Store float into local variable 3
pub const DSTORE_0: u8 = 71; // (0x47) store double in local variable 0
pub const DSTORE_1: u8 = 72; // (0x48) store double in local variable 1
pub const DSTORE_2: u8 = 73; // (0x49) store double in local variable 2
pub const DSTORE_3: u8 = 74; // (0x4a) store double in local variable 3
pub const ASTORE_0: u8 = 75; // (0x4b)
pub const ASTORE_1: u8 = 76; // (0x4c)
pub const ASTORE_2: u8 = 77; // (0x4d)
pub const ASTORE_3: u8 = 78; // (0x4e)
pub const IASTORE: u8 = 79; // (0x4f) Store into int array
pub const LASTORE: u8 = 80; // (0x50) Store into long array
pub const FASTORE: u8 = 81; // (0x51) Store into float array
pub const DASTORE: u8 = 82; // (0x52) store into double array
pub const AASTORE: u8 = 83; // (0x53) Store into object array
pub const BASTORE: u8 = 84; // (0x54) Store into byte or boolean array
pub const CASTORE: u8 = 85; // (0x55) Store into char array
pub const SASTORE: u8 = 86; // (0x56) Store into short array
pub const POP: u8 = 87; // (0x57) Pop the top operand stack value
pub const DUP: u8 = 89; // (0x59) duplicate the top operand stack value
pub const dup_x1: u8 = 90; // (0x5a) Duplicate the top operand stack value and insert two values down
pub const dup_x2: u8 = 91; // (0x5b) Duplicate the top operand stack value and insert two or three values down
pub const dup2: u8 = 92; // (0x5c) Duplicate the top one or two operand stack values
pub const dup2_x1: u8 = 93; //(0x5d) Duplicate the top one or two operand stack values and insert two or three values down
pub const dup2_x2: u8 = 94; // (0x5e) Duplicate the top one or two operand stack values and insert two, three, or four values down
pub const fadd: u8 = 98; // (0x62) Add float
pub const dadd: u8 = 99; // (0x63) add double
pub const dsub: u8 = 103; // (0x67) subtract double
pub const fmul: u8 = 106; // (0x6a) Multiply float
pub const dmul: u8 = 107; // (0x6b) Multiply double
pub const fdiv: u8 = 110; // (0x6e) Divide float
pub const ddiv: u8 = 111; // (0x6f) divide double
pub const frem: u8 = 114; // (0x72) Remainder float
pub const drem: u8 = 115; // (0x73) remainder double
pub const fneg: u8 = 118; // (0x76) Negate float
pub const dneg: u8 = 119; // (0x77) Negate double
pub const f2i: u8 = 139; // (0x8b) Convert float to int
pub const f2l: u8 = 140; // (0x8c) Convert float to long
pub const f2d: u8 = 141; // (0x8d) Convert float to double
pub const d2i: u8 = 142; // (0x8e) double to int
pub const d2l: u8 = 143; // (0x8f) double to long
pub const d2f: u8 = 144; // (0x90) double to float
pub const fcmpl: u8 = 149; // (0x95) Compare float (less than)
pub const fcmpg: u8 = 150; // (0x96) Compare float (greater than)
pub const dcmpl: u8 = 151; // (0x97) compare double (less than)
pub const dcmpg: u8 = 152; // (0x98) compare double (greater than)
pub const IRETURN: u8 = 172; // (0xac) ireturn
pub const FRETURN: u8 = 174; // (0xae) Return float from method
pub const DRETURN: u8 = 175; // (0xaf) Return double from method
pub const areturn: u8 = 176; //(0xb0) return reference
pub const RETURN_VOID: u8 = 177; // (0xb1) Return void from method (actually 'return' but that's a keyword)
pub const GETSTATIC: u8 = 178; // (0xb2) Get static field from class
pub const PUTSTATIC: u8 = 179; // (0xb3) Set static field in class
pub const GETFIELD: u8 = 180; // (0xb4) Fetch field from object3
pub const PUTFIELD: u8 = 181; // (0xb5) Set field in object
pub const INVOKEVIRTUAL: u8 = 182; // (0xb6) Invoke instance method; dispatch based on class
pub const INVOKESPECIAL: u8 = 183; // (0xb7) // nvoke instance method; direct invocation of instance initialization methods and methods of the current class and its supertypes
pub const INVOKESTATIC: u8 = 184; // (0xb8) Invoke a class (static) method
pub const NEW: u8 = 187; // (0xbb) Create new object
pub const ANEWARRAY: u8 = 189; // (0xbd)
pub const arraylength: u8 = 190; // (0xbe)
pub const athrow: u8 = 191; // (0xbf)
pub const checkcast: u8 = 192; // (0xc0)