iushr 0x7c

Logical-shifts right two ints on top of the stack; pushes the result.

Opcode
0x7c (124)
Family
Arithmetic and bitwise
Operands
none
Length
1 byte
Operand stack
…, value1 (int), value2 (int) → …, result (int)
Can throw
nothing at run time (beyond linking errors)

What it does

x >>> n on an int: shifts right, filling with zeros (logical shift). The shift distance is always an int, and only its low 5 bits are used: 1 << 32 is 1, not 0.

How often javac uses it

In JDK 25.0.5's java.base module, iushr appears 861 times in 187 of its 7,391 classes: 0.04% of all instructions, the 114th most common of 194 opcodes in use. Some of the methods that use it: java.io.RandomAccessFile.writeShort, java.lang.Character.isValidCodePoint, java.lang.CharacterData.of, java.lang.CharacterName.getName.

Example

From the sample classes, compiled by javac 25 with -g. Each Java line is shown above the bytecode it compiled to; iushr is highlighted.

static int ints(int a, int b) in Tour, compiled by javac 25
… 20 instructions before
12x = (x << 3) | (x >> 2) ^ (x >>> 1) & 0xff;
21iload_2 // x
23ishr
24iload_2 // x
27sipush 255
30iand
31ixor
32ior
33istore_2 // x
13return ~x;
34iload_2 // x
… 3 instructions after

Open in the viewer

Related instructions

lushr Logical-shifts right two longs on top of the stack; pushes the result.

Specification: JVMS §6.5, iushr (Java SE 25).