Skip to main content
Visitor II
July 25, 2016
Question

SDCC generates the fastest integer code for STM8

  • July 25, 2016
  • 2 replies
  • 2185 views
Posted on July 25, 2016 at 12:39

Code speed results didn't look that good for SDCC at the time of the SDCC 3.6.0 release about a month ago (http://colecovision.eu/stm8/compilers.shtml). But SDCC has made huge progress since, and now achieves higher Dhrystone and Coremark scores than the other compilers. Here are the results for the current development version (SDCC 3.6.2 #9667): 0690X00000604s9QAA.png

Philipp

P.S.: It's really time to look for some paid work for myself now. This will slow SDCC stm8 progress a bit, since I am the main developer of the stm8 backend in SDCC. However, development will continue both by me and the other SDCC developers.

Note: this post was migrated and contained many threaded conversations, some content may be missing.
    This topic has been closed for replies.

    2 replies

    Visitor II
    December 7, 2016
    Posted on December 07, 2016 at 13:30

    Very interested. Version 3.6.2 will be accessible for free?

    Visitor II
    December 8, 2016
    Posted on December 08, 2016 at 13:18

    SDCC is free. The previous release is 3.6.0, the next release will be 3.7.0 (probably in the first half of 2017). 3.6.2 is a developmental version, not a release version, so you'd have to build it yourself. The most recent snapshots of developmental versions are available at

    http://sdcc.sourceforge.net/snap.php

      as source, Windows and Linux binaries, but they haven't undergone as much testing as the releases.

    Philipp

    Visitor II
    December 8, 2016
    Posted on December 08, 2016 at 14:08

    Ok. Thanks for explanation.

    Visitor II
    November 8, 2017
    Posted on November 08, 2017 at 10:41

    SDCC is a very attractive offer, an open source compiler. However, very would like to have a better code generation for STM8. I want to give a tiny example. The attachment contains files of the simplest real algorithm with pointers and the results of its compilation by the compilers of the SDCC and COSMIC. We can observe a significant difference.

    ________________

    Attachments :

    sdcc-sample.lst.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyIB&d=%2Fa%2F0X0000000b5x%2FAsn7gSRzf2R5KMrLd7E_8eRO0K87BLiEaLqBK3uZTdA&asPdf=false

    cosmic-sample.ls.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyF2&d=%2Fa%2F0X0000000b5v%2FhUNPRTCuGg0pEzlcj51IMDcbMObvk51_0.BDfQ8UxTY&asPdf=false

    sample.c.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyJh&d=%2Fa%2F0X0000000b5w%2FBoXohfy0IWPrLCu1Qu94PqcW0Rd4_Pu5T5YpcswsYcc&asPdf=false
    Visitor II
    November 8, 2017
    Posted on November 08, 2017 at 12:16

    Thanks. In the current development versions, with high optimization setting SDCC genreates slightly better code (making betteruse of register y), but still far wose than Cosmic. Generating code for multiple nearby accesses to different members of one struct definitely is still a weak point of SDCC. I've opened a feature request (

    https://sourceforge.net/p/sdcc/feature-requests/545/

    ) to ensure that this issue remains visible on the SDCC side. This is definitely something that should be looked into after the 3.7.0 release.

    Philipp