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.

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

pstfs f1, r4, r5

Encoding

Binary Layout
000001
0
100
6
Rc
11
.//..
12
FRT
17
RA
22
RB
27
 
Format MLS:D-form
Opcode 0x3C000000
Extension Floating-Point

Operands

  • FRT
    Target Floating-Point Register
  • RA
    Base General Purpose Register
  • RB
    Offset General Purpose Register