MPC555
/
MPC556
CENTRAL PROCESSING UNIT
MOTOROLA
USER’S MANUAL
Rev. 15 October 2000
3-16
The CR fields can be set in the following ways:
• Specified fields of the CR can be set by a move instruction (
mtcrf
) to the CR from
a GPR.
• Specified fields of the CR can be moved from one CR
x
field to another with the
mcrf
instruction
.
• A specified field of the CR can be set by a move instruction (
mcrxr
) to the CR
from the XER.
• Condition register logical instructions can be used to perform logical operations
on specified bits in the condition register.
• CR0 can be the implicit result of an integer operation.
• A specified CR field can be the explicit result of an integer compare instruction.
Instructions are provided to test individual CR bits.
3.7.4.1 Condition Register CR0 Field Definition
In most integer instructions, when the CR is set to reflect the result of the operation
(that is, when Rc = 1), and for
addic.
,
andi.
, and
andis.
, the first three bits of CR0 are
set by an algebraic comparison of the result to zero; the fourth bit of CR0 is copied from
XER[SO]. For integer instructions, CR[0:3] are set to reflect the result as a signed
quantity. The result as an unsigned quantity or a bit string can be deduced from the
EQ bit.
The CR0 bits are interpreted as shown in
. If any portion of the result (the 32-
bit value placed into the destination register) is undefined, the value placed in the first
three bits of CR0 is undefined.
3.7.4.2 Condition Register CR1 Field Definition
In all floating-point instructions when the CR is set to reflect the result of the operation
(that is, when Rc = 1), the CR1 field (bits 4 to 7 of the CR) is copied from FPSCR[0:3]
to indicate the floating-point exception status. For more information about the FPSCR,
see
3.7.3 Floating-Point Status and Control Register (FPSCR)
. The bit descriptions
for the CR1 field are shown in
.
CR
— Condition Register
MSB
0
1
2
3
4
5
6
7
8
9
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
LSB
31
CR0
CR1
CR2
CR3
CR4
CR5
CR6
CR7
RESET: UNCHANGED
Table 3-7 Bit Descriptions for CR0 Field of CR
CR0 Bit
Description
0
Negative (LT) — This bit is set when the result is negative.
1
Positive (GT) — This bit is set when the result is positive (and not zero).
2
Zero (EQ) — This bit is set when the result is zero.
3
Summary overflow (SO) — This is a copy of the final state of XER[SO] at the completion of the instruction.
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
.
..