Contents | Prev | Next | Index

lshl

Operation
Shift left

lshl
long

Forms
lshl = 121 (0x79)

Stack
..., value1.word1, value1.word2, value2 ..., result.word1, result.word2

Description
The value1 must be of type long and value2 must be of type int. The values are popped from the operand stack. A long result is calculated by shifting value1 left by s bit positions, where s is the low six bits of value2. The result is pushed onto the operand stack.

Notes
This is equivalent (even if overflow occurs) to multiplication by 2 to the power s. The shift distance actually used is therefore always in the range 0 to 63, inclusive, as if value2 were subjected to a bitwise logical AND with the mask value 0x3f.


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