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

             Bug #: 51345
           Summary: [avr] Devices with 8-bit SP need their own multilib(s)
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Keywords: FIXME, wrong-code
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: g...@gcc.gnu.org
                CC: eric.wedding...@atmel.com
            Blocks: 51002
            Target: avr


Code that reads SP register must not read from the high byte of SP if the SP is
just 8 bits wide.

The C code will be correct once PR51002 will have been fixed, however, there is
code in libgcc that also reads from __SP_H__ like __prologue_saves__ and
__epilogue_restores__.

The issue is that the 8-bit property is set on the device level in
avr_current_device->short_sp and devices with different settings of short_sp
are mixed up the the same multilib.

Reply via email to