
MOTOROLA
3-24
OPERAND CONVENTIONS
For More Information On This Product,
Go to: www.freescale.com
RCPU
REFERENCE MANUAL
Z1 and Z2, defined in
3.3.11 Rounding
, can be used to approximate the result in
the target format when one of the following rules is used:
Round to nearest
— Guard bit = 0: The result is truncated. (Result exact (GRX = 000) or closest
to next lower value in magnitude (GRX = 001, 010, or 011)
— Guard bit = 1: Depends on round and sticky bits:
Case a: If the round or sticky bit is one (inclusive), the result is increment-
ed. (result closest to next higher value in magnitude (GRX = 101, 110, or
111))
Case b: If the round and sticky bits are zero (i.e., the result is midway be-
tween the closest representable values), the result is rounded to an even
value. That is, if the low-order bit of the result is one, the result is incre-
mented. If the low-order bit of the result is zero, the result is truncated.
If during the round to nearest process, truncation of the unrounded number
produces the maximum magnitude for the specified precision, the following
action is taken:
— Guard bit = 1: Store infinity with the sign of the unrounded result.
— Guard bit = 0: Store the truncated (maximum magnitude) value.
Round toward zero — Choose the smaller in magnitude of Z1 or Z2. If the
guard, round, or sticky bit is non-zero, the result is inexact.
Round toward +infinity
Choose Z1.
Round toward –infinity
Choose Z2.
Where the result is to have fewer than 53 bits of precision because the instruction
is a floating round to single-precision or single-precision arithmetic instruction, the
intermediate result either is normalized or is placed in correct denormalized form
before the result is potentially rounded.
3.4.2 Execution Model for Multiply-Add Type Instructions
The PowerPC architecture makes use of a special form of instruction that performs
up to three operations in one instruction (a multiply, an add, and a negate). With
this added capability is the special feature of being able to produce a more exact
intermediate result as an input to the rounder. The 32-bit arithmetic is similar ex-
cept that the fraction field is smaller.
NOTE
The rounding occurs only after add; therefore, the computation of the
sum and product together are infinitely precise before the final result
is rounded to a representable format.
The first part of the operation is a multiply. The multiply has two 53-bit significands
as inputs, which are assumed to be prenormalized, and produces a result conform-
ing to the above model. If there is a carry out of the significand (into the C bit), the
significand is shifted right one position, placing the L bit into the most significant bit
of the FRACTION and placing the C bit into the L bit. All 106 bits (L bit plus the frac-
F
Freescale Semiconductor, Inc.
n
.