ST10 FAMILY PROGRAMMING MANUAL
160/172
CoMULsu(-)
Mixed Multiply & Optional Round
Group
Multiply/Multiply-Accumulate Instructions
Syntax
CoMULsu
op1, op2
Operation
(ACC)
<-- (op1) * (op2)
Syntax
CoMULsu-
op1, op2
Operation
(ACC)
<-- - ((op1) * (op2))
Syntax
CoMULsu
op1, op2, rnd
Operation
(ACC)
<-- (op1) * (op2) + 00 0000 8000
h
(MAL) <--
0
Data Types
DOUBLE WORD
Result
32-bit signed value
Description
Multiply the two 16-bit signed and unsigned source operands “op1” and “op2”, respectively. The obtained
signed 32-bit product is first sign-extended, then, it is optionally either negated or 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. The “-” option is used to negate the specified product while the “rnd” option is used to round the
product 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. “rnd” and “-” are exclusive.
This non-repeatable instruction allows up to two parallel memory reads.
MAC Flags
Addressing Modes
N
Z
C
SV
E
SL
*
*
0
-
0
-
N
Set if the most significant bit of the result is set. Cleared otherwise.
Z
Set if the result equals zero. Cleared otherwise.
C
Always cleared.
SV
Not affected.
E
Always cleared.
SL
Not affected.
Mnemonic
Rep
Format
Bytes
CoMULsu
Rw
n
, Rw
m
No
A3 nm 40 00
4
CoMULsu-
Rw
n
, Rw
m
No
A3 nm 48 00
4
CoMULsu
Rw
n
, Rw
m
, rnd
No
A3 nm 41 00
4
CoMULsu
[IDX
i
⊗
], [Rw
m
⊗]
No
93 Xm 40 0:0qqq
4
CoMULsu-
[IDX
i
⊗
], [Rw
m
⊗]
No
93 Xm 48 0:0qqq
4
CoMULsu
[IDX
i
⊗
], [Rw
m
⊗]
, rnd
No
93 Xm 41 0:0qqq
4
CoMULsu
Rw
n
, [Rw
m
⊗]
No
83 nm 40 0:0qqq
4
CoMULsu-
Rw
n
, [Rw
m
⊗]
No
83 nm 48 0:0qqq
4
CoMULsu
Rw
n
, [Rw
m
⊗],
rnd
No
83 nm 41 0:0qqq
4
Содержание ST10 Series
Страница 2: ......
Страница 4: ...ST10 FAMILY PROGRAMMING MANUAL 2 172...