public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug translation/54067] New: arm-none-eabi with -mapcs and attribute((interrupt)) generates wrong stack alignment
@ 2012-07-22 17:57 mrks at koios dot de
  2012-07-23 10:00 ` [Bug translation/54067] " rearnsha at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: mrks at koios dot de @ 2012-07-22 17:57 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54067

             Bug #: 54067
           Summary: arm-none-eabi with -mapcs and attribute((interrupt))
                    generates wrong stack alignment
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: translation
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: mrks@koios.de


Created attachment 27853
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27853
simple code to reproduce error

If a function has __attribute__((interrupt("IRQ"))) set and is compiled with
arm-none-eabi and the option -mapcs, the generated prologue looks something
like

push {ip}
...
push {...}
...
sub sp, sp, ...

the first push {ip} is special when compiling with -mapcs and the function
attribute, but it seems this extra word is ignored when the stack is to be
aligned.
Thus when strd/ldrd instructions are generated accessing the stack you'll end
up in an alignment fault.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-11-19 11:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-22 17:57 [Bug translation/54067] New: arm-none-eabi with -mapcs and attribute((interrupt)) generates wrong stack alignment mrks at koios dot de
2012-07-23 10:00 ` [Bug translation/54067] " rearnsha at gcc dot gnu.org
2012-07-23 10:26 ` rearnsha at gcc dot gnu.org
2012-09-04 19:53 ` ramana at gcc dot gnu.org
2012-11-19 11:58 ` [Bug target/54067] " redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).