This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/60247] AVR ATxmega C++ constructor startup in libgcc.S causes boot loop
- From: "gjl at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 31 Mar 2014 17:08:18 +0000
- Subject: [Bug target/60247] AVR ATxmega C++ constructor startup in libgcc.S causes boot loop
- Auto-submitted: auto-generated
- References: <bug-60247-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60247
Georg-Johann Lay <gjl at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target|ATxmega processor |avr
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2014-03-31
CC| |gjl at gcc dot gnu.org
Component|libgcc |target
Ever confirmed|0 |1
Build|avr-gcc port under FreeBSD |x86_64
--- Comment #2 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
Are you sure this is not already fixed by PR45263? Or in version 4.7 and
newer?
4.7 is the oldest supported release series. 4.5 is no more supported.
What do you man by "does not preserve registers before calling constructors"?
The only registers that must be saved are the call-clobbered registers, because
the ABI requires that the callee (constructor) is saving / restoring the
call-saved registers.
If you clobber an SFR like RAMP* or EIND, you must restore them by hand. EIND
must not be changes after .init1 and RAMP* is only saved / restored in ISRs,
cf.notes in the respective manual section:
http://gcc.gnu.org/onlinedocs/gcc/AVR-Options.html
__do_global_dtors uses R16, R17, R28, R29 across constructor calls, all of
which are callee-saved. And before the constructor is called, RAMPZ is reset
to 0.
I don't see anything that's wrong there.