This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/11807] GCC should error out when clobbering the stack pointer and frame pointer
- From: "aw11 at os dot inf dot tu-dresden dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Aug 2005 09:13:55 -0000
- Subject: [Bug inline-asm/11807] GCC should error out when clobbering the stack pointer and frame pointer
- References: <20030805124527.11807.aw11@os.inf.tu-dresden.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From aw11 at os dot inf dot tu-dresden dot de 2005-08-26 09:13 -------
GCC must error out when clobbering the frame pointer register because it is
likely to generate faulty code when the frame pointer is clobbered. You have to
save and restore the frame pointer on your own with (x86 push ebp; pop ebp). The
you need not to clobber it.
The only exception could possibly be the compiler option -fno-frame-pointer.
However at the moment GCC for arm generates faulty code even with this option,
if the frame pointer is clobbered.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11807