Menu

#448 Do not apply workaround for stm8 div bug when there is no division

None
closed-fixed
None
5
2015-08-01
2015-07-21
No

The fix for bug #2401 applies the workaround to all interrupt handlers. We could analyze the function at compile time: Interrupt handlers that have neither '/', '%', RIGHT_OP, CALL nor PCALL iCodes do not need the workaround, since no div or divw instructions can happen in them.

Philipp

Discussion

  • Philipp Klaus Krause

    Implemented. We even do some inter-procedural analysis.
    Will commit when Sourceforge is resurrected.

    Philipp

    P.S.: Some testing on STM8S208MB hardware indicates that division by values less than 128 should be safe for div, but I don't dare rely on that in the compiler.

     
  • Philipp Klaus Krause

    • assigned_to: Philipp Klaus Krause
    • Group: -->
     
  • Philipp Klaus Krause

    I still get "svn: E170001: Authorization failed" whenever I try to commit. To make sure the implementation is not lost, I attach it here.

    Philipp

     
    • Ben Shi

      Ben Shi - 2015-07-31

      if you are sure about the patch, i can apply it for you.

       
  • Philipp Klaus Krause

    Implemented in revision #9289.

    Philipp

    P.S.: The svn problem seems to be a local issue, as I can commit from my university machine, but not from my notebook.

     
  • Philipp Klaus Krause

    • status: open --> closed-fixed
     

Log in to post a comment.