![Xilinx Virtex-II Pro PPC405 Скачать руководство пользователя страница 82](http://html1.mh-extra.com/html/xilinx/virtex-ii-pro-ppc405/virtex-ii-pro-ppc405_user-manual_3410279082.webp)
390
March 2002 Release
1-800-255-7778
Virtex-II Pro™ Platform FPGA Documentation
Chapter 3:
User Programming Model
R
to the destination register. XER and CR can be updated by the integer instructions in the
following ways:
•
The XER[CA] bit is updated to reflect the carry out of bit 0 in the result.
•
The XER[OV] bit is set or cleared to reflect a result overflow. When XER[OV] is set,
XER[SO] is also set to reflect a summary overflow. XER[SO] can only be cleared using
the
mtspr
and
mcrxr
instructions. Instructions that update these bits have the
overflow-enable (OE) bit set to 1 in the instruction encoding. This is indicated by the
“o” suffix in the instruction mnemonic.
•
Bits in CR0 (CR[0:3]) are updated to reflect a signed comparison of the result to zero.
Instructions that update CR0 have the record (Rc) bit set to 1 in the instruction
encoding. This is indicated by the “.” suffix in the instruction mnemonic. See
, for information on how these bits are updated.
Instructions that update XER[OV] or XER[CA] can delay the execution of subsequent
instructions. See
Fixed-Point Exception Register (XER)
for more information on
these register bits.
Arithmetic Instructions
The integer-arithmetic instructions support addition, subtraction, multiplication, and
division between operands in the GPRs and in some cases between GPRs and signed-
immediate values.
Integer-Addition Instructions
shows the PowerPC
integer-addition
instructions. The instructions in this table
are grouped by the type of addition operation they perform. For each type of instruction
shown, the “Operation” column indicates the addition-operation performed, and on an
instruction-by-instruction basis, how the XER and CR registers are updated (if at all).
“SIMM” indicates an immediate value that is sign-extended prior to being used in the
operation.
The add-extended instructions can be used to perform addition on integers larger than 32
bits. For example, assume a 64-bit integer
i
is represented by the register pair
r
3:
r
4, where
r
3 contains the most-significant 32 bits of
i
, and
r
4 contains the least-significant 32 bits. The
64-bit integer
j
is similarly represented by the register pair
r
5:
r
6. The 64-bit result
i
+
j
=
r
(represented by the pair
r
7:
r
8) is produced by pairing
adde
with
addc
as follows:
addc
r
8,
r
6,
r
4
! Add the least-significant words and record a
! carry.
adde
r
7,
r
5,
r
3
! Add the most-significant words, using
! previous carry.
Table 3-24:
Integer-Addition Instructions
Mnemonic
Name
Operation
Operand
Syntax
Add Instructions
r
D is loaded with the sum (
r
A) + (
r
B).
add
Add
XER and CR0 are
not
updated.
r
D,
r
A,
r
B
add.
Add and Record
CR0 is updated to reflect the result.
addo
Add with Overflow Enabled
XER[OV,SO] are updated to reflect the result.
addo.
Add with Overflow Enabled and
Record
XER[OV,SO] and CR0 are updated to reflect the
result.
Содержание Virtex-II Pro PPC405
Страница 1: ...R Volume 2 a PPC405 User Manual Virtex II Pro Platform FPGA Developer s Kit March 2002 Release...
Страница 14: ...322 www xilinx com March 2002 Release 1 800 255 7778 Virtex II Pro Platform FPGA Documentation Preface R...
Страница 252: ...560 www xilinx com March 2002 Release 1 800 255 7778 Virtex II Pro Platform FPGA Documentation R...
Страница 260: ...568 www xilinx com March 2002 Release 1 800 255 7778 Virtex II Pro Platform FPGA Documentation R...
Страница 562: ...870 www xilinx com March 2002 Release 1 800 255 7778 Virtex II Pro Platform FPGA Documentation R...