This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned
- From: "mikulas at artax dot karlin dot mff dot cuni dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Sep 2009 09:36:46 -0000
- Subject: [Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned
- References: <bug-40838-1600@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #56 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-09-27 09:36 -------
As for this "old code that assumes 16-byte alignment": this is wrong code
generated by old versions of gcc. It only works as long as it is called from
other gcc >= 3 code (call it from gcc < 3, icc or assembler and it crashes). So
you don't have to realign the stack to make sure that the code works always (it
doesn't, anyway). All you have to do with this old code is to make sure that
you don't make things worse --- i.e. if it worked before, it should continue
work after redesign. So all you need is to make a stack frame having a multiple
of 16-bytes. No realign needed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838