5 ms·
Why? (Honest question).
by mkesper 12y ago
Why? (Honest question).
- unwind 12y agoBecause the instruction raises a software exception if the test fails. This is a rather heavy-handed reaction, although I guess it kind of makes sense from the instruction's point of view I guess. Of course a language runtime based on using this instruction needs to capture the exception and handle it, core-dumping need not be the only option at that point.
- stassats 12y agoPart of the issue is that the interrupt number, 5, is hard-wired. So there really was no need to keep it alive.
- userbinator 12y agoDivide-by-zero has always been interrupt 0, and the page fault is at #14, and that hasn't been problematic... BOUND does raise an exception if it fails but I think that's a good thing - if code is doing array bounds-checking, OOB accesses are very likely to be a bug (and possible security vulnerability) so aborting execution by default is the right thing to do.