Can anybody explain the motivation for the code in exception.S for INT0..INT3 where the mode bits are checked and if they are greater than or equal to B`110, that is we are in exception mode, we move the saved PC and SR up on the stack, restore R12, move SP up and do an rete, effectively ignoring the interrupt?
If we autovectored to the code for an interrupt, it seems that the mode bits should be set for that interrupt level. Is this trying to handle getting an enabled interrupt in the middle of handling an exception? The method of handling this situation is to ignore the interrupt, without clearing the interrupt condition, finishing the exception and then coming back to it, by vectoring to the interrupt handler again?
This one has me chasing my tail; can anyone clear up my confusion?
Edit: The version of `exception.S' from NewLib does not suffer from this crock.