return
Purpose
Return from a single-width (32-bit) non-object value-returning method.
Details
Op & Format |
Mnemonic / Syntax |
Arguments |
0f 11x |
return vAA |
A: return value register (8 bits) |
Constraints
-
The return type of the current method must not be double, long, or a
reference.
-
A must be a valid register index in the current stack frame.
-
Register vA must not be part of a register pair.
-
The type of vA must match the return type of the method.
Behavior
-
If the method is synchronized, the object's monitor is released in a way
similar to the monitor-exit instruction.
-
The stack frame of the current method invocation is removed from the stack.
This includes all its registers becoming invalid.
-
If the stack is now empty, the current thread terminates.
-
Otherwise, the following happens:
-
The stack frame that caused this method invocation becomes valid. This
includes all its registers and their old values.
-
Execution continues at the bytecode instruction immediately following
the invoke-kind or invoke-kind/range instruction that caused this
method invocation.
-
The return value can be consumed by (exactly) the first instruction
following the invoke-kind or invoke-kind/range instruction that caused
this method invocation, and this instructions needs to be a move-result
instruction.
Exceptions
None.