[Top][All Lists]

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

[avr-gcc-list] Long prologue/epilogue sequences

From: Simon Han
Subject: [avr-gcc-list] Long prologue/epilogue sequences
Date: Tue, 19 Apr 2005 23:30:27 -0700

Hi all,

Maybe I don't know how to write SIGNAL handler. Most of my handlers have rather long prologue and epilogue. They push r18 to r27 and r30 to r31. On the way out, they pop these 12 registers. All these routines do very minimal things, but they all call other functions at the end of SIGNAL handling.

One thing I don't understand is why all these register pushes. Wouldn't it be more efficient to only push the ones that SIGNAL uses? It seems to me that when there is function call in SIGNAL handler, there will be at least 12 register pushes/pops. When there is no function in SIGNAL handler, the register pushes are like normal function calls with "reti".

Could someone point me the documentation that talks about the reason and/or possible solution to this?

Thank you in advance,

reply via email to

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