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