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]
Other format: [Raw text]

[Bug c/12080] arm-elf-gcc-3.2 generates wrong interrupt code w/o optimizations on


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.


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