![Xilinx Virtex-II Pro PPC405 Скачать руководство пользователя страница 84](http://html1.mh-extra.com/html/xilinx/virtex-ii-pro-ppc405/virtex-ii-pro-ppc405_user-manual_3410279084.webp)
392
March 2002 Release
1-800-255-7778
Virtex-II Pro™ Platform FPGA Documentation
Chapter 3:
User Programming Model
R
Integer-Subtraction Instructions
shows the PowerPC
integer-subtraction
instructions. The instructions in this table
are grouped by the type of subtraction operation they perform. For each type of instruction
shown, the “Operation” column indicates the subtraction-operation performed. The
column also shows, on an instruction-by-instruction basis, how the XER and CR registers
are updated (if at all). The subtraction operation is expressed as addition so that the two’s-
complement operation is clear. “SIMM” indicates an immediate value that is sign-
extended prior to being used in the operation.
The integer-subtraction instructions subtract the second operand (
r
A) from the third
operand (
r
B). Simplified mnemonics are provided with a more familiar operand ordering,
whereby the third operand is subtracted from the second. Simplified mnemonics are also
defined for the addi instruction to provide a subtract-immediate operation. See
for more information.
The subtract-from extended instructions can be used to perform subtraction 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
subfe
with
subfc
as
follows:
subfc
r
8,
r
6,
r
4
! Subtract the least-significant words and record a
! carry.
subfe
r
7,
r
5,
r
3
! Subtract the most-significant words, using
! previous carry.
Add to Zero-Extended Instructions
r
D is loaded with the sum (
r
A) + XER[CA].
addze
Add to Zero Extended
XER[CA] is updated to reflect the result.
r
D,
r
A
addze.
Add to Zero Extended and Record
XER[CA] and CR0 are updated to reflect the re-
sult.
addzeo
Add to Zero Extended with Overflow
Enabled
XER[CA,OV,SO] are updated to reflect the result.
addzeo.
Add to Zero Extended with Overflow
Enabled and Record
XER[CA,OV,SO] and CR0 are updated to reflect
the result.
Table 3-24:
Integer-Addition Instructions
(Continued)
Mnemonic
Name
Operation
Operand
Syntax
Table 3-25:
Integer-Subtraction Instructions
Mnemonic
Name
Operation
Operand
Syntax
Subtract-From Instructions
r
D is loaded with the sum
¬
(
r
A) + (
r
B) + 1.
subf
Subtract from
XER and CR0 are
not
updated.
r
D,
r
A,
r
B
subf.
Subtract from and Record
CR0 is updated to reflect the result.
subfo
Subtract from with Overflow Enabled
XER[OV,SO] are updated to reflect the result.
subfo.
Subtract from 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...