3:86
Volume 3: Instruction Reference
fms
fms — Floating-point Multiply Subtract
Format:
(
qp
) fms.
pc
.
sf f
1
=
f
3
,
f
4
,
f
2
Description:
The product of FR
f
3
and FR
f
4
is computed to infinite precision and then FR
f
2
is
subtracted from this product, again in infinite precision. The resulting value is then
rounded to the precision indicated by
pc
(and possibly FPSR.
sf
.
pc
and FPSR.
sf
.
wre
)
using the rounding mode specified by FPSR.
sf
.
rc
. The rounded result is placed in FR
f
1
.
If any of FR
f
3
, FR
f
4
, or FR
f
2
is a NaTVal, a NaTVal is placed in FR
f
1
instead of the
computed result.
If
f
2
is f0, an IEEE multiply operation is performed instead of a multiply and subtract.
See “fmpy — Floating-point Multiply” on page 3:85.
The mnemonic values for the opcode’s
pc
are given in
. The
mnemonic values for
sf
are given in
. For the encodings and
interpretation of the status field’s
pc
,
wre
, and
rc
, refer to
Operation:
if (PR[
qp
]) {
fp_check_target_register(
f
1
);
if (tmp_isrcode = fp_reg_disabled(
f
1
,
f
2
,
f
3
,
f
4
))
disabled_fp_register_fault(tmp_isrcode, 0);
if (fp_is_natval(FR[
f
2
]) || fp_is_natval(FR[
f
3
]) ||
fp_is_natval(FR[
f
4
])) {
FR[
f
1
] = NATVAL;
fp_update_psr(
f
1
);
} else {
tmp_default_result = fms_fnma_exception_fault_check(
f
2
,
f
3
,
f
4
,
pc, sf,
&tmp_fp_env);
if (fp_raise_fault(tmp_fp_env))
fp_exception_fault(fp_decode_fault(tmp_fp_env));
if (fp_is_nan_or_inf(tmp_default_result)) {
FR[
f
1
] = tmp_default_result;
} else {
tmp_res = fp_mul(fp_reg_read(FR[
f
3
]), fp_reg_read(FR[
f
4
]));
tmp_fr2 = fp_reg_read(FR[
f
2
]);
tmp_fr2.sign = !tmp_fr2.sign;
if (
f
2
!= 0)
tmp_res = fp_add(tmp_res, tmp_fr2, tmp_fp_env);
FR[
f
1
] = fp_ieee_round(tmp_res, &tmp_fp_env);
}
fp_update_fpsr(
sf
, tmp_fp_env);
fp_update_psr(
f
1
);
if (fp_raise_traps(tmp_fp_env))
fp_exception_trap(fp_decode_trap(tmp_fp_env));
}
}
FP Exceptions:
Invalid Operation (V)
Underflow (U)
Denormal/Unnormal Operand (D)
Overflow (O)
Software Assist (SWA) fault
Inexact (I)
Software Assist (SWA) trap
Summary of Contents for Itanium 9150M
Page 1: ......
Page 209: ...3 200 Volume 3 Instruction Reference padd Interruptions Illegal Operation fault...
Page 405: ...3 396 Volume 3 Resource and Dependency Semantics...
Page 406: ...3 397 Intel Itanium Architecture Software Developer s Manual Rev 2 3 Index...
Page 407: ...3 398 Intel Itanium Architecture Software Developer s Manual Rev 2 3...
Page 419: ...INDEX Index 12 Index for Volumes 1 2 3 and 4...
Page 420: ......