MPC563XM Reference Manual, Rev. 1
Freescale Semiconductor
883
Preliminary—Subject to Change Without Notice
The integer part of the result is stored in MACH, and the fractional part in MACL. The result is signed, so
that the concatenation of MACH and MACL form a 48-bit fixed point number with a 24-bit mantissa, both
for 8- and 16-bit operations. To calculate the unsigned numerator of the fractional part (with denominator
2
24
) of the result, one must take the absolute value of MACL considering the signal of the result (not
MACL alone), i.e.: if flag MN=1, invert MACL and add 1.
MDU flags are updated in the same way as in the Signed Multiplication.
23.4.8.3.8
Unsigned Fractional Multiplication (fmultu)
MDU Unsigned Fractional Multiplication takes both A-Source and B-Source as unsigned operands.
B-Source is taken as an 8- or 16-bit fraction between 0 and (2
8
- 1)/2
8
(inclusive) for the 8-bit operation,
or between 0 and (2
16
-1)/2
16
(inclusive) for the 16-bit operation. The value of B-Source is considered the
numerator of a fraction with denominator 2
8
or 2
16
for the 8- and 16-bit operations, respectively.
The integer part of the result is stored in MACH, and the fractional part in MACL. The fractional part in
MACL is the numerator of a fraction with denominator 2
24
. The concatenation of MACH and MACL form
a 48-bit fixed point number with a 24-bit mantissa, both for 8- and 16-bit operations.
MDU flags are updated in the same way as in the Unsigned Multiplication.
23.4.8.3.9
Unsigned Divide (div)
At the end of a divide operation MACL holds the result of the division, taking A-source as numerator and
B-source as denominator, while MACH holds the remainder. If a divide by 0 is executed, MACL holds the
maximum unsigned number (0xFFFFFF) as result and flag MV is set to indicate division by 0 (otherwise
reset). The contents of MACH become indetermined.
MC flag is always reset.
MZ flag is set if MACL equals 0, and reset otherwise.
MN receives a copy of MACH bit 23 (msb from the remainder).
Note that signed division is not available.
23.4.8.3.10
MDU Flags
MDU has its own flags to indicate the result and status of an MDU operation. They are: MC, MZ, MV,
MN and MB. All MDU flags are updated with the final result at the end of the operation, and do not change
until the next operation finishes. Therefore it is possible to start a new MDU operation and test the flags
of the previous one in parallel, except for mult/mac with 8-bit operand (takes only 1 microcycle).
MDU Negative Flag - MN
MN flag is always a copy of MACH bit 23 at the end of the operation, either in signed or unsigned ones.
Note that MACH holds the rest of a division operation, which is always unsigned.