lfsx

Load Floating-Point Single Indexed X-form

lfsx FT,RA,RB

Loads a single-precision floating-point value from memory into a floating-point register.

Encoding

Binary Layout
011111
0:5
FT
6:8
RA
9:10
RB
11:15
10000
16:20
10111
21:30
Rc
31
 
Format X-form
Opcode 0x7C00042E
Extension Floating-Point

Operands

  • FT
    Target Floating-Point Register
  • RA
    Index General Purpose Register
  • RB
    Base General Purpose Register

Example

lfsx f1, r4, r5

Registers Altered

CR0, FPSCR

Related

More in Floating-Point

Reference

Description

Loads a single-precision floating-point value from memory into a floating-point register using indexed addressing. The effective address is computed as RA + RB. If RA is 0, the address is simply RB. The instruction does not affect condition registers or exception flags; any floating-point exceptions are determined by the loaded value itself.

Operation

EA ← (RA = 0) ? RB : RA + RB
FT ← [EA:EA+3]

Programming Note

The lfsx instruction is commonly used to load single-precision floating-point values from memory into a floating-point register. Ensure that the base and index registers contain valid addresses, and be aware of potential alignment issues that may affect performance or cause exceptions. This instruction operates at user privilege level.