![Infineon Technologies TC1796 User Manual Download Page 632](http://html1.mh-extra.com/html/infineon-technologies/tc1796/tc1796_user-manual_2055437632.webp)
TC1796
System Units (Vol. 1 of 2)
Peripheral Control Processor (PCP)
User’s Manual
11-95
V2.0, 2007-07
PCP, V2.0
11.11.23 Multiply Instructions
This section describes the multiply instructions of the PCP.
Note: In the case of the MSTEP64 instruction above, the “temp” variable is a 40-bit
variable and all calculations are performed using 40-bit unsigned arithmetic. All
other calculations use 32-bit unsigned arithmetic.
MSTEP32
Syntax
MSTEP32 <R0>, Rb, Ra
Description
Perform an unsigned multiply step, using eight bits of data
taken from Rb, keeping the least significant 32 bits of a
potential 64-bit result.
Left rotate Rb by 8 bits. Shift R0 left by 8 bits. Add (Ra
multiplied by the least significant 8 bits of Rb) to R0. If value
of R0 is zero then set Z (to signal zero result) else clear Z.
Operation
Rb = (Rb << 8) + (Rb >> 24)
R0 = (R0 << 8) + (Rb & 0xff)
×
Ra
Flags
Z
MSTEP64
Syntax
MSTEP64 <R0>, Rb, Ra
Description
Perform an unsigned multiply step, using eight bits of data
taken from Rb, keeping 40 bits of a potential 64-bit result.
Add (Ra multiplied by the least significant 8 bits of Rb) to R0
and retain the 40 bit result (shown as temp below). Store the
most significant 32 bits of the result (temp) in R0. Shift Rb
right by 8 bits. Store the least significant 8 bits of the first
result (temp) in the most significant 8 bits of Rb.
If value of R0 is zero then set Z (to signal zero result) else
clear Z.
Operation
temp = R0 + Ra
×
(Rb & 0xff)
R0 = temp >> 8
Rb = (Rb >> 8) + ((temp & 0xff) << 24)
Flags
Z