Infineon Technologies C166S V2 User Manual page 394

16-bit microcontroller
Table of Contents

Advertisement

CoMUL-
Group
Syntax
Source Operand(s)
Destination Operand(s)
Operation
IF (MP = 1) THEN
ELSE
END IF
Description
Multiplies the two signed 16-bit source operands op1 and op2. The resulting signed
32-bit product is first sign-extended; then, if the MP flag is set, it is one-bit left shifted;
and, finally, it is negated before being stored in the 40-bit ACC register.
MAC Flags
MV
MSL
0
0
MV
Always cleared.
MSL
Always cleared.
ME
Always cleared.
MSV Not affected.
MC
Always cleared.
MZ
Set if result equals zero. Cleared otherwise.
MN
Set if the most significant bit of the result is set. Cleared otherwise.
Encoding
Mnemonic
CoMUL-
Rw
CoMUL-
Rw
CoMUL-
[IDXi*] , [Rw
User Manual
Signed Multiply
Multiply/Multiply-Accumulate Instructions
CoMUL- op1, op2
op1, op2 → WORD
ACC → 40-bit signed value
(ACC) ← - ((op1) * (op2)) <<1
(ACC) ← - ((op1) * (op2))
ME
MSV
0
-
, Rw
n
m
, [Rw
*]
n
m
*]
m
Detailed Instruction Description
MC
MZ
0
*
Format
A3 nm C8 rrr0:0000
83 nm C8 rrr0:0qqq
93 Xm C8 rrr0:0qqq
8-394
User Manual
C166S V2
CoMUL-
MN
Sat.
*
no
Bytes
4
4
4
V 1.7, 2001-01

Advertisement

Table of Contents
loading

Table of Contents