#370 More efficient code for long and long long

closed
z80 port (30)
5
2012-07-09
2012-06-24
No

The code generated in the z80-related ports for long and long long variables is often rather inefficient. This is very visible e.g. in the Contiki network code, which uses unsigned long in wuite a few places. A few examples:

1) Inline code for shifts of long long variables should be used instead of the support function. The call overhead is longer than the inline code would be.
2) GET_VALUE_AT_ADDRESS should use ldir when the destination is on the stack.
3) GET_VALUE_AT_ADDRESS should use ld dd, (nn) when loading from a fixed address into registers.
4) POINTER_SET should use lidr when the source is on the stack.
5) POINTER_SET should use ld (nn), dd when storing from registers to a fixed location..

Philipp

Discussion

  • Philipp Klaus Krause

    2), 3), 4) and 5) are implemented in the smallopts branch as of revision #7975.

    Philipp

     
  • Philipp Klaus Krause

    • assigned_to: nobody --> spth
     
  • Philipp Klaus Krause

    1) Is implemented in the smallopts branch in revision #7979.

    Philipp

     
  • Philipp Klaus Krause

    Implemented by merging the smallopts branch in revision #8030.

    Philipp

     
  • Philipp Klaus Krause

    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks