|
From: | Royce Pereira |
Subject: | Re: [avr-gcc-list] SIGNAL and INTERRUPT overhead |
Date: | Sun, 21 Aug 2005 17:06:09 +0530 |
User-agent: | Opera M2/8.02 (Win32, build 7680) |
Hi,On Sun, 21 Aug 2005 03:04:02 +0530, Nigel Winterbottom <address@hidden> wrote:
-----Original Message----- From:James A.R. Koehler If the consensus is that we need to be protected against ourselves by having all the existing prolog in the two existing interrupt service methods, perhaps the solution is to have a third category of interrupt service routine in which nothing is pushed onto the stack and the programmer takes full responsibility for making sure the machine is returned to the same state it was before the interrupt. Jim ---------------------- Actually this already exists in the form of applying an attribute to the SIGNAL or INTERRUPT name. I use it in my code as the example below shows.
Nigel
--------------------------What's required is a peephole optimiser that detects in the assembly output the registers used in the function, or the presence of instructions modifying the flags etc and deletes unnecessary matching push/pops.
Another peephole optimisation is if a function ends like: rcall label retIt could be replaced with a jump to label (except if it's reti instead of ret). This will make the code faster, as extra push/pop of the PC is avoided.
Both the above is implemented in SDCC (sdcc.sourceforge.net) a freeware C compiler for MCS51 family, which I also use. Can these optimisations be implemented a AVR-Gcc?
--Thanks, Royce. -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
[Prev in Thread] | Current Thread | [Next in Thread] |