|
@@ -472,17 +472,15 @@ pub extern "C" fn start_trap_rust(trap_frame: *const TrapFrame) {
|
|
|
|
|
|
if cause.is_exception() {
|
|
|
ExceptionHandler(&*trap_frame)
|
|
|
- } else {
|
|
|
- if cause.code() < __INTERRUPTS.len() {
|
|
|
- let h = &__INTERRUPTS[cause.code()];
|
|
|
- if h.reserved == 0 {
|
|
|
- DefaultHandler();
|
|
|
- } else {
|
|
|
- (h.handler)();
|
|
|
- }
|
|
|
- } else {
|
|
|
+ } else if cause.code() < __INTERRUPTS.len() {
|
|
|
+ let h = &__INTERRUPTS[cause.code()];
|
|
|
+ if h.reserved == 0 {
|
|
|
DefaultHandler();
|
|
|
+ } else {
|
|
|
+ (h.handler)();
|
|
|
}
|
|
|
+ } else {
|
|
|
+ DefaultHandler();
|
|
|
}
|
|
|
}
|
|
|
}
|