From: SourceForge.net <no...@so...> - 2006-08-08 15:13:42
|
Bugs item #1536762, was opened at 2006-08-08 17:13 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=1536762&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: msc51(8051) target Group: None Status: Open Resolution: None Priority: 5 Submitted By: Thomas Sailer (tsailer) Assigned to: Nobody/Anonymous (nobody) Summary: Bad code generated for *x = 0 where x is an xdata short ptr Initial Comment: sdcc svn4321, command line: sdcc -c -mmcs51 --model-small --debug -I. --xram-size 1024 --code-size 16384 -o t.rel t.c See the attached test case. I could not slim it down more, as removing any of the remaining element apparently causes the register pressure to drop to the point where this bug is not exhibited. The problem lies in the s.c->s = 0; statement, where the compiler stomps itself over the dptr (dpl) register. 119 ; t.c:26: s.c->s = 0; 120 ; genAssign 121 ; genPlus 0008 90s00r00 122 mov dptr,#_s 000B E0 123 movx a,@dptr 000C 24 03 124 add a,#0x03 000E F5 82 125 mov dpl,a 0010 A3 126 inc dptr 0011 E0 127 movx a,@dptr 0012 34 00 128 addc a,#0x00 0014 F5 83 129 mov dph,a 130 ; genPointerSet 131 ; genFarPointerSet 132 ; Peephole 181 changed mov to clr 0016 E4 133 clr a 0017 F0 134 movx @dptr,a ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1536762&group_id=599 |