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.

Encoding

Binary Layout
48
0:5
FRT
6:10
RA
11:15
D
16:31
 
Format D-form
Opcode 0xC0000000
Extension Floating-Point

Operands

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

Example

lfs f1, 0(r4)

Registers Altered

None, FPSCR

Related

More in Floating-Point

Reference

Description

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.

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.