[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] How to do multi-line assembler macros?

From: Brian Dean
Subject: Re: [avr-gcc-list] How to do multi-line assembler macros?
Date: Tue, 9 Sep 2003 12:21:01 -0400
User-agent: Mutt/1.4.1i

On Tue, Sep 09, 2003 at 04:10:56PM +0000, E. Weddington wrote:

> Dumb question: Any reason why you're doing this all in
> assembly instead of C with macros that generate inline 
> assembly?

I'm mainly using assembly because I need to eak out every cycle of
performance.  I originally wrote my code in C, but it did not run
quite fast enough.  As an optimization, I'm utilizing r0-r16 as
persistant variables, and I'm concerned that GCC will utilize them for
its own purposes.  Using all assembler, I'm able to meet the
performance requirements of this application which controls 16 servos
simultaneous with 8 microsecond resolution (256 steps).  Previously,
the best I could do using C only was around 14 us (140 steps) which is
too course.  This is on a 16 MHz part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]