On 2008-04-22, Przemek Klosowski <[email protected]> wrote:

>> Cast one or both operands to 32-bit and C will give you a 32
>> bit result. Or copy one to a 32-bit and use that as the
>> result.
>
> but, if you promote operands to 32-bit, the compiler will use
> 32x32->32 multiply, which is not implemented in hardware on
> msp430 (presumably it'll be a library call). 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.

That question has come up a couple times in the past, and IIRC,
the answer is that there's no practical way to get GCC to do
that.

-- 
Grant Edwards                   grante             Yow! ... I don't like FRANK
                                  at               SINATRA or his CHILDREN.
                               visi.com            


Reply via email to