pstfs
Prefixed Store Floating-Point Single MLS:D-form
pstfs FRT,RA,RB
Stores a single-precision floating-point value from a register to memory.
Encoding
Binary Layout
000001
0:5
100
6:10
Rc
11
.//..
12:16
FRT
17:21
RA
22:26
RB
27:63
Operands
-
FRT
Target Floating-Point Register -
RA
Base General Purpose Register -
RB
Offset General Purpose Register
Example
pstfs f1, r4, r5
Related
More in Floating-Point
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
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.
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.