Changeset 199 for soft/giet_vm/sys/switch.s
- Timestamp:
- Aug 9, 2012, 2:38:06 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/sys/switch.s
r189 r199 2 2 * This function receives two arguments that are the current task context 3 3 * physical addresses and the next task context physical address. 4 * The DTLB is temporary desactivated... 4 5 ******************************************************************************/ 5 6 … … 17 18 add $27, $4, $0 /* $27 <= &context[curr_task_id] */ 18 19 19 mfc0 $26, $12 /* $26 <= SR */20 sw $26, 0*4($27) /* ctx[0] <= SR */21 20 .set noat 22 21 sw $1, 1*4($27) /* ctx[1] <= $1 */ … … 47 46 sw $25, 25*4($27) /* ctx[25] <= $25 */ 48 47 mflo $26 49 sw $26, 26*4($27) /* ctx[26] <= LO */48 sw $26, 26*4($27) /* ctx[26] <= LO */ 50 49 mfhi $26 51 sw $26, 27*4($27) /* ctx[27] <= H1 */50 sw $26, 27*4($27) /* ctx[27] <= H1 */ 52 51 sw $28, 28*4($27) /* ctx[28] <= $28 */ 53 52 sw $29, 29*4($27) /* ctx[29] <= $29 */ … … 57 56 sw $26, 32*4($27) /* ctx[32] <= EPC */ 58 57 mfc0 $26, $13 59 sw $26, 33*4($27) /* ctx[33] <= CR */ 58 sw $26, 33*4($27) /* ctx[33] <= CR */ 59 mfc0 $26, $12 60 sw $26, 34*4($27) /* ctx[34] <= SR */ 61 mfc0 $26, $8 62 sw $26, 35*4($27) /* ctx[34] <= BVAR */ 60 63 mfc2 $26, $0 61 sw $26, 3 5*4($27) /* ctx[35] <= PTPR */64 sw $26, 39*4($27) /* ctx[35] <= PTPR */ 62 65 63 66 /* restore next task context */ 64 67 add $27, $5, $0 /* $27<= &context[next_task_id] */ 65 68 66 lw $26, 35*4($27)67 mtc2 $26, $0 /* restore PTPR */68 lw $26, 0*4($27)69 mtc0 $26, $12 /* restore SR */70 69 .set noat 71 70 lw $1, 1*4($27) /* restore $1 */ … … 107 106 lw $26, 33*4($27) 108 107 mtc0 $26, $13 /* restore CR */ 108 lw $26, 34*4($27) 109 mtc0 $26, $12 /* restore SR */ 110 lw $26, 35*4($27) 111 mtc0 $26, $8 /* restore BVAR */ 112 lw $26, 39*4($27) 113 mtc2 $26, $0 /* restore PTPR */ 109 114 110 115 /* activate DTLB */
Note: See TracChangeset
for help on using the changeset viewer.