Changeset 8ff0bd2 in mainline for kernel/arch/mips32/include/context_offset.h
- Timestamp:
- 2011-09-04T11:30:58Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 03bc76a
- Parents:
- d2c67e7 (diff), deac215e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/include/context_offset.h
rd2c67e7 r8ff0bd2 63 63 #ifdef __ASM__ 64 64 65 #ifdef KERNEL 66 65 67 #include <arch/asm/regname.h> 66 68 67 # ctx: address of the structure with saved context 69 #else /* KERNEL */ 70 71 #include <libarch/regname.h> 72 73 #endif /* KERNEL */ 74 75 /* ctx: address of the structure with saved context */ 68 76 .macro CONTEXT_SAVE_ARCH_CORE ctx:req 69 sw $s0, OFFSET_S0(\ctx)70 sw $s1, OFFSET_S1(\ctx)71 sw $s2, OFFSET_S2(\ctx)72 sw $s3, OFFSET_S3(\ctx)73 sw $s4, OFFSET_S4(\ctx)74 sw $s5, OFFSET_S5(\ctx)75 sw $s6, OFFSET_S6(\ctx)76 sw $s7, OFFSET_S7(\ctx)77 sw $s8, OFFSET_S8(\ctx)78 sw $gp, OFFSET_GP(\ctx)79 77 sw $s0, OFFSET_S0(\ctx) 78 sw $s1, OFFSET_S1(\ctx) 79 sw $s2, OFFSET_S2(\ctx) 80 sw $s3, OFFSET_S3(\ctx) 81 sw $s4, OFFSET_S4(\ctx) 82 sw $s5, OFFSET_S5(\ctx) 83 sw $s6, OFFSET_S6(\ctx) 84 sw $s7, OFFSET_S7(\ctx) 85 sw $s8, OFFSET_S8(\ctx) 86 sw $gp, OFFSET_GP(\ctx) 87 80 88 #ifndef KERNEL 81 sw $k1, OFFSET_TLS(\ctx)82 89 sw $k1, OFFSET_TLS(\ctx) 90 83 91 #ifdef CONFIG_FPU 84 mfc1 $t0, $2092 mfc1 $t0, $20 85 93 sw $t0, OFFSET_F20(\ctx) 86 87 mfc1 $t0, $2194 95 mfc1 $t0, $21 88 96 sw $t0, OFFSET_F21(\ctx) 89 90 mfc1 $t0, $2297 98 mfc1 $t0, $22 91 99 sw $t0, OFFSET_F22(\ctx) 92 93 mfc1 $t0, $23100 101 mfc1 $t0, $23 94 102 sw $t0, OFFSET_F23(\ctx) 95 96 mfc1 $t0, $24103 104 mfc1 $t0, $24 97 105 sw $t0, OFFSET_F24(\ctx) 98 99 mfc1 $t0, $25106 107 mfc1 $t0, $25 100 108 sw $t0, OFFSET_F25(\ctx) 101 102 mfc1 $t0, $26109 110 mfc1 $t0, $26 103 111 sw $t0, OFFSET_F26(\ctx) 104 105 mfc1 $t0, $27112 113 mfc1 $t0, $27 106 114 sw $t0, OFFSET_F27(\ctx) 107 108 mfc1 $t0, $28115 116 mfc1 $t0, $28 109 117 sw $t0, OFFSET_F28(\ctx) 110 111 mfc1 $t0, $29118 119 mfc1 $t0, $29 112 120 sw $t0, OFFSET_F29(\ctx) 113 121 114 mfc1 $t0, $30122 mfc1 $t0, $30 115 123 sw $t0, OFFSET_F30(\ctx) 116 124 #endif /* CONFIG_FPU */ 117 125 #endif /* KERNEL */ 118 119 sw $ra, OFFSET_PC(\ctx)120 sw $sp, OFFSET_SP(\ctx)126 127 sw $ra, OFFSET_PC(\ctx) 128 sw $sp, OFFSET_SP(\ctx) 121 129 .endm 122 130 123 # ctx: address of the structure with saved context 131 /* ctx: address of the structure with saved context */ 124 132 .macro CONTEXT_RESTORE_ARCH_CORE ctx:req 125 lw $s0, OFFSET_S0(\ctx)126 lw $s1, OFFSET_S1(\ctx)127 lw $s2, OFFSET_S2(\ctx)128 lw $s3, OFFSET_S3(\ctx)129 lw $s4, OFFSET_S4(\ctx)130 lw $s5, OFFSET_S5(\ctx)131 lw $s6, OFFSET_S6(\ctx)132 lw $s7, OFFSET_S7(\ctx)133 lw $s8, OFFSET_S8(\ctx)134 lw $gp, OFFSET_GP(\ctx)133 lw $s0, OFFSET_S0(\ctx) 134 lw $s1, OFFSET_S1(\ctx) 135 lw $s2, OFFSET_S2(\ctx) 136 lw $s3, OFFSET_S3(\ctx) 137 lw $s4, OFFSET_S4(\ctx) 138 lw $s5, OFFSET_S5(\ctx) 139 lw $s6, OFFSET_S6(\ctx) 140 lw $s7, OFFSET_S7(\ctx) 141 lw $s8, OFFSET_S8(\ctx) 142 lw $gp, OFFSET_GP(\ctx) 135 143 #ifndef KERNEL 136 lw $k1, OFFSET_TLS(\ctx)137 144 lw $k1, OFFSET_TLS(\ctx) 145 138 146 #ifdef CONFIG_FPU 139 147 lw $t0, OFFSET_F20(\ctx) 140 mtc1 $t0, $20141 148 mtc1 $t0, $20 149 142 150 lw $t0, OFFSET_F21(\ctx) 143 mtc1 $t0, $21144 151 mtc1 $t0, $21 152 145 153 lw $t0, OFFSET_F22(\ctx) 146 mtc1 $t0, $22147 154 mtc1 $t0, $22 155 148 156 lw $t0, OFFSET_F23(\ctx) 149 mtc1 $t0, $23150 157 mtc1 $t0, $23 158 151 159 lw $t0, OFFSET_F24(\ctx) 152 mtc1 $t0, $24153 160 mtc1 $t0, $24 161 154 162 lw $t0, OFFSET_F25(\ctx) 155 mtc1 $t0, $25156 163 mtc1 $t0, $25 164 157 165 lw $t0, OFFSET_F26(\ctx) 158 mtc1 $t0, $26159 166 mtc1 $t0, $26 167 160 168 lw $t0, OFFSET_F27(\ctx) 161 mtc1 $t0, $27162 169 mtc1 $t0, $27 170 163 171 lw $t0, OFFSET_F28(\ctx) 164 mtc1 $t0, $28165 172 mtc1 $t0, $28 173 166 174 lw $t0, OFFSET_F29(\ctx) 167 mtc1 $t0, $29168 175 mtc1 $t0, $29 176 169 177 lw $t0, OFFSET_F30(\ctx) 170 mtc1 $t0, $30178 mtc1 $t0, $30 171 179 #endif /* CONFIG_FPU */ 172 180 #endif /* KERNEL */ 173 174 lw $ra, OFFSET_PC(\ctx)175 lw $sp, OFFSET_SP(\ctx)181 182 lw $ra, OFFSET_PC(\ctx) 183 lw $sp, OFFSET_SP(\ctx) 176 184 .endm 177 185 178 #endif 179 186 #endif /* __ASM__ */ 180 187 181 188 #endif
Note:
See TracChangeset
for help on using the changeset viewer.