5.8.1. FLD pseudo-instruction

The FLD pseudo-instruction loads a VFP floating-point register with a single-precision or double-precision floating-point constant.

Note

You can use FLD only if the command-line option --fpu is set to vfpv2.

This section describes the FLD pseudo-instruction only. See FLD and FST for information on the FLD instruction.

Syntax

FLD<precision>{cond} fp-register,=fp-literal

where:

<precision>

can be S for single-precision, or D for double-precision.

cond

is an optional condition code.

fp-register

is the floating-point register to be loaded.

fp-literal

is a single-precision or double-precision floating-point literal (see Floating-point literals).

Usage

The assembler places the constant in a literal pool and generates a program-relative FLD instruction to read the constant from the literal pool. One word in the literal pool is used to store a single-precision constant. Two words are used to store a double-precision constant.

The offset from the PC to the constant must be less than 1KB. You are responsible for ensuring that there is a literal pool within range. See LTORG for more information.

Examples

        FLDD    d1,=3.12E106    ; loads 3.12E106 into d1
        FLDS    s31,=3.12E-16   ; loads 3.12E-16 into s31
Copyright © 2002-2005 ARM Limited. All rights reserved.ARM DUI 0204F
Non-Confidential