Hello friends,
I implement algorithm fo C64x subcore under DM8148 device.
I noticed that MPY32 instruction has two versions corresponds to destination type:
- when destination is 32 bits wide - MPY32 save only lower 32 bits of result (one register)
- when destination is 64 bits wide - MPY32 save full 64 bits result of multiplication into register pair.
I do not clearly understood what kind of strategy in choosing this MPY32 instruction uses the compiler if the size of the multiplication result is not defined uniquely. For example (let say that all 'a', 'b', 'c', 'd' and 'e' variables in this polynom are signed integer 32 bits wide):
Int32 result = ( (a1 * a2) >> a3 + (b1 * b2) >> b3 + d + (e1 * e2) ) >> e3;
How can I get the compiler (without re-writing code in assembler) always use the second version of the MPY32 instructions - where the result is always stored in a register pair.
ThanX alot and best regards