Subversion Repositories HelenOS-historic

Rev

Rev 319 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 319 Rev 326
Line 49... Line 49...
49
     */
49
     */
50
 
50
 
51
    cpu_priority_high();
51
    cpu_priority_high();
52
    cp0_status_write(cp0_status_read() & ~ (cp0_status_exl_exception_bit |
52
    cp0_status_write(cp0_status_read() & ~ (cp0_status_exl_exception_bit |
53
                        cp0_status_um_bit));
53
                        cp0_status_um_bit));
-
 
54
    /* Save pstate so that the threads can access it */
-
 
55
    if (THREAD)
-
 
56
        THREAD->pstate = pstate;
54
 
57
 
55
    /* decode exception number and process the exception */
58
    /* decode exception number and process the exception */
56
    switch (excno = (cp0_cause_read() >> 2) & 0x1f) {
59
    switch (excno = (cp0_cause_read() >> 2) & 0x1f) {
57
        case EXC_Int:
60
        case EXC_Int:
58
            interrupt();
61
            interrupt();
Line 83... Line 86...
83
            break;
86
            break;
84
        case EXC_RI:
87
        case EXC_RI:
85
            panic("unhandled Reserved Instruction Exception\n");
88
            panic("unhandled Reserved Instruction Exception\n");
86
            break;
89
            break;
87
        case EXC_CpU:
90
        case EXC_CpU:
-
 
91
#ifdef FPU_LAZY     
-
 
92
            scheduler_fpu_lazy_request();
-
 
93
#else
88
            panic("unhandled Coprocessor Unusable Exception\n");
94
            panic("unhandled Coprocessor Unusable Exception\n");
-
 
95
#endif
89
            break;
96
            break;
90
        case EXC_Ov:
97
        case EXC_Ov:
91
            panic("unhandled Arithmetic Overflow Exception\n");
98
            panic("unhandled Arithmetic Overflow Exception\n");
92
            break;
99
            break;
93
        case EXC_Tr:
100
        case EXC_Tr:
Line 108... Line 115...
108
        default:
115
        default:
109
            panic("unhandled exception %d\n", excno);
116
            panic("unhandled exception %d\n", excno);
110
    }
117
    }
111
   
118
   
112
    pstate->epc += epc_shift;
119
    pstate->epc += epc_shift;
-
 
120
    /* Probable not needed, but just for sure that nobody
-
 
121
     * will continue accessing it */
-
 
122
    if (THREAD)
-
 
123
        THREAD->pstate = NULL;
113
}
124
}