beautypg.com

Intel 253666-024US User Manual

Page 480

background image

3-434 Vol. 2A

FYL2XP1—Compute y * log2(x +1)

INSTRUCTION SET REFERENCE, A-M

equation is used to calculate the scale factor for a particular logarithm base, where n
is the logarithm base desired for the result of the FYL2XP1 instruction:

scale factor ← log

n

2

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

Operation

ST(1) ← ST(1)

log

2

(ST(0) + 1.0);

PopRegisterStack;

FPU Flags Affected

C1

Set to 0 if stack underflow occurred.
Set if result was rounded up; cleared otherwise.

C0, C2, C3

Undefined.

Floating-Point Exceptions

#IS

Stack underflow occurred.

#IA

Either operand is an SNaN value or unsupported format.

#D

Source operand is a denormal value.

#U

Result is too small for destination format.

#O

Result is too large for destination format.

#P

Value cannot be represented exactly in destination format.

Protected Mode Exceptions

#NM

CR0.EM[bit 2] or CR0.TS[bit 3] = 1.

#MF

If there is a pending x87 FPU exception.

#UD

If the LOCK prefix is used.

Real-Address Mode Exceptions

Same exceptions as in protected mode.

Virtual-8086 Mode Exceptions

Same exceptions as in protected mode.

Compatibility Mode Exceptions

Same exceptions as in protected mode.

64-Bit Mode Exceptions

Same exceptions as in protected mode.