lushr 0x7d
Logical-shifts right two longs on top of the stack; pushes the result.
- Opcode
0x7d(125)- Family
- Arithmetic and bitwise
- Operands
- none
- Length
- 1 byte
- Operand stack
…, value1 (long), value2 (int) → …, result (long)- Can throw
- nothing at run time (beyond linking errors)
What it does
x >>> n on a long: shifts right, filling with zeros (logical shift). The shift distance is always an int, and only its low 6 bits are used: 1L << 64 is 1, not 0.
How often javac uses it
In JDK 25.0.5's java.base module, lushr appears 429 times in 80 of its 7,391 classes: 0.02% of all instructions, the 127th most common of 194 opcodes in use. Some of the methods that use it: java.lang.invoke.LambdaFormEditor$TransformKey.toString, java.lang.Long.toUnsignedString, java.lang.Math.multiplyExact, java.math.BigDecimal.hashCode.
Example
From the sample classes, compiled by javac 25 with -g. Each Java line is shown above the bytecode it compiled to; lushr is highlighted.
static long longs(long a, long b) in Tour, compiled by javac 25Related instructions
iushr Logical-shifts right two ints on top of the stack; pushes the result.
Specification: JVMS §6.5, lushr (Java SE 25).