Is there any way to get the compiler to use MULL/MLAL instructions, or can they only be used in assembler ?
long a, b; long long c; ... c += a * b;
does not generate a MLAL. My target is an AT91SAM7S, which should support these instructions.
In C, the result of multiplication a * b is long, since both a and b are long. That's not what you expected, is it? Try modifying your code a bit:
c += a * (long long)b;
Regards, - mike
Thanks for the explanation, that's what I've been missing.