mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-31 16:57:10 +00:00
Implement pt_fpreg_to_ucontext(), pt_ucontext_to_fpreg().
Sponsored by: DARPA, AFRL
This commit is contained in:
parent
f00ebc42b5
commit
d8af1b6af6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=337129
@ -80,15 +80,21 @@ pt_ucontext_to_reg(const ucontext_t *uc, struct reg *r)
|
|||||||
void
|
void
|
||||||
pt_fpreg_to_ucontext(const struct fpreg *r __unused, ucontext_t *uc __unused)
|
pt_fpreg_to_ucontext(const struct fpreg *r __unused, ucontext_t *uc __unused)
|
||||||
{
|
{
|
||||||
|
mcontext_t *mc = &uc->uc_mcontext;
|
||||||
|
|
||||||
/* RISCVTODO */
|
memcpy(&mc->mc_fpregs, r, sizeof(*r));
|
||||||
|
mc->mc_flags |= _MC_FP_VALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
pt_ucontext_to_fpreg(const ucontext_t *uc __unused, struct fpreg *r __unused)
|
pt_ucontext_to_fpreg(const ucontext_t *uc __unused, struct fpreg *r __unused)
|
||||||
{
|
{
|
||||||
|
const mcontext_t *mc = &uc->uc_mcontext;
|
||||||
|
|
||||||
/* RISCVTODO */
|
if (mc->mc_flags & _MC_FP_VALID)
|
||||||
|
memcpy(r, &mc->mc_fpregs, sizeof(*r));
|
||||||
|
else
|
||||||
|
memset(r, 0, sizeof(*r));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user