Changes in kernel/arch/ppc32/src/asm.S [ffe276f:b60c582] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ppc32/src/asm.S
rffe276f rb60c582 28 28 29 29 #include <arch/asm/regname.h> 30 #include <arch/cpu.h>31 30 32 31 .text … … 44 43 45 44 userspace_asm: 46 45 47 46 # r3 = uspace_uarg 48 47 # r4 = stack … … 50 49 51 50 # disable interrupts 52 51 53 52 mfmsr r31 54 53 rlwinm r31, r31, 0, 17, 15 … … 61 60 # set problem state, enable interrupts 62 61 63 ori r31, r31, MSR_PR64 ori r31, r31, MSR_EE62 ori r31, r31, msr_pr 63 ori r31, r31, msr_ee 65 64 mtsrr1 r31 66 65 … … 68 67 69 68 mr sp, r4 70 69 71 70 # %r6 is defined to hold pcb_ptr - set it to 0 72 71 73 72 xor r6, r6, r6 74 73 … … 142 141 143 142 # reset decrementer 144 143 145 144 li r31, 1000 146 145 mtdec r31 … … 202 201 lwz r12, 156(sp) 203 202 lwz sp, 160(sp) 204 203 205 204 rfi 206 205 … … 214 213 memcpy_from_uspace: 215 214 memcpy_to_uspace: 216 215 217 216 srwi. r7, r5, 3 218 217 addi r6, r3, -4 219 218 addi r4, r4, -4 220 beq 219 beq 2f 221 220 222 221 andi. r0, r6, 3 … … 226 225 1: 227 226 228 229 230 231 232 233 234 227 lwz r7, 4(r4) 228 lwzu r8, 8(r4) 229 stw r7, 4(r6) 230 stwu r8, 8(r6) 231 bdnz 1b 232 233 andi. r5, r5, 7 235 234 236 235 2: 237 236 238 239 240 241 242 243 237 cmplwi 0, r5, 4 238 blt 3f 239 240 lwzu r0, 4(r4) 241 addi r5, r5, -4 242 stwu r0, 4(r6) 244 243 245 244 3: 246 245 247 248 249 250 251 246 cmpwi 0, r5, 0 247 beqlr 248 mtctr r5 249 addi r4, r4, 3 250 addi r6, r6, 3 252 251 253 252 4: 254 253 255 256 257 258 254 lbzu r0, 1(r4) 255 stbu r0, 1(r6) 256 bdnz 4b 257 blr 259 258 260 259 5: 261 260 262 263 261 subfic r0, r0, 4 262 mtctr r0 264 263 265 264 6: 266 265 267 268 269 270 271 272 273 274 275 276 266 lbz r7, 4(r4) 267 addi r4, r4, 1 268 stb r7, 4(r6) 269 addi r6, r6, 1 270 bdnz 6b 271 subf r5, r0, r5 272 rlwinm. r7, r5, 32-3, 3, 31 273 beq 2b 274 mtctr r7 275 b 1b 277 276 278 277 memcpy_from_uspace_failover_address:
Note:
See TracChangeset
for help on using the changeset viewer.