2-8 PPC405 Core User’s Manual
Once set, XER[SO] is not reset until an mtspr(XER) is executed with data that explicitly puts a 0 in
the SO bit, or until an mcrxr instruction is executed.
XER[OV] is set to indicate whether an instruction that updates XER[OV] produces a result that
“overflows” the 32-bit target register. XER[OV] = 1 indicates overflow. For arithmetic operations, this
occurs when an operation has a carry-in to the most-significant bit of the result that does not equal
the carry-out of the most-significant bit (that is, the exclusive-or of the carry-in and the carry-out is 1).
The following instructions set XER[OV] differently. The specific behavior is indicated in the instruction
descriptions in Chapter 9, “Instruction Set.”
• Move instructions:
mcrxr, mtspr(XER)
• Multiply and divide instructions:
mullwo, mullwo., divwo, divwo., divwuo, divwuo
The Carry (CA) field is set to indicate whether an instruction that updates XER[CA] produces a result
that has a carry-out of the most-significant bit. XER[CA] = 1 indicates a carry.
The following instructions set XER[CA] differently.The specific behavior is indicated in the instruction
descriptions in Chapter 9, “Instruction Set.”
• Move instructions
mcrxr, mtspr(XER)
• Shift-algebraic operations
sraw, srawi
The Transfer Byte Count (TBC) field is the byte count for load/store string instructions.
The XER is part of the user programming model.
Figure 2-5. Fixed Point Exception Register (XER)
0 SO Summary Overflow
0 No overflow has occurred.
1 Overflow has occurred.
Can be
set
by mtspr or by using “o” form
instructions; can be
reset
by mtspr or by
mcrxr.
1 OV Overflow
0 No overflow has occurred.
0 Overflow has occurred.
Can be
set
by mtspr or by using “o” form
instructions; can be
reset
by mtspr, by
mcrxr, or “o” form instructions.
2 CA Carry
0 Carry has not occurred.
1 Carry has occurred.
Can be
set
by mtspr or arithmetic
instructions that update the CA field; can
be
reset
by mtspr, by mcrxr, or by
arithmetic instructions that update the CA
field.
0123 24 25 31
SO
OV
CA
TBC