From: SourceForge.net <no...@so...> - 2012-01-25 16:12:26
|
Bugs item #3427564, was opened at 2011-10-23 09:32 Message generated for change (Comment added) made by ahelper You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3427564&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: z80 port Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: AHelper (ahelper) Assigned to: Nobody/Anonymous (nobody) Summary: Code generation for z80 fails in op8_cost Initial Comment: (This bug was noticed in the optralloc branch many months ago and is present in #6988) Building the provided code for the z80 produces an error in gen.c:832 after asserting with 'op8_cost op2: 4' twice on the same line. Compiles fine using 3.0.2, giving no errors and output. Using --oldralloc with #6988 produces only one generation error. Workaround: Editing gen.c to return something (1 for ex.) for AOP_SFR in op8_cost allows the code to be properly compiled. This also worked on the optralloc branch. Compiled using: sdcc -mz80 bug.c sdcc -mz80 --oldralloc bug.c Let me know if I am missing something. ---------------------------------------------------------------------- >Comment By: AHelper (ahelper) Date: 2012-01-25 08:12 Message: I believe that this bug is still present in trunk iirc, although I have been unable to use SDCC when the optralloc branch merged as code generation either is incorrect or causes compiler crashes. If you want, I can get you the parts that fail still (hopefully none :-) ). ---------------------------------------------------------------------- Comment By: Philipp Klaus Krause (spth) Date: 2012-01-25 05:23 Message: The asm produced by 3.0.4 is broken, so in older versions, this bug was even more serious. Philipp ---------------------------------------------------------------------- Comment By: AHelper (ahelper) Date: 2011-11-27 14:59 Message: Sorry for the delay, I was working on other projects and forgot about this. I have grabbed 3.0.4 just before it merged the optralloc branch. Attached is the asm output. ---------------------------------------------------------------------- Comment By: Philipp Klaus Krause (spth) Date: 2011-11-05 09:01 Message: Unfortunately making op8_cost return the correct value will result in another bug: The generated code is broken: ld a,#0x87 in a,(_Port_Mem_B2) sub a, a What did the generated code in 3.0.2 look like? Philipp ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3427564&group_id=599 |