#377 More efficient initialization

closed
z80 port (30)
6
2012-09-30
2012-09-08
No

Large objects in RAM are initialized in a rather inefficient way. Using ldir would be much better, reducing code size for these initializations by a factor of 3 or so. sdcc once even had RLE intialization for this, but it was very broken. Still, efficient initialization of large objects in RAM is desirable.

Philipp

Discussion

  • In revision #8124, I implemented the most important parts of this for the z80, z180, r2k and r3ka ports.

    Still to be implemented: Don't initialize zero variables, handle static local variables.

    Philipp

     
    • assigned_to: nobody --> spth
    • status: open --> closed
     
  • The zeroing of global variables is RFE #3449430, and the handling of static is not z80-specific, so I'll make another request for that one.

    Philipp