Changeset 909c6e3 in mainline for arch/mips/src/exception.c
- Timestamp:
- 2005-09-07T09:44:30Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d246e7e
- Parents:
- 24bd23a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/mips/src/exception.c
r24bd23a r909c6e3 35 35 #include <debug.h> 36 36 37 void exception( void)37 void exception(struct exception_regdump *pstate) 38 38 { 39 39 int excno; 40 __u32 epc;41 40 __u32 epc_shift = 0; 42 41 … … 46 45 * NOTE ON OPERATION ORDERING 47 46 * 48 * On entry, cpu_priority_high() must be called before exception bit is cleared.49 * On exit, exception bit must be set before cpu_priority_restore() is called.47 * On entry, cpu_priority_high() must be called before 48 * exception bit is cleared. 50 49 */ 51 50 52 51 cpu_priority_high(); 53 epc = cp0_epc_read();54 52 cp0_status_write(cp0_status_read() & ~ (cp0_status_exl_exception_bit | 55 53 cp0_status_um_bit)); 56 54 57 if (THREAD) {58 THREAD->saved_epc = epc;59 }60 55 /* decode exception number and process the exception */ 61 56 switch (excno = (cp0_cause_read() >> 2) & 0x1f) { … … 65 60 case EXC_TLBL: 66 61 case EXC_TLBS: 67 tlb_invalid( );62 tlb_invalid(pstate); 68 63 break; 69 64 case EXC_Mod: … … 115 110 } 116 111 117 if (THREAD) 118 epc = THREAD->saved_epc; 119 120 /* Raise EXL bit before epc_write, so that we support 121 * properly nested exceptions 122 */ 123 cp0_status_write(cp0_status_read() | cp0_status_exl_exception_bit); 124 cp0_epc_write(epc + epc_shift); 112 pstate->epc += epc_shift; 125 113 }
Note:
See TracChangeset
for help on using the changeset viewer.