TriCore
®
TC1.6P & TC1.6E
32-bit Unified Processor Core
Instruction Set Overview
V1.0 2013-07
User Manual (Volume 2) 2-10
• MUL.Q (Multiply Q format)
• MULR.Q (Multiply Q format with Rounding)
The operand encodings for the MUL.Q instruction distinguish between 16-bit source operands in either the upper
D[n]U or lower half D[n]L of a data register, 32-bit source operands (D[n]), and 32-bit or 64-bit destination operands
(D[n] or E[n]). This gives a totel of eight different cases:
•16U * 16U → 32
• 16L * 16L → 32
•16U * 32 → 32
• 16L * 32 → 32
• 32 * 32→ 32
•16U * 32 → 64
• 16L * 32 → 64
• 32 * 32 → 64
In those cases where the number of bits in the destination is less than the sum of the bits in the two source
operands, the result is taken from the upper bits of the product.
The MAC instructions consist of all the MUL combinations described above, followed by addition (MADD.Q,
MADDS.Q,) and the rounding versions (MADDR.Q, MADDRS.Q). For the subtract versions of these instructions,
ADD is replaced by SUB.
2.4.8 Packed Multiply and Packed MAC
There are three instructions for various forms of multiplication on packed 16-bit fractional values:
• MUL.H (Packed Multiply Q format)
• MULR.H (Packed Multiply Q format with Rounding)
• MULM.H (Packed Multiply Q format, Multi-Precision)
These instructions perform two 16 x 16 bit multiplications in parallel, using 16-bit source operands in the upper or
lower halves of their source operand registers.
MUL.H produces two 32-bit products, stored into the upper and lower registers of an extended register pair. Its
results are exact, with no need for rounding.
MULR.H produces two 16-bit Q-format products, stored into the upper and lower halves of a single 32-bit register.
Its 32-bit intermediate products are rounded before discarding the low order bits, to produce the 16-bit Q-format
results.
MULM.H sums the two intermediate products, producing a single result that is stored into an extended register.
For all three instruction groups there are four supported source operand combinations for the two multiplications.
They are:
• 16U * 16U, 16L * 16L
• 16U * 16L, 16L * 16U
• 16U * 16L, 16L * 16L
• 16L * 16U, 16U * 16U
There is also a large group of Packed MAC instructions. These consist of all the MUL combinations described
above, followed by addition, subtraction or a combination of both. Typical examples are MADD.H, MADDR.H, and
MADDM.H.
All combinations are found as either MADxxx.H or MSUxxx.H instructions.