∟Miscellaneous Instructions

This section describes some miscellaneous JVM instructions: nop, pop, dup* and swap.

The table below describes some miscellaneous 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
---------------  --  --  --  --  ----------------------------------------
nop              00   0   0   0  No operation
pop              57   0   1   0  Pop off 1 entry from stack
pop2             58   0   2   0  Pop off 2 entries from stack
dup              59   0   1   2  Duplicate 1 entry on the stack
dup_x1           5A   0   1   2  dup + move duplicate down by 1
dup_x2           5B   0   1   2  dup + move duplicate down by 2
dup2             5C   0   2   4  Duplicate 2 entries on the stack
dup_x1           5D   0   2   4  dup2 + move duplicates down by 1
dup_x2           5E   0   2   4  dup2 + move duplicates down by 2
swap             5F   0   2   2  Swap 2 entries in the stack
wide             C4   V   V   V  Wide variable index of next opcode

Table of Contents

 About This Book

 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 Runtime Data Areas

 JVM Stack, Frame and Stack Overflow

 Thread Testing Program and Result

 CPU Impact of Multi-Thread Applications

 I/O Impact of Multi-Thread Applications

 CDS (Class Data Sharing)

 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

 OpenJ9 by Eclipse Foundation

 JRockit JVM 28.2.7 by Oracle Corporation

►JVM Bytecode and Instruction Set

 What Is JVM Bytecode

 What Is "javap" Command

 Walkthrough of "javap -c -v" Command Output

 JVM Method Frame Architecture

 What Is Constant Pool

 JVM Instruction Set

 Constant Loading Instructions

 Local Variable Array Instructions

 Shared Memory Instructions

 Arithmetic Operation Instructions

 Bitwise Operation Instructions

 Type Conversion Instructions

 Flow Control Instructions

 Method Invocation Instructions

►Miscellaneous Instructions

 JVM Assembler/Disassembler Tools

 Archived Tutorials

 References

 Index

 Full Version in PDF/EPUB