ST10 FAMILY PROGRAMMING MANUAL
138/172
CoMAC(R)us(-)
Mixed Multiply-Accumulate & Optional Round
Group
Multiply/Multiply-Accumulate Instructions
Syntax
CoMACus op1,
op2
Operation
(tmp) <-- (op1) * (op2)
(ACC) <-- (ACC) + (tmp)
Syntax
CoMACus op1, op2, rnd
Operation
(tmp) <-- (op1) * (op2)
(ACC) <-- (ACC) + (tmp) + 00 0000 8000
h
(MAL) <-- 0
Syntax
CoMACus- op1, op2
Operation
(tmp) <-- (op1) * (op2)
(ACC) <-- (ACC) - (tmp)
Syntax
CoMACRus op1, op2
Operation
(tmp) <-- (op1) * (op2)
(ACC) <-- (tmp) - (ACC)
Syntax
CoMACRus 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 and signed 16-bit source operands “op1” and “op2”, respectively. The
obtained signed 32-bit product is first sign-extended, and then, it is 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 accumu-
lator 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 reg-
ister 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...