Contents | Prev | Next | Index

lushr

Operation
Logical shift right long

lushr

Forms
lushr = 125 (0x7d)

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 right logically (with zero extension) by the amount indicated by the low six bits of value2. The result is pushed onto the operand stack.

Notes
If value1 is positive and s is value2 & 0x3f, the result is the same as that of value1 >> s; if value1 is negative, the result is equal to the value of the expression (value1 >> s) + (2L << ~s). The addition of the (2L << ~s) term cancels out the propagated sign bit. The shift distance actually used is always in the range 0 to 63, inclusive.


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