- Notifications
You must be signed in to change notification settings - Fork13.3k
Commit5b3d290
authored
Add synthetic IntegerDivideByZero exception (#7496)
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 divideroutine 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 addressin 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 zeroPC: 0x4000dce5EXCVADDR: 0x00000000Decoding stack results...````1 parentf42327d commit5b3d290
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
147 | 150 | | |
148 | | - | |
| 151 | + | |
149 | 152 | | |
150 | 153 | | |
151 | 154 | | |
| |||
0 commit comments
Comments
(0)