[Bug c/12080] arm-elf-gcc-3.2 generates wrong interrupt code w/o optimizations on
jamesl at appliedminds dot com
gcc-bugzilla@gcc.gnu.org
Wed Aug 27 22:16:00 GMT 2003
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.
More information about the Gcc-bugs
mailing list