stfsx

Store Floating-Point Single Indexed X-form

stfsx FRS,RA,RB

Stores a single-precision floating-point value from a register to memory using an indexed address.

Details

The contents of register FRS are converted to single format and stored into the word in storage addressed by EA, which is the sum of RA (or RA|0) and RB. If RA is not zero, it is used directly; otherwise, b is set to zero.

Pseudocode Operation

if RA = 0 then
    b ← 0
else
    b ← (RA)
EA ← b + (RB)
MEM(EA, 4) ← SINGLE((FRS))

Programming Note

The stfsx instruction stores a single-precision floating-point value from register FRS to memory. Ensure that the base address (RA or RA|0) and offset (RB) are correctly aligned for optimal performance. If RA is zero, the effective address is solely determined by RB; otherwise, it's the sum of RA and RB. This instruction operates at user privilege level.

Example

stfsx f1, r4, r5

Encoding

Binary Layout
0
0
FRS
16
RA
21
RB
26
 
Format X-form
Opcode 0x7C00052E
Extension Floating-Point
Registers Altered FPSCR

Operands

  • FRS
    Floating-Point Register Source
  • RA
    General Purpose Register (Base Address)
  • RB
    General Purpose Register (Index)