[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Assembler Language Reference

lfs (Load Floating-Point Single) Instruction

Purpose

Loads a floating-point, single-precision number that has been converted to a floating-point, double-precision number into a floating-point register.

Syntax

lfs FRT,D(RA)

Description

The lfs instruction converts a floating-point, single-precision word in storage addressed by the effective address (EA) to a floating-point, double-precision word and loads the result into floating-point register (FPR) FRT.

If RA is not 0, the EA is the sum of the contents of GPR RA and D, a 16-bit, signed two's complement integer sign-extended to 32 bits. If RA is 0, then the EA is D.

The lfs instruction has one syntax form and does not affect the Floating-Point Status and Control Register or Condition Register Field 0.

Parameters

FRT Specifies target floating-point register where data is stored.
D 16-bit, signed two's complement integer sign-extended to 32 bits for EA calculation.
RA Specifies source general-purpose register for EA calculation.

Examples

The following code loads the single-precision contents of storage into FPR 6:

.csect data[rw]
storage: .float 0x1
# Assume GPR 5 contains the address csect data[rw].
.csect text[pr]
lfs 6,storage(5)
# FPR 6 now contains 0x3FF0 0000 0000 0000.

Related Information

Floating-Point Processor.

Floating-Point Load and Store Instructions.


[ Previous | Next | Contents | Home | Search ]