FYL2XP1

计算y 对数2(x+1)

stableVMJITAOTinstruction

编码

操作码指令Op/En64 位兼容/传统说明
D9 F9FYL2XP1有效有效将ST(1)替换为ST(1) log2(ST(0)+1.0),并弹出寄存器堆栈.

实测开销

正在从 arch-data 加载实测数据...

说明

计算(ST(1) log2(ST(0) + 1.0)),将结果存储于寄存器ST(1),并弹出FPU寄存器堆栈. ST( 0) 中的 源操作数 必须是在 :

     (1  2 / 2) )to(1  2 / 2)

ST(1)中的源操作数可以从-到+. 如果ST(0)操作数超出其可接受范围,则结果未定义,软件不应依赖生成例外. 在某些情况下,ST(0)超出范围时可能会产生例外,但这种行为是具体的执行,没有保证.

下表显示在使用各类数字的对数epsilon时获得的结果,假设不存在下流.

FYL2XP1 Results

-(1 - (2 / 2 )) to -0-0+0+0 to +(1 - (2 / 2 ))纳恩
+**-纳恩
+F+0-0-F纳恩
+0+0-0-0纳恩
-0-0+0+0纳恩
-F-0+0+F纳恩
-**+纳恩
纳恩纳恩纳恩纳恩纳恩

行动

ST(1) := ST(1)  log2(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.

浮点 例外

#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.

异常

保护模式
#NMCR0.EM[bit 2] 或 CR0.TS[bit 3] = 1.
#MF如果存在待决的x87 FPU例外.
#UD如果使用 LOCK 前缀 。
实地址模式
与保护模式中的例外相同.
虚拟 8086 模式
与保护模式中的例外相同.
兼容模式
与保护模式中的例外相同.
64 位模式
与保护模式中的例外相同.

来源