lmul 0x69
Multiplies two longs on top of the stack; pushes the result.
- Opcode
0x69(105)- Family
- Arithmetic and bitwise
- Operands
- none
- Length
- 1 byte
- Operand stack
…, value1 (long), value2 (long) → …, result (long)- Can throw
- nothing at run time (beyond linking errors)
What it does
a * b on two longs: pops b, then a, and pushes the result.
Overflow wraps around silently, as in Java. Math.multiplyExact is the version that throws.
How often javac uses it
In JDK 25.0.5's java.base module, lmul appears 4,632 times in 122 of its 7,391 classes: 0.24% of all instructions, the 62nd most common of 194 opcodes in use. Some of the methods that use it: java.lang.foreign.SegmentAllocator.allocateNoInit, java.lang.Long.toUnsignedString, java.lang.Math.multiplyExact, java.lang.runtime.Carriers$CarrierObject.offsetToLong.
Examples
From the sample classes, compiled by javac 25 with -g. Each Java line is shown above the bytecode it compiled to; lmul is highlighted.
static long longs(long a, long b) in Tour, compiled by javac 25static long mix(long a, int b, short c, byte d, double e, float f, char g, boolean h) in Numbers, compiled by javac 25Related instructions
imul Multiplies two ints on top of the stack; pushes the result.fmul Multiplies two floats on top of the stack; pushes the result.dmul Multiplies two doubles on top of the stack; pushes the result.
Specification: JVMS §6.5, lmul (Java SE 25).