fmul 0x6a
Multiplies two floats on top of the stack; pushes the result.
- Opcode
0x6a(106)- Family
- Arithmetic and bitwise
- Operands
- none
- Length
- 1 byte
- Operand stack
…, value1 (float), value2 (float) → …, result (float)- Can throw
- nothing at run time (beyond linking errors)
What it does
a * b on two floats: pops b, then a, and pushes the result.
How often javac uses it
In JDK 25.0.5's java.base module, fmul appears 43 times in 18 of its 7,391 classes: <0.01% of all instructions, the 170th most common of 194 opcodes in use. Some of the methods that use it: java.io.ObjectOutputStream$HandleTable.<init>, java.lang.Float.float16ToFloat, java.lang.Math.fma, java.math.BigDecimal.floatValue.
Example
From the sample classes, compiled by javac 25 with -g. Each Java line is shown above the bytecode it compiled to; fmul is highlighted.
static float floats(float a, float b) in Tour, compiled by javac 25Related instructions
imul Multiplies two ints on top of the stack; pushes the result.lmul Multiplies two longs on top of the stack; pushes the result.dmul Multiplies two doubles on top of the stack; pushes the result.
Specification: JVMS §6.5, fmul (Java SE 25).