MPC563XM Reference Manual, Rev. 1
874
Freescale Semiconductor
Preliminary—Subject to Change Without Notice
ALU flags are never updated when microinstruction starts an MDU operation, regardless of CCS/CCSV,
but are updated normally afterwards, on ALU operations that are executed in parallel with an ongoing
MDU operation (MDU has its own flags).
NOTE
Operation size can be smaller than destination register. For example:
0x0001 (both 16-bit sources) stores 0x10000 in a 24-bit register
and sets Zero and Carry flags because operation size is 16 bits.
Carry Flag (C)
In an unsigned addition without shifting, Carry Flag is the ALU carry from bit 7 to 8, 15 to 16, or 23 to 24
on 8-, 16- and 24-bit operation sizes respectively. In an unsigned subtraction without shifting, Carry Flag
represent the sign of ALU’s result considering operation size (Carry Flag equal to 0 means a negative
result).
Carry Flag definition is operation-dependent. The Carry flag in add/subtraction with Post-ALU shift is
defined in
. Find the definitions for other operations in the following sections.
Negative flag (N)
Negative flag indicates the sign of result based on the operation size, regardless of the operation
performed, as shown in
NOTE
The N flag may not reflect the sign of the value actually written into the
destination register, if it does not have the same size of the operation (see
Section 23.4.9.2.3, “Flags Sampling Control
). This is always the case for
registers RAR (14 bits) and CHAN (5 bits).
Overflow (V)
Overflow is updated only on addition (with or without carry) and absolute value operations. In signed
operations, overflow flag indicates that the result of arithmetic operation (add or subtraction) can not be
represented by a word of the size of the operation. Overflow flag behavior for addition is defined in
. Overflow flag for Absolute operation is explained in
Section 23.4.8.2.8, “Absolute Value
Table 23-41. Negative (N) flag behavior
Operation Size
Value
8 bits
N = result[7]
16 bits
N = result[15]
24 bits
N = result[23]