This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/12080] arm-elf-gcc-3.2 generates wrong interrupt code w/o optimizations on
- From: "jamesl at appliedminds dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Aug 2003 22:16:58 -0000
- Subject: [Bug c/12080] arm-elf-gcc-3.2 generates wrong interrupt code w/o optimizations on
- References: <20030827152130.12080.jamesl@appliedminds.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12080
------- Additional Comments From jamesl at appliedminds dot com 2003-08-27 22:16 -------
I would say that this instruction:
ldmea fp, {r3, fp, sp, lr}
is very bad.
Restoring fp from fp?
who knows what the value of fp would be.
Also, the fact that after that you only have:
ldmfd sp!, {ip} means that your stack pointer doesn't get restored to what it
was at function entry.
So after enough interrupts, your stack will be entirely gone.
Oh, I have just cross-compiled gcc-3.3.1, and I have seen the same problem, even
with the -Os and -O2 optimizations.
If I am misinterpreting this assmbly please let me know, but it just looks bad
to me.