![Xilinx Virtex-II Pro PPC405 User Manual Download Page 100](http://html1.mh-extra.com/html/xilinx/virtex-ii-pro-ppc405/virtex-ii-pro-ppc405_user-manual_3410279100.webp)
408
March 2002 Release
1-800-255-7778
Virtex-II Pro™ Platform FPGA Documentation
Chapter 3:
User Programming Model
R
Multiply-Accumulate High-Halfword to Word Instructions
shows the PPC405
multiply-accumulate high-halfword to word
instructions. These
instructions multiply the high halfword of both source operands,
r
A[0:15] and
r
B[0:15],
producing a 32-bit product. The product is signed or unsigned, depending on the
instruction. This product is added to the value in the destination register,
r
D, producing a
33-bit intermediate result. Generally,
r
D is loaded with the lower-32 bits of the 33-bit
intermediate result. However, if the instruction performs saturating arithmetic and the
intermediate result overflows,
r
D is loaded with the nearest representable value (see
Modulo and Saturating Arithmetic
).
For each type of instruction shown in
, the “Operation” column indicates the
multiply-accumulate operation performed. The column also shows, on an instruction-by-
instruction basis, how the XER and CR registers are updated (if at all).
Figure 3-28:
Multiply-Accumulate Cross-Halfword to Word Operation
UG011_20_033101
r
D
0
31
0
32
r
A
0
31
16
r
B
0
31
15
×
r
D
0
31
+
Intermediate Result
1
Table 3-41:
Multiply-Accumulate High-Halfword to Word Instructions
Mnemonic
Name
Operation
Operand
Syntax
Multiply-Accumulate High-Halfword to Word
Modulo Signed Instructions
r
D is added to the signed product (
r
A[0:15])
×
(
r
B[0:15]), producing
a 33-bit result. The low-32 bits of this result are stored in
r
D.
machhw
Multiply Accumulate High Halfword
to Word Modulo Signed
XER and CR0 are
not
updated.
r
D,
r
A,
r
B
machhw.
Multiply Accumulate High Halfword
to Word Modulo Signed and Record
CR0 is updated to reflect the result.
machhwo
Multiply Accumulate High Halfword
to Word Modulo Signed with
Overflow Enabled
XER[OV,SO] are updated to reflect the result.
machhwo.
Multiply Accumulate High Halfword
to Word Modulo Signed with
Overflow Enabled and Record
XER[OV,SO] and CR0 are updated to reflect the
result.