mtfsfi
Move To FPSCR Field Immediate
mtfsfi BF, U
Writes a 4-bit immediate to a specific FPSCR field.
Encoding
Binary Layout
63
0:5
BF
6:10
/
11:15
U
16:20
134
21:30
/
31
Operands
-
BF
Field Index -
U
Immediate
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
Writes a 4-bit immediate value U into a 4-bit field of the FPSCR selected by BF. The target FPSCR field is at bits [4×BF : 4×BF+3]. This instruction directly modifies FPSCR state and may affect subsequent floating-point operations.
Operation
FPSCR[4*BF : 4*BF+3] ← U
Programming Note
Use mtfsfi to directly manipulate specific fields in the FPSCR, such as enabling or disabling exceptions. Ensure the immediate value fits within the specified field size to avoid undefined behavior. This instruction operates at user privilege level and does not generate exceptions for valid immediate values.