Menu

#2182 stm8instructionSize() inaccuracies

closed-fixed
None
STM8
5
2013-12-17
2013-06-08
No

stm8instructionSize() reports 2 instead of 3 as instruction size for jp. It reports 3 instead of 2 for addw sp, #byte.

I see this error in revision #8712. Enabling the debug fprintf in line 113 of SDCCpeeph.c helped me find this bug, and is probably useful in debugging it and checking for similar ones.

Philipp

Discussion

  • Philipp Klaus Krause

    I have changed peep.c in a way that makes this bug no longer that bad: We now might miss some optimization potential, but shouldn't generate wrong assembly any more; thus I've enabled peepholes for optimzing absolute into relative jumps.
    Still fixing this bug might allow us to optimize a bit more in a bit more cases.

    Philipp

     
  • Philipp Klaus Krause

    Fixed in revision #8907.

    Philipp

     
  • Philipp Klaus Krause

    • status: open --> closed-fixed
    • assigned_to: Philipp Klaus Krause
     

Log in to post a comment.