GNU Development Chain for 68HC11/68HC12 - Bugs: bug #15822, Erroneous code generation of...
You are not allowed to post comments on this tracker with your current authentication level.
bug #15822: Erroneous code generation of increment.
Submitter: | Frances Cohen <fcohen> | ||
Submitted: | Mon 20 Feb 2006 09:28:31 PM UTC | ||
Category: | gcc | Severity: | 3 - Normal |
Item Group: | sw-bug | Status: | None |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Open |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
CC list is empty
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
No changes have been made to this item
Powered by Savane 3.13-f8d8.
Corresponding source code
The following line:
_io_ports[MC6812_SCIDRL + m_Port]= m_TXBuffer[m_TxHead++];
Is generating a bad increment of m_TxHead. The increment of the above line is being compiled as:
LDX _Frame (1292)
INC 1A, X
when it should read
LDX _Frame (1292)
LDX 0, X
LDX 1A, X
In short, it is losing a layer of indirection, and updating offset the stack frame instead of offset my "this" pointer. It worked when my "m_Port" was 8 bit, but failed when I changed it to 16 bit (if that is any help).
I am using the latest 3.1 compiler (is also on 3.01 compiler). My flags are:
CXXFLAGS +=-g -c -Os -mshort -fno-exceptions -fno-rtti -m68hc12 $(INCLUDEFLAGS)