This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
forcing gcc to save all caller saved registers
- From: Dietmar Maurer <dietmar at ximian dot com>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: 23 Nov 2002 14:09:22 +0100
- Subject: forcing gcc to save all caller saved registers
Hi all,
is there a way to force gcc to save/restore all caller saved registers
in the prolog/epilog.
I currently use the following code to accomplish that (on x86):
a_func ()
{
asm("" : : : "%esi", "%edi", "%ebx");
...
}
That way gcc save/restores all caller saved regs and generates exception
tables able to restore all those registers (when compiled with
-fextections)
Is there any other way to accomplish the same result?
- Dietmar