IBM PPC440X5 Computer Hardware User Manual


 
User’s Manual
Preliminary PPC440x5 CPU Core
prgmodel.fm.
September 12, 2002
Page 71 of 589
CR Update By Integer Compare Instructions
Integer compare instructions update a specified CR field with the result of a comparison of two 32-bit
numbers, the first of which is from a GPR and the second of which is either an immediate value or from
another GPR. There are two types of integer compare instructions, arithmetic and logical, and they are distin-
guished by the interpretation given to the 32-bit numbers being compared. For arithmetic compares, the
numbers are considered to be signed, whereas for logical compares, the numbers are considered to be
unsigned. As an example, consider the comparison of 0 with 0xFFFFFFFF. In an arithmetic compare, 0 is
larger; in a logical compare, 0xFFFFFFFF is larger.
A compare instruction can direct its result to any CR field. The BF field (bits 6:8) of the instruction specifies
the CR field to be updated. After a compare, the specified CR field is interpreted as follows:
2.6 Integer Processing
Integer processing includes loading and storing data between memory and GPRs, as well as performing
various operations on the values in GPRs and other registers (the categories of integer instructions are
summarized in Table 2-4 on page 57). The sections which follow describe the registers which are used for
integer processing, and how they are updated by various instructions. In addition, Condition Register (CR) on
page 67 provides more information on the CR updates caused by integer instructions. Finally, Instruction Set
on page 249 also provides details on the various register updates performed by integer instructions.
2.6.1 General Purpose Registers (GPRs)
The PPC440x5 contains 32 GPRs. The contents of these registers can be transferred to and from memory
using integer storage access instructions. Operations are performed on GPRs by most other instructions.
Access to the GPRs is non-privileged.
CR[(BF)]
0
— LT The first operand is less than the second operand.
CR[(BF)]
1
— GT The first operand is greater than the second operand.
CR[(BF)]
2
— EQ The first operand is equal to the second operand.
CR[(BF)]
3
— SO Summary overflow; a copy of XER[SO].
Figure 2-6. General Purpose Registers (R0-R31)
0:31 General Purpose Register data
0 31