Changeset 406 for trunk/hal/tsar_mips32/core/hal_switch.S
- Timestamp:
- Aug 29, 2017, 12:03:37 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/core/hal_switch.S
r367 r406 30 30 #--------------------------------------------------------------------------------- 31 31 32 .section . text, "ax" , @progbits32 .section .switch , "ax" , @progbits 33 33 34 .ent hal_do_switch35 .glob lhal_do_switch34 .ent hal_do_switch 35 .global hal_do_switch 36 36 37 .set noat38 .set noreorder37 .set noat 38 .set noreorder 39 39 40 40 hal_do_switch: … … 84 84 sw $31, 31*4($26) 85 85 86 mfc0 $27, $12 87 sw $27, 34*4($26) /* save c0_sr to slot 34 */ 88 mfc0 $27, $4, 2 89 sw $27, 35*4($26) /* save c0_th to slot 35 */ 90 86 91 mfc2 $27, $0 87 92 sw $27, 32*4($26) /* save c2_ptpr to slot 32 */ 88 93 mfc2 $27, $1 89 94 sw $27, 33*4($26) /* save c2_mode to slot 33 */ 90 91 mfc0 $27, $1292 sw $27, 34*4($26) /* save c0_sr to slot 34 */93 mfc0 $27, $4, 294 sw $27, 35*4($26) /* save c0_th to slot 35 */95 95 96 96 sync … … 140 140 lw $31, 31*4($26) 141 141 142 lw $27, 32*4($26) 142 lw $27, 32*4($26) /* $27 <= c2_ptpr */ 143 143 mtc2 $27, $0 /* restore c2_ptpr from slot 32 */ 144 lw $27, 33*4($26) 144 145 lw $27, 35*4($26) /* $27 <= c0_th */ 146 mtc0 $27, $4, 2 /* restore c0_th from slot 35 */ 147 148 lw $27, 33*4($26) /* $27 <= c2_mode */ 149 lw $26, 34*4($26) /* $26 <= c0_sr */ 150 145 151 mtc2 $27, $1 /* restore c2_mode from slot 33 */ 146 147 lw $27, 34*4($26) 148 mtc0 $27, $12 /* restore c0_sr from slot 34 */ 149 lw $27, 35*4($26) 150 mtc0 $27, $4, 2 /* restore co_th from slot 35 */ 152 mtc0 $26, $12 /* restore c0_sr from slot 34 */ 151 153 152 154 jr $31 /* return to caller */
Note: See TracChangeset
for help on using the changeset viewer.