avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Avoid register saving


From: Artur Lipowski
Subject: Re: [avr-gcc-list] Avoid register saving
Date: Thu, 01 Apr 2004 08:30:26 +0200
User-agent: Mozilla Thunderbird 0.5+ (Windows/20040331)

<x-flowed>
Bernhard Huber wrote:

How can I tell avr-gcc (gcc version 3.0 20010605 (prerelease)) that a
bunch of registers (r2 to r16) must not be saved when entering a
interrupt service routine.
...
You should trust compiler. If it try save these regs it means that they probably can be corrupted if not saved.

At least version 3.3.3 of the GCC (current stable) can reduce number of saved registers in case when no other functions are called from given ISR. There is no way to tell compiler that given function will use only subset of regs and compiler must assume that whole calling convention apply and it means that "call-used registers: r18-r27, r30-r31" must be preserved by caller.

If saving a couple of regs does matter for your ISR that means that response time is (probably) very important and it is good time to start writing ISR in assembler.

Regards
--
Artur Lipowski

_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list

</x-flowed>

reply via email to

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