This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Possible bug in arm-linux-GCC 2.95.3 with inline asm


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]