ST10 FAMILY PROGRAMMING MANUAL
136/172
CoMAC(R)u(-)
Unsigned Multiply-Accumulate & Optional Round
Group
Multiply/Multiply-Accumulate Instructions
Syntax
CoMACu op1,
op2
Operation
(tmp) <-- (op1) * (op2)
(ACC) <-- (ACC) + (tmp)
Syntax
CoMACu
op1, op2, rnd
Operation
(tmp) <-- (op1) * (op2)
(ACC) <-- (ACC) + (tmp) + 00 0000 8000
h
(MAL) <-- 0
Syntax
CoMACu- op1,
op2
Operation
(tmp) <-- (op1) * (op2)
(ACC) <-- (ACC) - (tmp)
Syntax
CoMACRu
op1, op2
Operation
(tmp) <-- (op1) * (op2)
(ACC) <-- (tmp) - (ACC)
Syntax
CoMACRu op1, op2, rnd
Operation
(tmp) <-- (op1) * (op2)
(ACC) <-- (tmp) - (ACC) + 00 0000 8000
h
(MAL) <-- 0
Data Types
DOUBLE WORD
Result
40-bit signed value
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
Z
C
SV
E
SL
*
*
*
*
*
*
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.
Содержание ST10 Series
Страница 2: ......
Страница 4: ...ST10 FAMILY PROGRAMMING MANUAL 2 172...