On 2/26/07, Joerg Wunsch <[EMAIL PROTECTED]> wrote:
David McNab <[EMAIL PROTECTED]> wrote:

> The code in /doc/examples/asmdemo in the avr-libc tree is only
> limited value, because all the assembler code seems to be just ISRs,
> with no calling between C and assembler.

Sorry, I simply couldn't fit anything into it like that that would
serve as a useful example (i.e. something where diverting to asm was
really justified).  The example is supposed to be a real-world one,
nothing artificial.

Multiplying a 16-bit number by an 8-bit number to produce a 24-bit
result is a good example of something that GCC does not yet do and can
only be accomplished in assembler. GCC will multiply a 32-bit number
by a 32-bit number to produce a 32-bit result, but that takes many
more multiply instructions than necessary. This multiplication topic
was discussed on this mailing list previously.

Cheers,
Shaun


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to