FPREM1
部分残存
stableVMJITAOTinstruction
编码
| 操作码 | 指令 | Op/En | 64 位 | 兼容/传统 | 说明 |
|---|---|---|---|---|---|
D9 F5 | FPREM1 | 有效 | 有效 | 将ST(0)改为从ST(0)除以ST(1)获得的IEEE余量。 |
实测开销
正在从 arch-data 加载实测数据...
说明
计算通过将ST(0)登记册中的值(红利)除以ST(1)登记册中的值(divisor或modulus)而获得的IEEE剩余部分,并将结果存储在ST(0)中. 其余价值如下:
Remainder := ST(0) - (Q ST(1))这里,Q是一个整数值,通过将[ST(0) / ST(1)]的浮点数乘以最近的整数值四舍五入获得。 其余部分的幅度小于或等于模数的一半,除非部分剩余部分被计算出来(见下文)。
本指令产生准确结果;精确(不精确)例外不发生,四舍五入控制无效果. 下表显示计算各类数字剩余部分时获得的结果,假设不存在下流.
FPREM1 Results
| ST(0) | -F | ST(0) | +/-F or -0 | * | * | +/- F or - 0 | ST(0) | 纳恩 |
|---|---|---|---|---|---|---|---|---|
| -0 | -0 | -0 * | * | -0 | -0 | 纳恩 | ||
| +0 | +0 | +0 * | * | +0 | +0 | 纳恩 | ||
| +F | ST(0) | +/- F or + 0 | * | * | +/- F or + 0 | ST(0) | 纳恩 | |
| + | * | * | * | * | 纳恩 |
行动
D := exponent(ST(0)) exponent(ST(1));
IF D < 64
THEN
Q := Integer(RoundTowardNearestInteger(ST(0) / ST(1)));
ST(0) := ST(0) (ST(1) Q);
C2 := 0;
C0, C3, C1 := LeastSignificantBits(Q); (* Q2, Q1, Q0 *)
ELSE
C2 := 1;
N := An implementation-dependent number between 32 and 63;
QQ := Integer(TruncateTowardZero((ST(0) / ST(1)) / 2(D - N)));
ST(0) := ST(0) (ST(1) QQ 2(D - N));
FI;
FPU Flags Affected
C0 Set to bit 2 (Q2) of the quotient.
C1 Set to 0 if stack underflow occurred; otherwise, set to least significant bit of quotient (Q0).
C2 Set to 0 if reduction complete; set to 1 if incomplete.
C3 Set to bit 1 (Q1) of the quotient.浮点 例外
#IS Stack underflow occurred.#IA Source operand is an SNaN value, modulus (divisor) is 0, dividend is , or unsupportedformat.
#D Source operand is a denormal value.#U Result is too small for destination format.异常
保护模式
#NM | CR0.EM[bit 2] 或 CR0.TS[bit 3] = 1. |
#MF | 如果存在待决的x87 FPU例外. |
#UD | 如果使用 LOCK 前缀 。 |
实地址模式
| 与保护模式中的例外相同. |
虚拟 8086 模式
| 与保护模式中的例外相同. |
兼容模式
| 与保护模式中的例外相同. |
64 位模式
| 与保护模式中的例外相同. |