STMicroelectronics ST10 Series Programming Manual page 138

Table of Contents

Advertisement

ST10 FAMILY PROGRAMMING MANUAL
CoMAC(R)u(-)
Group
Syntax
Operation
Syntax
Operation
Syntax
Operation
Syntax
Operation
Syntax
Operation
Data Types
Result
Description
Multiplies the two unsigned 16-bit source operands "op1" and "op2". The obtained unsigned 32-bit prod-
uct is first zero-extended and then optionally negated prior being added/subtracted to/from the 40-bit
ACC register content, finally, the obtained result is optionally rounded before being stored in the 40-bit
ACC register. The result is never affected by the MP mode flag contained in the MCW register. "-" option
is used to negate the specified product, "R" option is used to negate the accumulator content, and finally
"rnd" option is used to round the result using two's complement rounding. The default sign option is "+"
and the default round option is "no round". When "rnd" option is used, MAL register is automatically
cleared. Note that "rnd" and "-" are exclusive as well as "-" and "R". This instruction might be repeated and
allows up to two parallel memory reads.
MAC Flags
N
*
N
Set if the most significant bit of the result is set. Cleared otherwise.
Z
Set if the result equals zero. Cleared otherwise.
C
Set if a carry or borrow is generated. Cleared otherwise.
SV
Set if an arithmetic overflow occurred. Not affected otherwise.
E
Set if the MAE is used. Cleared otherwise.
SL
Set if the contents of the ACC is automatically saturated. Not affected otherwise.
136/172
Unsigned Multiply-Accumulate & Optional Round
Multiply/Multiply-Accumulate Instructions
CoMACu
op1, op2
(tmp) <-- (op1) * (op2)
(ACC) <-- (ACC) + (tmp)
CoMACu
op1, op2, rnd
(tmp) <-- (op1) * (op2)
(ACC) <-- (ACC) + (tmp) + 00 0000 8000
(MAL) <-- 0
CoMACu-
op1, op2
(tmp) <-- (op1) * (op2)
(ACC) <-- (ACC) - (tmp)
CoMACRu
op1, op2
(tmp) <-- (op1) * (op2)
(ACC) <-- (tmp) - (ACC)
CoMACRu
op1, op2, rnd
(tmp) <-- (op1) * (op2)
(ACC) <-- (tmp) - (ACC) + 00 0000 8000
(MAL) <-- 0
DOUBLE WORD
40-bit signed value
Z
C
*
*
h
h
SV
E
*
*
SL
*

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ST10 Series and is the answer not in the manual?

Questions and answers

Table of Contents