Date: Wed, 17 Feb 2016 13:49:38 +0000 (UTC) From: Ruslan Bukin <br@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295698 - head/sys/riscv/riscv Message-ID: <201602171349.u1HDncPV036775@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: br Date: Wed Feb 17 13:49:38 2016 New Revision: 295698 URL: https://svnweb.freebsd.org/changeset/base/295698 Log: Add the implementation of savectx(). Modified: head/sys/riscv/riscv/swtch.S Modified: head/sys/riscv/riscv/swtch.S ============================================================================== --- head/sys/riscv/riscv/swtch.S Wed Feb 17 13:43:43 2016 (r295697) +++ head/sys/riscv/riscv/swtch.S Wed Feb 17 13:49:38 2016 (r295698) @@ -256,8 +256,27 @@ ENTRY(fork_trampoline) END(fork_trampoline) ENTRY(savectx) - la a0, .Lsavectx_panic_str - call panic -.Lsavectx_panic_str: - .asciz "savectx_panic: %p\0" + /* Store ra, sp and the callee-saved registers */ + sd ra, (PCB_RA)(a0) + sd sp, (PCB_SP)(a0) + + /* s[0-11] */ + sd s0, (PCB_S + 0 * 8)(a0) + sd s1, (PCB_S + 1 * 8)(a0) + sd s2, (PCB_S + 2 * 8)(a0) + sd s3, (PCB_S + 3 * 8)(a0) + sd s4, (PCB_S + 4 * 8)(a0) + sd s5, (PCB_S + 5 * 8)(a0) + sd s6, (PCB_S + 6 * 8)(a0) + sd s7, (PCB_S + 7 * 8)(a0) + sd s8, (PCB_S + 8 * 8)(a0) + sd s9, (PCB_S + 9 * 8)(a0) + sd s10, (PCB_S + 10 * 8)(a0) + sd s11, (PCB_S + 11 * 8)(a0) + + /* Store the VFP registers */ +#ifdef VFP + /* TODO */ +#endif + ret END(savectx)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602171349.u1HDncPV036775>