Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1125 → Rev 1126

/kernel/trunk/arch/mips32/src/exception.c
89,10 → 89,8
ASSERT(THREAD);
istate->epc += 4;
istate->v1 = istate->k1;
} else {
print_regdump(istate);
panic("reserved instruction");
}
} else
unhandled_exception(n, istate);
}
 
static void breakpoint_exception(int n, istate_t *istate)
/kernel/trunk/arch/mips32/src/start.S
251,23 → 251,26
sw $t2,SS_STATUS($sp)
mtc0 $t0, $status
 
# CALL Syscall handler
jal syscall_handler
sw $v0, SS_ARG4($sp) # save v0 - arg4 to stack
 
# restore epc+4
lw $t0,SS_EPC($sp)
addi $t0, $t0, 4
mtc0 $t0, $epc
# restore status
mfc0 $t0, $status
lw $t1,SS_STATUS($sp)
 
# Change back to EXL=1(from last exception), otherwise
# an interrupt could rewrite the CP0-EPC
li $t2, ~REG_SAVE_MASK # Mask UM,EXL,ERL,IE
and $t0, $t0, $t2
or $t0, $t0, $t1 # Copy UM,EXL,ERL,IE from saved status
mtc0 $t0, $status
# restore epc+4
lw $t0,SS_EPC($sp)
addi $t0, $t0, 4
mtc0 $t0, $epc
lw $sp,SS_SP($sp) # restore sp
eret