|
From: | Shaun Jackman |
Subject: | Re: [avr-gcc-list] C<->asm docs/examples? |
Date: | Mon, 26 Feb 2007 17:47:50 -0700 |
On 2/26/07, Joerg Wunsch <address@hidden> wrote:
David McNab <address@hidden> 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
[Prev in Thread] | Current Thread | [Next in Thread] |