From: SourceForge.net <no...@so...> - 2010-08-08 21:47:48
|
Bugs item #2970351, was opened at 2010-03-14 20:06 Message generated for change (Settings changed) made by spth You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=2970351&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: peephole optimizer Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Claude Sylvain (claude60) >Assigned to: Nobody/Anonymous (nobody) Summary: Handling of non-local jump targets in peephole optimizer Initial Comment: - This is a peephole problem that seems to append when a function is referred from another module. "sdcc -v" says: +++ SDCC : mcs51/gbz80/z80/ds390/pic16/pic14/TININative/ds400/hc08 2.9.7 #5734 (Mar 13 2010) (CYGWIN) +++ SDCC error message: +++ /usr/local/sdcc/bin/sdcc -mz80 --peep-asm -c isr.c -o obj/isr.rel *** internal error: no label has entry for _isr_ace0 in labelRefCountChange peep hole. obj/isr.asm:55: Error: <u> undefined symbol encountered during assembly removing obj/isr.rel make: *** [obj/isr.rel] Error 1 +++ - I created a little project to track down this problem. To reproduce the peephole problem, just type the following commands in project directory: make clean make - I attached the project mentioned above in an archive. Regards, Claude Sylvain csy...@el... Electro-Technica inc. ---------------------------------------------------------------------- Comment By: Philipp Krause (spth) Date: 2010-04-06 10:29 Message: As a temporary workaround tail call optimizations has been disabled in revision #5785. I'll leave this bug report open (with a more descriptive title) until a real fix has been implemented (and tail call optimization can be reenabled). Philipp ---------------------------------------------------------------------- Comment By: Philipp Krause (spth) Date: 2010-03-23 14:01 Message: I have looked into this problem a bit. It is not specific to the Z80 port. The problem is in buildLabelRefCountHash() in SDCCpeeph.c. This function builds an index of all labels used in some asm code. However it only includes labels that lie within that code, ignoring labels, that are only referenced in there. E.g. foo: call bar will result in foo being put into the index, but not bar. buildLabelRefCountHash() should include all labels in the index. Philipp ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=2970351&group_id=599 |