Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add synthetic IntegerDivideByZero exception #7496

Merged
merged 3 commits into from
Aug 17, 2020

Commits on Aug 1, 2020

  1. Add synthetic IntegerDivideByZero exception

    The ROM routine __divsi3 is called by code whenever a division is needed,
    because there is no divide unit on the ESP8266 core.  When the divide
    routine in ROM hits a div-by-zero case, it jumpt to an ILL(egal instruction)
    at a fixed address which causes a HW exception 0 (IllegalInsnException).
    
    In the postmortem dump, when an ILL exception is detected at this address
    in ROM, convert it to a DivByZeroException for printout (6).
    
    Divde by zero errors now print as follows:
    ````
    --------------- CUT HERE FOR EXCEPTION DECODER ---------------
    Exception (6):
    epc1=0x4000dce5 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
    
    >>>stack>>>
    ...
    <<<stack<<<
    --------------- CUT HERE FOR EXCEPTION DECODER ---------------
    ````
    
    And will decode as follows:
    ````
    Exception 6: IntegerDivideByZero: QUOS, QUOU, REMS, or REMU divisor operand is zero
    PC: 0x4000dce5
    EXCVADDR: 0x00000000
    
    Decoding stack results
    ...
    ````
    earlephilhower committed Aug 1, 2020
    Configuration menu
    Copy the full SHA
    e084fc8 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2020

  1. Configuration menu
    Copy the full SHA
    945722e View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2020

  1. Configuration menu
    Copy the full SHA
    f4583a0 View commit details
    Browse the repository at this point in the history