Message-ID: <32B0C833.3D0E@gbrmpa.gov.au> Date: Fri, 13 Dec 1996 11:06:29 +0800 From: Leath Muller Reply-To: leathm AT gbrmpa DOT gov DOT au Organization: Great Barrier Reef Marine Park Authority MIME-Version: 1.0 To: Benjamin D Chambers CC: beppu AT rigel DOT oac DOT uci DOT edu, djgpp AT delorie DOT com Subject: Re: [asm] what registers to preserve References: <58a7kc$1pa AT news DOT service DOT uci DOT edu> <58jcu5$l6b AT leporello DOT cs DOT unibo DOT it> <58m368$12a AT news DOT service DOT uci DOT edu> <19961213 DOT 161851 DOT 5007 DOT 1 DOT chambersb AT juno DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > > Damn. I didn't want to see that. When I dump the assembler output > > of a function written in C, it doesn't look as if it preserves every > > register it uses. > Is that with or without optimization? > GCC sometimes tries to avoid pushes and pops by 'remembering' what's in > which registers, and leaving them alone if the contents are needed later. Hmmm...I wrap my functions in a C subroutine, and generally don't have to push or pop everything at all... everything is taken care of for me... ie: the whole routine is void foo() { asm volatile (" ... "); } Leathal.