JVM Tutorials - Herong's Tutorial Examples - v5.14, by Herong Yang
Shared Memory Instructions
This section describes JVM instructions that create new objects and load/store values from/to existing objects in shared memory: *aload, *astore, get*, pub* and *new*
What Are Shared Memory Instructions? Shared memory instructions create new objects or load/store values from/to existing objects in the shared memory area. Their mnemonics have a pattern of *aload, *astore, get*, pub* or *new*.
The table below describes shared memory instructions. P. is the count of bytes following the opcode as operation parameters. I. is the count elements consumed from the operand stack as operation input. O. is the count elements added to the operand stack as operation output.
Mnemonic C. P. I. O. Description ------------- -- -- -- -- ---------------------------------------- iaload 2E 0 2 1 Load int from given array and index laload 2F 0 2 2 Load long from given array and index faload 30 0 2 1 Load fload from given array and index daload 31 0 2 2 Load double from given array and index aaload 32 0 2 1 Load address from given array and index baload 33 0 2 1 Load byte from given array and index caload 34 0 2 1 Load char from given array and index saload 35 0 2 1 Load short from given array and index iastore 4F 0 3 0 Store int to given array and index lastore 50 0 4 0 Store long to given array and index fastore 51 0 3 0 Store fload to given array and index dastore 52 0 4 0 Store double to given array and index aastore 53 0 3 0 Store address to given array and index bastore 54 0 3 0 Store byte to given array and index castore 55 0 3 0 Store char to given array and index sastore 56 0 3 0 Store short to given array and index getstatic B2 2 0 V Get value from given static variable putstatic B3 2 V 0 Put value to given static variable getfield B4 2 0 V Get value from given instance variable putfield B5 2 V 0 Put value to given instance variable new BB 2 0 1 Create new instance of given class newarray BC 1 1 1 Create primitive array of given type anewarray BD 2 1 1 Create reference array of given class arraylength BE 0 1 1 Get array size of given array address instanceof C1 2 1 1 Compare address type with given class multinewarray C5 3 V 1 Create multi-dimension array
For *load and *store instructions, the array address and index are both taken from the operand stack, not as parameters. For an array storing instruction, the value to be stored is taken from the operand stack after the array address and index.
Table of Contents
JVM (Java Virtual Machine) Specification
Java HotSpot VM - JVM by Oracle/Sun
java.lang.Runtime Class - The JVM Instance
java.lang.System Class - The Operating System
ClassLoader Class - Class Loaders
Class Class - Class Reflections
JVM Stack, Frame and Stack Overflow
Thread Testing Program and Result
CPU Impact of Multi-Thread Applications
I/O Impact of Multi-Thread Applications
Micro Benchmark Runner and JVM Options
Micro Benchmark Tests on "int" Operations
Micro Benchmark Tests on "long" Operations
Micro Benchmark Tests in JIT Compilation Mode
Micro Benchmark Tests on "float" and "double" Operations
JRockit JVM 28.2.7 by Oracle Corporation
►JVM Bytecode and Instruction Set
Walkthrough of "javap -c -v" Command Output
Local Variable Array Instructions
Arithmetic Operation Instructions
Bitwise Operation Instructions
Method Invocation Instructions