diff options
author | cognet <cognet@FreeBSD.org> | 2005-10-03 14:05:38 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2005-10-03 14:05:38 +0000 |
commit | 1405f2474b330f846b4c580b16c95d731b2c4fa6 (patch) | |
tree | 65f1ae978d9b05045fc9ead3dc1d60087dc1a191 /sys/arm | |
parent | 1b8bcb97f0c240d85dd7f58e1ce2123b9cfe6232 (diff) | |
download | FreeBSD-src-1405f2474b330f846b4c580b16c95d731b2c4fa6.zip FreeBSD-src-1405f2474b330f846b4c580b16c95d731b2c4fa6.tar.gz |
Implement savectx().
Obtained from: NetBSD
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/arm/swtch.S | 15 |
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 |