bugGNU 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 authentification level.

bug #15822: Erroneous code generation of increment.

Submitted by:  Frances Cohen <fcohen>
Submitted on:  Mon 20 Feb 2006 09:28:31 PM UTC  
 
Category: gccSeverity: 3 - Normal
Item Group: sw-bugStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Mon 20 Feb 2006 09:28:31 PM UTC, original submission:

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)

Frances Cohen <fcohen>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

No Changes Have Been Made to This Item

Back to the top


Powered by Savane 3.1-cleanup