
Register Model
e200z3 Power Architecture Core Reference Manual, Rev. 2
2-14
Freescale Semiconductor
2.6.1.1
CR Setting for Integer Instructions
For all integer word instructions with the Rc bit defined and set, and for addic., andi., and andis.,
CR0[32–34] are set by signed comparison of bits 32–63 of the result to zero; CR[35] is copied from the
final state of XER[SO]. The Rc bit is not defined for double-word integer operations.
if (target_register)
32–63
< 0 then c
←
0b100
else if (target_register)
32–63
> 0 then c
←
0b010
else
c
←
0b001
CR0
←
c
||
XER
SO
The value of any undefined portion of the result is undefined, and the value placed into the first three bits
of CR0 is undefined. CR0 bits are interpreted as described in
Note that CR0 may not reflect the true (infinitely precise) result if overflow occurs. For further details,
refer to the EREF.
2.6.1.2
CR Setting for Store Conditional Instructions
CR0 is also set by the integer store conditional instruction, stwcx.. See instruction descriptions in
Chapter 3, “Instruction Model,”
for details on how CR0 is set.
2.6.1.3
CR Setting for Compare Instructions
For compare instructions, a CR field specified by the BI field in the instruction is set to reflect the result
of the comparison, as shown in
A complete description of how the bits are set is given in the EREF.
Table 2-7. CR0 Field Descriptions
CR Bit
Name
Description
32
Negative (LT)
Bit 32 of the result is equal to 1.
33
Positive (GT)
Bit 32 of the result is equal to 0 and at least one of bits 33–63 of the result is non-zero.
34
Zero (EQ)
Bits 32–63 of the result are equal to 0.
35
Summary overflow (SO) This is a copy of the final state of XER[SO] at the completion of the instruction.
Table 2-8. CR Setting for Compare Instructions
CR
n
Bit
Bit Expression
CR Bits
BI
Description
Book E
0–2
3–4
CR
n[0]
4 * cr0 + lt
(or
lt
)
4 * cr1 + lt
4 * cr2 + lt
4 * cr3 + lt
4 * cr4
+ lt
4 * cr5
+ lt
4 * cr6
+ lt
4 * cr7
+ lt
32
36
40
44
48
52
56
60
000
001
010
011
100
101
110
111
00
Less than (LT).
For integer compare instructions:
r
A < SIMM or
r
B (signed comparison) or
r
A < UIMM
or
r
B (unsigned comparison).
Содержание e200z3
Страница 1: ...e200z3 Power Architecture Core Reference Manual Supports e200z3 e200z335 e200z3coreRM Rev 2 06 2008 ...
Страница 32: ...e200z3 Power Architecture Core Reference Manual Rev 2 xii Freescale Semiconductor ...
Страница 50: ...Register Model e200z3 Power Architecture Core Reference Manual Rev 2 2 2 Freescale Semiconductor ...
Страница 238: ...Memory Management Unit e200z3 Power Architecture Core Reference Manual Rev 2 5 16 Freescale Semiconductor ...
Страница 332: ...Power Management e200z3 Power Architecture Core Reference Manual Rev 2 8 4 Freescale Semiconductor ...
Страница 424: ...Revision History e200z3 Power Architecture Core Reference Manual Rev 2 A 2 Freescale Semiconductor ...