summaryrefslogtreecommitdiffstats
path: root/sys/arm
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arm')
-rw-r--r--sys/arm/arm/swtch.S15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/arm/arm/swtch.S b/sys/arm/arm/swtch.S
index 63b20b6..f4fffe8 100644
--- a/sys/arm/arm/swtch.S
+++ b/sys/arm/arm/swtch.S
@@ -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
OpenPOWER on IntegriCloud