This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: GCC bug on PowerPC with gcc 2.95.2?
- To: Cort Dougan <cort at fsmlabs dot com>
- Subject: Re: GCC bug on PowerPC with gcc 2.95.2?
- From: Geoff Keating <geoffk at geoffk dot org>
- Date: 21 May 2001 15:42:16 -0700
- CC: gcc-bugs at gcc dot gnu dot org
- References: <20010521162656.S19006@ftsoj.fsmlabs.com>
Cort Dougan <cort@fsmlabs.com> writes:
> In the inline asm I change r1 but I tell gcc in the 'modifies' constraint
> that I've changed it. The output asm shows that it doesn't save/restore r1
> during that code, though.
r1 is the stack pointer. GCC assumes that if you change it, you meant
it to be changed.
Even if GCC saved it, it would save it on the stack, and of course
then there'd be no way to restore it.
--
- Geoffrey Keating <geoffk@geoffk.org>