From: SourceForge.net <no...@so...> - 2006-05-15 17:50:18
|
Bugs item #1489016, was opened at 2006-05-15 10:50 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1489016&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Icode generator Group: non bugs Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: code array access regressed Initial Comment: Hi. This is not a bug strictly speaking, but recently some change was added to CVS, which enlarges my prog so much that it no longer fits into a flash rom. This code (also attached) demonstrates the problem: --- code unsigned char arr[] = { 1, 2, 3 }; unsigned char a = 1; unsigned char main() { return arr[a]; } --- Older sdcc: --- mov dptr,#_arr movc a,@a+dptr ; genRet --- Newer sdcc: --- mov a,_a add a,#_arr mov dpl,a ; Peephole 181 changed mov to clr clr a addc a,#(_arr >> 8) mov dph,a ; genPointerGet ; genCodePointerGet ; Peephole 181 changed mov to clr clr a movc a,@a+dptr ; genRet --- ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1489016&group_id=599 |