lfs

Load Floating-Point Single D-form

lfs FRT,D(RA)

Loads a single-precision floating-point value from memory into a floating-point register and converts it to double precision.

Details

Loads a single-precision floating-point value from memory at address RA+D, converts it to double precision, and stores the result in FRT. This instruction is part of the Floating-Point category and does not affect condition registers or the XER.

Pseudocode Operation

EA ← (RA = 0 ? 0 : GPR(RA)) + EXTS(D)
FPR(FRT) ← ConvertSingleToDouble([EA])

Programming Note

The lfs extended mnemonic permits computing an effective address as a Load or Store instruction would, but loads the address itself into a GPR rather than loading the value that is in storage at that address.

Example

lfs f1, 0(r4)

Encoding

Binary Layout
48
0
FRT
6
RA
11
D
16
 
Format D-form
Opcode 0xC0000000
Extension Floating-Point
Registers Altered None, FPSCR

Operands

  • FRT
    Target Floating-Point Register
  • RA
    Base General Purpose Register
  • D
    Displacement
  • offset
    Immediate Offset