fload_1 0x23
Pushes the float in local variable 1.
- Opcode
0x23(35)- Family
- Loads
- Operands
- none
- Length
- 1 byte
- Operand stack
… → …, value (float)- Can throw
- nothing at run time (beyond linking errors)
- Spec name
fload_<n>
What it does
Pushes the float in local variable 1.
Slots 0 to 3 each have a one-byte instruction; the general fload takes a one-byte slot number, and wide extends that to two bytes.
How often javac uses it
In JDK 25.0.5's java.base module, fload_1 appears 158 times in 51 of its 7,391 classes: <0.01% of all instructions, the 148th most common of 194 opcodes in use. Some of the methods that use it: java.io.DataOutputStream.writeFloat, java.io.ObjectInputStream$BlockDataInputStream.readFloat, java.io.ObjectOutputStream.writeFloat, java.io.ObjectOutputStream$BlockDataOutputStream.writeFloat.
Examples
From the sample classes, compiled by javac 25 with -g. Each Java line is shown above the bytecode it compiled to; fload_1 is highlighted.
static boolean floatLess(float a, float b) in Compare, compiled by javac 25static float floats(float a, float b) in Tour, compiled by javac 25Related instructions
fstore_1 Pops a float into local variable 1.fload Pushes the float in local variable (operand).wide Makes the next instruction take a two-byte local index (and a two-byte iinc constant).
Specification: JVMS §6.5, fload_<n> (Java SE 25).