[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Interrupt prologues
From: |
Curtis Maloney |
Subject: |
[avr-gcc-list] Interrupt prologues |
Date: |
Tue, 01 Feb 2005 10:54:25 +1100 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
Ben Mann wrote:
While many of us are having to hand-assemble
interrupt handlers to get around AVR-GCC's occasionally long-winded and
inefficient prologue/epilogue,
I'd been meaning to ask others about this. One of our other developers
complained of the absurdly long prologue on a simple interrupt function he'd
written which needed to check a port pin ASAP. I checked the code, and
noticed some odd things.
An example:
58 /* prologue: frame size=0 */
59 0000 1F92 push __zero_reg__
60 0002 0F92 push __tmp_reg__
61 0004 0FB6 in __tmp_reg__,__SREG__
62 0006 0F92 push __tmp_reg__
63 0008 1124 clr __zero_reg__
64 000a 8F93 push r24
65 000c 9F93 push r25
66 /* prologue end (size=7) */
All looks sane enough. Saving the zero, temp, and status regs, and the two
regs the ISR uses.
However, why save the zero and tmp regs, when they are not used at all in the
function? Is this because they're "hidden" from GCC, and saved as a precaution?
This is with gcc 3.4.1 (WinAVR), but also does it with gcc 4.0.0 (20050123)
--
Curtis Maloney
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, (continued)
- [avr-gcc-list] Re: [avr-libc-dev] Re: What Happened to the sbi() and cbi() Macros????, Björn Haase, 2005/01/31
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, Galen Seitz, 2005/01/31
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, Kevin Neff, 2005/01/31
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, E. Weddington, 2005/01/31
- Re: [avr-gcc-list] What Happened to the sbi() and cbi() Macros????, Jeff Barlow, 2005/01/31
- Re: [avr-gcc-list] What Happened to the sbi() and cbi() Macros????, Victoria Welch, 2005/01/31
- RE: [avr-gcc-list] What Happened to the sbi() and cbi() Macros????, Ben Mann, 2005/01/31
- [avr-gcc-list] Interrupt prologues,
Curtis Maloney <=
- Re: [avr-gcc-list] Interrupt prologues, E. Weddington, 2005/01/31
- Re: [avr-gcc-list] Interrupt prologues, Curtis Maloney, 2005/01/31
- Re: [avr-gcc-list] avr-gcc/avr-binutils/avr-libc and the ATMega168 - what am I doing wrong, tnx!, Erik Walthinsen, 2005/01/31
- Re: [avr-gcc-list] avr-gcc/avr-binutils/avr-libc and the ATMega168 - what am I doing wrong, tnx!, Victoria Welch, 2005/01/28
Re: [avr-gcc-list] avr-gcc/avr-binutils/avr-libc and the ATMega168 - what did I do wrong here, tnx!, E. Weddington, 2005/01/28