Contents | Prev | Next | Index

ldc2_w

Operation
Push long or double from constant pool

ldc2_w
indexbyte1
indexbyte2
(wide index)

Forms
ldc2_w = 20 (0x14)

Stack
... ..., item.word1, item.word2

Description
The unsigned indexbyte1 and indexbyte2 are assembled into an unsigned 16-bit index into the constant pool of the current class (§3.6), where the value of the index is calculated as (indexbyte1 << 8) | indexbyte2. The index must be a valid index into the constant pool of the current class. The constant pool entry at the index must be a CONSTANT_Long (§4.4.5) or CONSTANT_Double (§4.4.5). The constant pool entry is resolved (§5.5). The entry must contain a numeric item which is pushed onto the operand stack as a long or double, respectively.

Notes
Only a wide-index version of the ldc2_w instruction exists; there is no ldc2 instruction that pushes a long or double with a single-byte index.


Contents | Prev | Next | Index

Java Virtual Machine Specification (HTML generated by dkramer on February 25, 1997)
Copyright © 1996 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to doug.kramer@sun.com