Data Types (13)Type | Range | Description | boolean | {0,1} | Z | byte | -27 to 27 -1, inclusive | B | short | -215 to 215-1, inclusive | S | int | -231 to 231-1, inclusive | I | long | -263 to 263-1, inclusive | L | char | 16 bit unsigned Unicode (0 to 216 -1) | C | float | 32-bit IEEE 754 single-precision float | F | double | 64-bit IEEE 754 double-precision float | D | returnAddress | address of an opcode within the same method | class reference | | Lclass-name; | interface reference | | Linter-name | array reference | | [[..[component type] | void | | V |
Type Conversion Instructionsi2l, i2f, i2d, l2f, l2d, and f2d | Only i2f is used in MP compiler |
Operand Stack Management Instructionsdup, pop,dup2, pop2, swap |
Object Creation and ManipulationCreate a new class instance | new | Create a new array | newarray, anewarray, multianewarray | Access field of classes ( staticfield/class variables) and field of class instanes (non-static fields, known as instance variables) | getfield, putfield, getstatic, putstatic | Load an array component onto the operand stack | <T>aload | Store a value from the operand stack as an array component | <T>astore |
| | Jasmin Instructions (10)Arithmetic Instructions | Load and store instructions | Control transfer instructions | Type conversion instructions | Operand stack management instructions | Object creation and manipulation | Method invocation instructions | Throwing instructions (not used) | Implemeneting finally (not used) | Synchoronisation (not used) |
Load and StoreLoad a loadcal variable onto the operand stack | Store a value from the operand stack into a local variable | <T>aload -> T:b,s,i,l,f,d,c,a | <T>astore -> T: b,s,i,l,f,d,c,a |
Load and Store (cont) | Value | bipush | int const, -27 to 27-1 | sipush | int const, -215 to 215-1 | ldc | int, float, quote string const | ldc_w | long,double const | ldc2_w | long, double const | aconst_null | null | iconst_m1 | -1 | iconst_<i> | 0,...,5 | lconst_<l> | 0,1 | fconst_<f> | 0.0, 1.0 and 2.0 | dconst_<d> | 0.0, 1.0 |
Method Invocation Instructionsinvokestatic | invokevitual | invokespecial | invokeinterface <method-spec> <num-args> |
| | Arithmetic InstructionsAdd | iadd, ladd, fadd, dadd | Subtract | isub, lsub, fsub, dsub | Multiply | imul, lmul, fmul, dmul | Divide | idiv, ldiv, fdiv, ddiv | Remainder | irem, lrem, frem, drem | Shift | ishl, ishr, iushr, lshl, lshr, lushr | Bitwise OR | ior, lor | Bitwise AND | iand, land | Bitwise exclusive OR | ixor, lxor | Local variable increment | iinc | Comparision | dcmpg, dcmpl, fcmpg, fcmpl, Icmp. |
Control Transfer InstructionsUnconditional branch | goto, goto_w, jsr, jsr_w, ret | Conditional branch | ifeq, iflt, ifle, ifne, ifgt, ifge | compare an int to zero | | ifnull, ifnonnull | compare a ref to null | | if_icmpeq, if_icmpne, if_icmplt, if_icmpgt, if_icmple,if_icmpge | compare two integers | | if_acmpeq_ if_acmpne | compare two references | Compund conditional branch | tableswitch, lookupswitch |
Jasmin Directives.source <source.java> | .class < the current class> | .super < the super class> | .limit | .method < the method description> | .field <the field description> | .end | .var < the variable description> | .line < the line number in source code> |
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment