stfs

Store Floating-Point Single D-form

stfs FRS,D(RA)

Stores a single-precision floating-point value from an FPR to memory.

Details

The contents of register FRS are converted to single format and stored into the word in storage addressed by EA. The effective address (EA) is the sum of the contents of register RA, or the value 0 if RA=0, and the value D, sign-extended to 64 bits.

Pseudocode Operation

EA ← (RA|0) + EXTS64(D)
MEM(EA, 4) ← SINGLE((FRS))

Programming Note

The stfs instruction stores a single-precision floating-point value from FRS into memory. Ensure that the destination address is properly aligned to avoid alignment faults. The instruction operates at user privilege level and may raise an exception if the EA exceeds the storage limits or if there are access violations.

Example

stfs f1, 0(r4)

Encoding

Binary Layout
101000
0
FRS
16
D
11
RA
21
 
Format DS-form
Opcode 0xD0000000
Extension Floating-Point
Registers Altered FPSCR

Operands

  • FRS
    Source Floating-Point Register
  • D
    Displacement field
  • RA
    Base General Purpose Register