#1536 hl overwritten

closed-fixed
z80 port (188)
5
2013-05-25
2009-05-23
No

adcc sometimes generates code where hl is overwritten (storing a temporarily used address) even though it already holds a value. This was first noticed as #2646174 and did appear to be restricted to the scenario described there. However it now seems this is a more general problem. As generic solution would probably result in more efficient code generation for memcpy(), too, compared to the current workaround introduced in rev. #5456.

In the attached file the comparison if (players[i].xx > max_xx) in line 58 is affected by the bug, in revisions #5456 and current svn.

Philipp

Discussion

  • sdcc generates incorrect code overwriting value in hl.

     
    Attachments
    • milestone: --> fixed
    • assigned_to: nobody --> spth
    • status: open --> closed-fixed
     
  • Fixed in sdcc revision #5460 (at least for destroying hl in assignments).

    Philipp