public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/45263]  New: registers used in __do_global_ctors can get clobbered
@ 2010-08-12  1:20 gcc at d-silva dot org
  2010-08-12  1:21 ` [Bug target/45263] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 23+ messages in thread
From: gcc at d-silva dot org @ 2010-08-12  1:20 UTC (permalink / raw)
  To: gcc-bugs

In gcc/config/avr/libgcc.S, revision 143306, a change to __do_global_ctors &
__do_global_dtors was made which makes use of register r20.

This register can be used to pass parameters to the constructors, but it is not
pushed/popped from the stack, so it will get clobbered if a constructor uses
that register.

I have currently worked around it by pushing/popping r20 around the call to
__tablejump__, but I am not convinced that this is the correct fix (the
constructors should probably push & pop r20 themselves).


-- 
           Summary: registers used in __do_global_ctors can get clobbered
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gcc at d-silva dot org
  GCC host triplet: i686-pc-mingw32
GCC target triplet: avr


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


^ permalink raw reply	[flat|nested] 23+ messages in thread
[parent not found: <bug-45263-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2014-03-31 20:09 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-12  1:20 [Bug c/45263] New: registers used in __do_global_ctors can get clobbered gcc at d-silva dot org
2010-08-12  1:21 ` [Bug target/45263] " pinskia at gcc dot gnu dot org
2010-08-12  1:21 ` gcc at d-silva dot org
2010-08-12  1:22 ` gcc at d-silva dot org
2010-08-12  1:23 ` gcc at d-silva dot org
2010-08-12  2:40 ` gcc at d-silva dot org
2010-08-22 13:26 ` eric dot weddington at atmel dot com
2010-08-22 15:56 ` ah dot linder at arcor dot de
     [not found] <bug-45263-4@http.gcc.gnu.org/bugzilla/>
2010-11-20  3:53 ` orangewarrior at gmail dot com
2010-11-29 15:00 ` rguenth at gcc dot gnu.org
2010-11-30 15:22 ` mschulze at ivs dot cs.ovgu.de
2010-11-30 15:41 ` mschulze at ivs dot cs.ovgu.de
2010-12-04  3:11 ` westfw at yahoo dot com
2010-12-05 19:53 ` eric.weddington at atmel dot com
2010-12-06  9:08 ` mschulze at ivs dot cs.ovgu.de
2011-04-13 16:38 ` gjl at gcc dot gnu.org
2011-04-13 16:46 ` gjl at gcc dot gnu.org
2011-04-14 15:40 ` gjl at gcc dot gnu.org
2011-05-30  8:56 ` gjl at gcc dot gnu.org
2011-05-30 15:23 ` gjl at gcc dot gnu.org
2012-05-02 17:25 ` gjl at gcc dot gnu.org
2012-05-02 17:28 ` gjl at gcc dot gnu.org
2014-03-31 20:09 ` gjl 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).