466 Computer Architecture and Organization
point operation. All general purpose registers of xed point register array may be used to hold operands
and results and also the indirect address as per the demand of the instructions. Register R0 of xed point
register array indicates zero for some load, store and add operations, irrespective of its present content.
The branch processing unit offers three user-accessible registers, namely Link, Count and Condi-
tion. The rst two are 64-bit while the last one is of 32-bit only. The link register has to be used to
have the address of the next executable instruction immediately after a conditional branch instruction
to help the control in returning to the main stream for execution. The count register has to be utilized to
count the number of iterations for any loop or to hold some address for indirect addressing. The condi-
tion register contains eight condition codes (from CR0 to CR7) each of 4-bit or one nibble.
Figure C.2 Some important registers of Power PC
FPR0
FPR1
FPR30
FPR31
Floating point registers
31
63
0
0
FPSCR
R0
R1
R30
R31
Fixed point registers
31
63
0
0
XER
Link
Count
Branch processing registers
63
0
0
Condition
31
Details of the condition register is shown in Figure C.3 . Note that all condition nibbles from CR0 to
CR7 are available for any compare instruction to check and decide the further course of action. How-
ever, CR0 is reserved for integer instructions and CR1 for oating point instructions. All four bits of
CR0 are set, if carry bit (Rc) is set for any integer operation. Similarly, all four bits of CR1 is set, if a
carry is produced by any oating point operation.
Figure C.3 Details of condition register of Power PC
31 28 27 24 23 20 19 16 15 12 11 8 7 4 3 0
CR7 CR6 CR5 CR4 CR3 CR2 CR1 CR0
For integer instructions
For floating point instructions
For all compare instructions
Figure C.4 illustrates the details of XER register of Power PC. As already indicated, most signi cant seven
bits of this register is used for byte count for any load/store operation, when some speci c number of bytes
are written or read related to some string operation. Least signi cant three bits of this register contains three
special ags, namely SO, OV and CA, re ecting the summary over ow, over ow and carry, respectively.
Note the difference between SO and OV bits, as in one case (for SO) the bit, if set, it would be cleared by
the software, while in the other case (for OV) it would be automatically cleared by the execution of the next
instruction. Power PC also offers a Machine State Register (MSR). This register is useful for responding to
any eventual interrupts. In the case of a super-scalar machine, apart from the register contents and ag status,
various control conditions also have to be saved for future use, in the case of such interrupts. In this case, the
MSR helps us as all relevant machine status are readily available within this register.
Z03_GHOS1557_01_SE_C18_App_C.indd 466Z03_GHOS1557_01_SE_C18_App_C.indd 466 4/29/11 5:42 PM4/29/11 5:42 PM