Implement savectx().
Obtained from: NetBSD
This commit is contained in:
parent
f7a1a1e2e5
commit
6d918e02d0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=150856
@ -450,7 +450,22 @@ ENTRY(cpu_switch)
|
||||
.asciz "cpu_switch: sched_qs empty with non-zero sched_whichqs!\n"
|
||||
#endif
|
||||
ENTRY(savectx)
|
||||
stmfd sp!, {r4-r7, lr}
|
||||
/*
|
||||
* r0 = pcb
|
||||
*/
|
||||
/* Store all the registers in the process's pcb */
|
||||
#ifndef __XSCALE__
|
||||
add r2, r0, #(PCB_R8)
|
||||
stmia r2, {r8-r13}
|
||||
#else
|
||||
strd r8, [r0, #(PCB_R8)]
|
||||
strd r10, [r0, #(PCB_R10)]
|
||||
strd r12, [r0, #(PCB_R12)]
|
||||
#endif
|
||||
ldmfd sp!, {r4-r7, pc}
|
||||
RET
|
||||
|
||||
ENTRY(fork_trampoline)
|
||||
mov r1, r5
|
||||
mov r2, sp
|
||||
|
Loading…
Reference in New Issue
Block a user