FLD1/FLDL2T/FLDL2E/FLDPI/FLDLG2/FLDLN2/FLDZ

Load Constant

Opcodes

Hex Mnemonic Encoding Long Mode Legacy Mode Description
D9 EE FLDZ None Valid Valid Push +0.0 onto the FPU register stack.
D9 ED FLDLN2 None Valid Valid Push loge2 onto the FPU register stack.
D9 EC FLDLG2 None Valid Valid Push log102 onto the FPU register stack.
D9 EB FLDPI None Valid Valid Push  onto the FPU register stack.
D9 EA FLDL2E None Valid Valid Push log2e onto the FPU register stack.
D9 E9 FLDL2T None Valid Valid Push log210 onto the FPU register stack.
D9 E8 FLD1 None Valid Valid Push +1.0 onto the FPU register stack.

Description

Push one of seven commonly used constants (in double extended-precision floating-point format) onto the FPU register stack. The constants that can be loaded with these instructions include +1.0, +0.0, log<sub>2</sub>(10), log<sub>2</sub>(e), π, log<sub>10</sub>(2), and log<sub>e</sub>(2). For each constant, an internal 66-bit constant is rounded (as specified by the RC field in the FPU control word) to double extended-precision floating-point format. The inexact-result exception (#P) is not generated as a result of the rounding, nor is the C1 flag set in the x87 FPU status word if the value is rounded up.

See the section titled "Pi" in Chapter 8 of the Intel®64 and IA-32 Architectures Software Developer's Manual, Volume 1, for a description of the π constant.

This instruction's operation is the same in non-64-bit modes and 64-bit mode.

Pseudo Code

TOP = TOP - 1;
ST(0) = CONSTANT;

FPU Flags Affected

C1: Set to 1 if stack overflow occurred; otherwise, set to 0. C0, C2, C3 are undefined.

Exceptions

Floating-Point Exceptions

Exception Description
#IS Stack overflow occurred.

64-Bit Mode Exceptions

Same exceptions as in protected mode.

Compatibility Mode Exceptions

Same exceptions as in protected mode.

Virtual-8086 Mode Exceptions

Same exceptions as in protected mode.

Real-Address Mode Exceptions

Same exceptions as in protected mode.

Protected Mode Exceptions

Exception Description
#UD If the LOCK prefix is used.
#MF If there is a pending x87 FPU exception.
#NM CR0.EM[bit 2] or CR0.TS[bit 3] = 1.