![Xilinx Virtex-II Pro PPC405 Скачать руководство пользователя страница 317](http://html1.mh-extra.com/html/xilinx/virtex-ii-pro-ppc405/virtex-ii-pro-ppc405_user-manual_3410279317.webp)
March 2002 Release
625
Virtex-II Pro™ Platform FPGA Documentation
1-800-255-7778
Alphabetical Instruction Listing
R
divwu
Divide Word Unsigned
Description
The contents of register
r
A (dividend) are divided by the contents of register
r
B (divisor).
The quotient is loaded into register
r
D. Both the dividend and the divisor are interpreted as
unsigned integers. The quotient is the unique unsigned integer that satisfies the equation:
dividend
=
(quotient
×
divisor) + remainder
where 0
≤
remainder
<
divisor.
The 32-bit unsigned remainder can be calculated using the following sequence of
instructions:
divwu
r
D,
r
A,
r
B
#
r
D
=
quotient
mullw
r
D,
r
D,
r
B
#
r
D
=
quotient
×
divisor
subf
r
D,
r
D,
r
A
#
r
D
=
remainder
If Rc
=
1, CR[CR0]
LT, GT, EQ
are set using a signed comparison of the result to 0 even though
the instruction produces an unsigned integer as a quotient.
The contents of register
r
D are undefined if an attempt is made to perform the invalid
division
n
÷
0 (where
n
is any number). The contents of CR[CR0]
LT, GT, EQ
are undefined if
the Rc field is set to 1 and an invalid division is performed. An invalid division sets
XER[OV, SO] to 1 if the OE field contains 1.
Pseudocode
(
r
D)
←
(
r
A)
÷
(
r
B)
Registers Altered
•
r
D.
•
CR[CR0]
LT, GT, EQ, SO
if Rc
=
1.
•
XER[OV, SO] if OE
=
1.
Exceptions
•
None.
Compatibility
This instruction is defined by the PowerPC user instruction-set architecture (UISA). It is
implemented by all PowerPC processors.
divwu
r
D,
r
A,
r
B
(OE=0, Rc=0)
divwu.
r
D,
r
A,
r
B
(OE=0, Rc=1)
divwuo
r
D,
r
A,
r
B
(OE=1, Rc=0)
divwuo.
r
D,
r
A,
r
B
(OE=1, Rc=1)
XO Instruction Form
31
r
D
r
A
r
B
OE
459
Rc
0
6
1
1
1
6
2
1
2
2
3
1
Содержание 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...