Przemek Klosowski schrieb:

The relevant question is how to trigger the code
generator to emit the MPY instruction that takes two
16-bit operands and produces a 32-bit result.

var32 = (var32_type)var16_a * var16_b;

Cast /one/ operand to 32 bits before multiplication and prey for that you don't have a really bad compiler. GCC should infer a 16Bit*16Bit => 32Bit multiplication. IAR does the same (unless you use a really really old version of IAR).

Ralf

Reply via email to