This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Possible bug in arm-linux-GCC 2.95.3 with inline asm
- To: Hanish Menon C <hanishkvc at fedtec dot com>
- Subject: Re: Possible bug in arm-linux-GCC 2.95.3 with inline asm
- From: Russell King <rmk at arm dot linux dot org dot uk>
- Date: Wed, 8 Aug 2001 08:49:09 +0100
- Cc: gcc-bugs at gcc dot gnu dot org, crossgcc at sources dot redhat dot com
- References: <Pine.LNX.4.33.0108081225400.15562-100000@hanishkvc.fedtec.com>
On Wed, Aug 08, 2001 at 12:45:28PM +0530, Hanish Menon C wrote:
> Even thou I specify r11 in the mangle list of the inline asm segment, the
> code generated by the compiler stores important value into r11 register
> before the inline asm part and uses it after the inline asm part has
> ended. But has r11 value is corrupted, the code when run misbehaves.
Quite rightfully so. This is not a bug in the toolchain.
As far as the compiler is concerned, there is one and only one use for r11
and that is for the frame pointer. Tt is very clearly defined in the APCS
standard to be either a valid frame pointer, or zero at all times.
That means you shouldn't be writing random values to r11.
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html