Changeset 2bd4fdf in mainline for arch/mips/src/exception.c
- Timestamp:
- 2005-09-06T23:10:17Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0b512a8
- Parents:
- 2c9de7e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/mips/src/exception.c
r2c9de7e r2bd4fdf 40 40 __u32 epc; 41 41 __u32 epc_shift = 0; 42 pri_t pri;43 42 44 43 ASSERT(CPU != NULL); … … 51 50 */ 52 51 53 pri =cpu_priority_high();52 cpu_priority_high(); 54 53 epc = cp0_epc_read(); 55 cp0_status_write(cp0_status_read() & ~ cp0_status_exl_exception_bit); 54 cp0_status_write(cp0_status_read() & ~ (cp0_status_exl_exception_bit | 55 cp0_status_um_bit)); 56 56 57 57 if (THREAD) { 58 THREAD->saved_pri = pri;59 58 THREAD->saved_epc = epc; 60 59 } … … 116 115 } 117 116 118 if (THREAD) { 119 pri = THREAD->saved_pri; 117 if (THREAD) 120 118 epc = THREAD->saved_epc; 121 } 122 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); 123 124 cp0_epc_write(epc + epc_shift); 124 cp0_status_write(cp0_status_read() | cp0_status_exl_exception_bit);125 cpu_priority_restore(pri);126 125 }
Note:
See TracChangeset
for help on using the changeset viewer.