Changes in kernel/arch/ia64/src/context.S [cf7ad06:9d58539] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/src/context.S
rcf7ad06 r9d58539 27 27 # 28 28 29 #include <arch/context_struct.h>30 31 29 .text 32 30 … … 35 33 36 34 context_save_arch: 37 alloc loc0 = ar.pfs, 1, 49, 0, 0 38 mov loc1 = ar.unat ;; 35 alloc loc0 = ar.pfs, 1, 8, 0, 0 36 mov loc1 = ar.unat ;; 37 /* loc2 */ 39 38 mov loc3 = ar.rsc 40 39 … … 59 58 60 59 mov loc6 = ar.lc 61 62 add loc8 = CONTEXT_OFFSET_AR_PFS, in0 63 add loc9 = CONTEXT_OFFSET_AR_UNAT_CALLER, in0 64 add loc10 = CONTEXT_OFFSET_AR_UNAT_CALLEE, in0 65 add loc11 = CONTEXT_OFFSET_AR_RSC, in0 66 add loc12 = CONTEXT_OFFSET_BSP, in0 67 add loc13 = CONTEXT_OFFSET_AR_RNAT, in0 68 add loc14 = CONTEXT_OFFSET_AR_LC, in0 69 70 add loc15 = CONTEXT_OFFSET_R1, in0 71 add loc16 = CONTEXT_OFFSET_R4, in0 72 add loc17 = CONTEXT_OFFSET_R5, in0 73 add loc18 = CONTEXT_OFFSET_R6, in0 74 add loc19 = CONTEXT_OFFSET_R7, in0 75 add loc20 = CONTEXT_OFFSET_SP, in0 76 add loc21 = CONTEXT_OFFSET_R13, in0 77 78 add loc22 = CONTEXT_OFFSET_PC, in0 79 add loc23 = CONTEXT_OFFSET_B1, in0 80 add loc24 = CONTEXT_OFFSET_B2, in0 81 add loc25 = CONTEXT_OFFSET_B3, in0 82 add loc26 = CONTEXT_OFFSET_B4, in0 83 add loc27 = CONTEXT_OFFSET_B5, in0 84 85 add loc28 = CONTEXT_OFFSET_PR, in0 86 87 add loc29 = CONTEXT_OFFSET_F2, in0 88 add loc30 = CONTEXT_OFFSET_F3, in0 89 add loc31 = CONTEXT_OFFSET_F4, in0 90 add loc32 = CONTEXT_OFFSET_F5, in0 91 92 add loc33 = CONTEXT_OFFSET_F16, in0 93 add loc34 = CONTEXT_OFFSET_F17, in0 94 add loc35 = CONTEXT_OFFSET_F18, in0 95 add loc36 = CONTEXT_OFFSET_F19, in0 96 add loc37 = CONTEXT_OFFSET_F20, in0 97 add loc38 = CONTEXT_OFFSET_F21, in0 98 add loc39 = CONTEXT_OFFSET_F22, in0 99 add loc40 = CONTEXT_OFFSET_F23, in0 100 add loc41 = CONTEXT_OFFSET_F24, in0 101 add loc42 = CONTEXT_OFFSET_F25, in0 102 add loc43 = CONTEXT_OFFSET_F26, in0 103 add loc44 = CONTEXT_OFFSET_F27, in0 104 add loc45 = CONTEXT_OFFSET_F28, in0 105 add loc46 = CONTEXT_OFFSET_F29, in0 106 add loc47 = CONTEXT_OFFSET_F30, in0 107 add loc48 = CONTEXT_OFFSET_F31, in0 ;; 108 60 61 /* 62 * Save application registers 63 */ 64 st8 [in0] = loc0, 8 ;; /* save ar.pfs */ 65 st8 [in0] = loc1, 8 ;; /* save ar.unat (caller) */ 66 mov loc2 = in0 ;; 67 add in0 = 8, in0 ;; /* skip ar.unat (callee) */ 68 st8 [in0] = loc3, 8 ;; /* save ar.rsc */ 69 st8 [in0] = loc4, 8 ;; /* save ar.bsp */ 70 st8 [in0] = loc5, 8 ;; /* save ar.rnat */ 71 st8 [in0] = loc6, 8 ;; /* save ar.lc */ 72 109 73 /* 110 74 * Save general registers including NaT bits 111 75 */ 112 st8.spill [loc15] = r1 ;; 113 st8.spill [loc16] = r4 ;; 114 st8.spill [loc17] = r5 ;; 115 st8.spill [loc18] = r6 ;; 116 st8.spill [loc19] = r7 ;; 117 st8.spill [loc20] = r12 ;; /* save sp */ 118 st8.spill [loc21] = r13 ;; 119 120 mov loc2 = ar.unat 121 122 /* 123 * Save application registers 124 */ 125 st8 [loc8] = loc0 /* save ar.pfs */ 126 st8 [loc9] = loc1 ;; /* save ar.unat (caller) */ 127 st8 [loc10] = loc2 /* save ar.unat (callee) */ 128 st8 [loc11] = loc3 /* save ar.rsc */ 129 st8 [loc12] = loc4 /* save ar.bsp */ 130 st8 [loc13] = loc5 /* save ar.rnat */ 131 st8 [loc14] = loc6 ;; /* save ar.lc */ 76 st8.spill [in0] = r1, 8 ;; 77 st8.spill [in0] = r4, 8 ;; 78 st8.spill [in0] = r5, 8 ;; 79 st8.spill [in0] = r6, 8 ;; 80 st8.spill [in0] = r7, 8 ;; 81 st8.spill [in0] = r12, 8 ;; /* save sp */ 82 st8.spill [in0] = r13, 8 ;; 83 84 mov loc3 = ar.unat ;; 85 st8 [loc2] = loc3 /* save ar.unat (callee) */ 132 86 133 87 /* 134 88 * Save branch registers 135 89 */ 136 mov loc2 = b0 137 mov loc3 = b1138 mov loc 4 = b2139 mov loc5 = b3140 mov loc 6 = b4141 mov loc7 = b5 ;;142 st8 [loc22] = loc2 /* save pc */143 st8 [ loc23] = loc3144 st8 [loc24] = loc4145 st8 [ loc25] = loc5146 st8 [loc26] = loc6147 st8 [ loc27] = loc7 ;;90 mov loc2 = b0 ;; 91 st8 [in0] = loc2, 8 /* save pc */ 92 mov loc3 = b1 ;; 93 st8 [in0] = loc3, 8 94 mov loc4 = b2 ;; 95 st8 [in0] = loc4, 8 96 mov loc5 = b3 ;; 97 st8 [in0] = loc5, 8 98 mov loc6 = b4 ;; 99 st8 [in0] = loc6, 8 100 mov loc7 = b5 ;; 101 st8 [in0] = loc7, 8 148 102 149 103 /* 150 104 * Save predicate registers 151 105 */ 152 mov loc2 = pr 153 st8 [ loc28] = loc2106 mov loc2 = pr ;; 107 st8 [in0] = loc2, 16;; /* Next fpu registers should be spilled to 16B aligned address */ 154 108 155 109 /* 156 110 * Save floating-point registers. 157 111 */ 158 stf.spill [ loc29] = f2159 stf.spill [ loc30] = f3160 stf.spill [ loc31] = f4161 stf.spill [ loc32] = f5162 163 stf.spill [ loc33] = f16164 stf.spill [ loc34] = f17165 stf.spill [ loc35] = f18166 stf.spill [ loc36] = f19167 stf.spill [ loc37] = f20168 stf.spill [ loc38] = f21169 stf.spill [ loc39] = f22170 stf.spill [ loc40] = f23171 stf.spill [ loc41] = f24172 stf.spill [ loc42] = f25173 stf.spill [ loc43] = f26174 stf.spill [ loc44] = f27175 stf.spill [ loc45] = f28176 stf.spill [ loc46] = f29177 stf.spill [ loc47] = f30178 stf.spill [ loc48] = f31112 stf.spill [in0] = f2, 16 ;; 113 stf.spill [in0] = f3, 16 ;; 114 stf.spill [in0] = f4, 16 ;; 115 stf.spill [in0] = f5, 16 ;; 116 117 stf.spill [in0] = f16, 16 ;; 118 stf.spill [in0] = f17, 16 ;; 119 stf.spill [in0] = f18, 16 ;; 120 stf.spill [in0] = f19, 16 ;; 121 stf.spill [in0] = f20, 16 ;; 122 stf.spill [in0] = f21, 16 ;; 123 stf.spill [in0] = f22, 16 ;; 124 stf.spill [in0] = f23, 16 ;; 125 stf.spill [in0] = f24, 16 ;; 126 stf.spill [in0] = f25, 16 ;; 127 stf.spill [in0] = f26, 16 ;; 128 stf.spill [in0] = f27, 16 ;; 129 stf.spill [in0] = f28, 16 ;; 130 stf.spill [in0] = f29, 16 ;; 131 stf.spill [in0] = f30, 16 ;; 132 stf.spill [in0] = f31, 16 ;; 179 133 180 134 mov ar.unat = loc1 181 135 182 add r8 = r0, r0, 1 /* context_save returns 1 */136 add r8 = r0, r0, 1 /* context_save returns 1 */ 183 137 br.ret.sptk.many b0 184 138 185 139 context_restore_arch: 186 alloc loc0 = ar.pfs, 1, 50, 0, 0 ;; 187 188 add loc9 = CONTEXT_OFFSET_AR_PFS, in0 189 add loc10 = CONTEXT_OFFSET_AR_UNAT_CALLER, in0 190 add loc11 = CONTEXT_OFFSET_AR_UNAT_CALLEE, in0 191 add loc12 = CONTEXT_OFFSET_AR_RSC, in0 192 add loc13 = CONTEXT_OFFSET_BSP, in0 193 add loc14 = CONTEXT_OFFSET_AR_RNAT, in0 194 add loc15 = CONTEXT_OFFSET_AR_LC, in0 195 196 add loc16 = CONTEXT_OFFSET_R1, in0 197 add loc17 = CONTEXT_OFFSET_R4, in0 198 add loc18 = CONTEXT_OFFSET_R5, in0 199 add loc19 = CONTEXT_OFFSET_R6, in0 200 add loc20 = CONTEXT_OFFSET_R7, in0 201 add loc21 = CONTEXT_OFFSET_SP, in0 202 add loc22 = CONTEXT_OFFSET_R13, in0 203 204 add loc23 = CONTEXT_OFFSET_PC, in0 205 add loc24 = CONTEXT_OFFSET_B1, in0 206 add loc25 = CONTEXT_OFFSET_B2, in0 207 add loc26 = CONTEXT_OFFSET_B3, in0 208 add loc27 = CONTEXT_OFFSET_B4, in0 209 add loc28 = CONTEXT_OFFSET_B5, in0 210 211 add loc29 = CONTEXT_OFFSET_PR, in0 212 213 add loc30 = CONTEXT_OFFSET_F2, in0 214 add loc31 = CONTEXT_OFFSET_F3, in0 215 add loc32 = CONTEXT_OFFSET_F4, in0 216 add loc33 = CONTEXT_OFFSET_F5, in0 217 218 add loc34 = CONTEXT_OFFSET_F16, in0 219 add loc35 = CONTEXT_OFFSET_F17, in0 220 add loc36 = CONTEXT_OFFSET_F18, in0 221 add loc37 = CONTEXT_OFFSET_F19, in0 222 add loc38 = CONTEXT_OFFSET_F20, in0 223 add loc39 = CONTEXT_OFFSET_F21, in0 224 add loc40 = CONTEXT_OFFSET_F22, in0 225 add loc41 = CONTEXT_OFFSET_F23, in0 226 add loc42 = CONTEXT_OFFSET_F24, in0 227 add loc43 = CONTEXT_OFFSET_F25, in0 228 add loc44 = CONTEXT_OFFSET_F26, in0 229 add loc45 = CONTEXT_OFFSET_F27, in0 230 add loc46 = CONTEXT_OFFSET_F28, in0 231 add loc47 = CONTEXT_OFFSET_F29, in0 232 add loc48 = CONTEXT_OFFSET_F30, in0 233 add loc49 = CONTEXT_OFFSET_F31, in0 ;; 234 235 ld8 loc0 = [loc9] /* load ar.pfs */ 236 ld8 loc1 = [loc10] /* load ar.unat (caller) */ 237 ld8 loc2 = [loc11] /* load ar.unat (callee) */ 238 ld8 loc3 = [loc12] /* load ar.rsc */ 239 ld8 loc4 = [loc13] /* load ar.bsp */ 240 ld8 loc5 = [loc14] /* load ar.rnat */ 241 ld8 loc6 = [loc15] /* load ar.lc */ 140 alloc loc0 = ar.pfs, 1, 9, 0, 0 ;; 141 142 ld8 loc0 = [in0], 8 ;; /* load ar.pfs */ 143 ld8 loc1 = [in0], 8 ;; /* load ar.unat (caller) */ 144 ld8 loc2 = [in0], 8 ;; /* load ar.unat (callee) */ 145 ld8 loc3 = [in0], 8 ;; /* load ar.rsc */ 146 ld8 loc4 = [in0], 8 ;; /* load ar.bsp */ 147 ld8 loc5 = [in0], 8 ;; /* load ar.rnat */ 148 ld8 loc6 = [in0], 8 ;; /* load ar.lc */ 242 149 243 150 .auto … … 273 180 .explicit 274 181 275 mov ar.unat = loc2 182 mov ar.unat = loc2 ;; 276 183 mov ar.lc = loc6 277 184 … … 279 186 * Restore general registers including NaT bits 280 187 */ 281 ld8.fill r1 = [ loc16];;282 ld8.fill r4 = [ loc17];;283 ld8.fill r5 = [ loc18];;284 ld8.fill r6 = [ loc19];;285 ld8.fill r7 = [ loc20];;286 ld8.fill r12 = [ loc21];; /* restore sp */287 ld8.fill r13 = [ loc22];;188 ld8.fill r1 = [in0], 8 ;; 189 ld8.fill r4 = [in0], 8 ;; 190 ld8.fill r5 = [in0], 8 ;; 191 ld8.fill r6 = [in0], 8 ;; 192 ld8.fill r7 = [in0], 8 ;; 193 ld8.fill r12 = [in0], 8 ;; /* restore sp */ 194 ld8.fill r13 = [in0], 8 ;; 288 195 289 196 /* 290 197 * Restore branch registers 291 198 */ 292 ld8 loc2 = [loc23] /* restore pc */ 293 ld8 loc3 = [loc24] 294 ld8 loc4 = [loc25] 295 ld8 loc5 = [loc26] 296 ld8 loc6 = [loc27] 297 ld8 loc7 = [loc28] ;; 199 ld8 loc2 = [in0], 8 ;; /* restore pc */ 298 200 mov b0 = loc2 201 ld8 loc3 = [in0], 8 ;; 299 202 mov b1 = loc3 203 ld8 loc4 = [in0], 8 ;; 300 204 mov b2 = loc4 205 ld8 loc5 = [in0], 8 ;; 301 206 mov b3 = loc5 207 ld8 loc6 = [in0], 8 ;; 302 208 mov b4 = loc6 303 mov b5 = loc7 ;; 209 ld8 loc7 = [in0], 8 ;; 210 mov b5 = loc7 304 211 305 212 /* 306 213 * Restore predicate registers 307 214 */ 308 ld8 loc2 = [ loc29];;215 ld8 loc2 = [in0], 16 ;; 309 216 mov pr = loc2, ~0 310 217 311 218 /* 312 219 * Restore floating-point registers. 313 220 */ 314 ldf.fill f2 = [ loc30]315 ldf.fill f3 = [ loc31]316 ldf.fill f4 = [ loc32]317 ldf.fill f5 = [ loc33]318 319 ldf.fill f16 = [ loc34]320 ldf.fill f17 = [ loc35]321 ldf.fill f18 = [ loc36]322 ldf.fill f19 = [ loc37]323 ldf.fill f20 = [ loc38]324 ldf.fill f21 = [ loc39]325 ldf.fill f22 = [ loc40]326 ldf.fill f23 = [ loc41]327 ldf.fill f24 = [ loc42]328 ldf.fill f25 = [ loc43]329 ldf.fill f26 = [ loc44]330 ldf.fill f27 = [ loc45]331 ldf.fill f28 = [ loc46]332 ldf.fill f29 = [ loc47]333 ldf.fill f30 = [ loc48]334 ldf.fill f31 = [ loc49]221 ldf.fill f2 = [in0], 16 ;; 222 ldf.fill f3 = [in0], 16 ;; 223 ldf.fill f4 = [in0], 16 ;; 224 ldf.fill f5 = [in0], 16 ;; 225 226 ldf.fill f16 = [in0], 16 ;; 227 ldf.fill f17 = [in0], 16 ;; 228 ldf.fill f18 = [in0], 16 ;; 229 ldf.fill f19 = [in0], 16 ;; 230 ldf.fill f20 = [in0], 16 ;; 231 ldf.fill f21 = [in0], 16 ;; 232 ldf.fill f22 = [in0], 16 ;; 233 ldf.fill f23 = [in0], 16 ;; 234 ldf.fill f24 = [in0], 16 ;; 235 ldf.fill f25 = [in0], 16 ;; 236 ldf.fill f26 = [in0], 16 ;; 237 ldf.fill f27 = [in0], 16 ;; 238 ldf.fill f28 = [in0], 16 ;; 239 ldf.fill f29 = [in0], 16 ;; 240 ldf.fill f30 = [in0], 16 ;; 241 ldf.fill f31 = [in0], 16 ;; 335 242 336 243 mov ar.unat = loc1 … … 338 245 mov r8 = r0 /* context_restore returns 0 */ 339 246 br.ret.sptk.many b0 340
Note:
See TracChangeset
for help on using the changeset viewer.