pstfs
Prefixed Store Floating-Point Single MLS:D-form
Stores a single-precision floating-point value from a register to memory.
Details
The double-precision floating-point value in register FRS is converted to single-precision and stored as a 32-bit single-precision value at the effective address (EA). The EA is formed by adding the sign-extended 34-bit immediate displacement D to the contents of general-purpose register RA (or zero if RA=0). This is the prefixed form of the stfs instruction, allowing a larger displacement field than the non-prefixed variant.
Pseudocode Operation
EA ← (RA|0) + D
MEM(EA, 4) ← SINGLE(FRS)
Programming Note
The pstfs instruction is useful for storing single-precision floating-point values with an extended displacement. Ensure that the EA calculation does not result in an invalid memory address to avoid exceptions. This instruction operates at user privilege level and requires proper alignment of the EA for optimal performance.
Example
Encoding
Operands
-
FRT
Target Floating-Point Register -
RA
Base General Purpose Register -
RB
Offset General Purpose Register