freturn 0xae
Returns the float on top of the stack from the method.
- Opcode
0xae(174)- Family
- Returns
- Operands
- none
- Length
- 1 byte
- Operand stack
…, value (float) → …, (empty: the frame is gone)- Can throw
IllegalMonitorStateException
What it does
Returns the float on top of the stack to the caller, which finds it on its own operand stack.
The IllegalMonitorStateException is for a synchronized method whose monitor is no longer held, which javac never produces.
How often javac uses it
In JDK 25.0.5's java.base module, freturn appears 305 times in 75 of its 7,391 classes: 0.02% of all instructions, the 134th most common of 194 opcodes in use. Some of the methods that use it: java.io.DataInputStream.readFloat, java.io.ObjectInputStream.readFloat, java.io.ObjectInputStream$BlockDataInputStream.readFloat, java.io.ObjectInputStream$FieldValues.get.
Example
From the sample classes, compiled by javac 25 with -g. Each Java line is shown above the bytecode it compiled to; freturn is highlighted.
static float floats(float a, float b) in Tour, compiled by javac 25Related instructions
ireturn Returns the int on top of the stack from the method.areturn Returns the reference on top of the stack from the method.return Returns from a void method.
Specification: JVMS §6.5, freturn (Java SE 25).