This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/52505] New: [avr]: __memx address space reading unintentionally from RAM


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

             Bug #: 52505
           Summary: [avr]: __memx address space reading unintentionally
                    from RAM
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gjl@gcc.gnu.org
            Target: avr


The __memx address space reader must determine at runtime from what memory area
to read and what instruction to use. To read one byte, ine sequence might look
like:

    ld   r24,Z
    sbrs r25,7
    lpm  r24,Z

This is not correct because if the read is fram flash memory but the address
taken as RAM address points to the I/O area, the read might have an effect on
I/O register, for example clear a latch or buffer.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]