URL:
  <http://savannah.nongnu.org/bugs/?45701>

                 Summary: redundant stack initialization in crt1.o
                 Project: AVR C Runtime Library
            Submitted by: None
            Submitted on: Wed 05 Aug 2015 04:03:13 PM UTC
                Category: Library
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Startup code
                  Status: None
        Percent Complete: 0%
             Assigned to: None
        Originator Email: ralphdoncas...@gmail.com
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.8.0
           Fixed Release: None

    _______________________________________________________

Details:

It appears crt1.o always initializes the stack and clears SREG, even for
modern AVRs that don't require it.
While it is necessary for old AVRs like the mega8, since SPH/SPL is
initialized to 0 on reset (datasheet s. 7.5.1), on the tinyx5, tinyx4,
mega48/88/168/328, and many others SPH/SPL is initialized to RAMEND upon
reset.  See, for example, s. 4.8.1 of the tiny84a datasheet.




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?45701>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to