mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Use the size of struct fpreg rather than of the pointer to it when copying
the FPU state. Reviewed by: marcel Approved by: re (kib) MFC after: 1 week
This commit is contained in:
parent
e31fe879a8
commit
21a305d4af
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=224684
|
@ -92,18 +92,21 @@ pt_ucontext_to_reg(const ucontext_t *uc, struct reg *r)
|
||||||
void
|
void
|
||||||
pt_fpreg_to_ucontext(const struct fpreg* r, ucontext_t *uc)
|
pt_fpreg_to_ucontext(const struct fpreg* r, ucontext_t *uc)
|
||||||
{
|
{
|
||||||
memcpy(&uc->uc_mcontext.mc_fpstate, r, sizeof(r));
|
|
||||||
|
memcpy(&uc->uc_mcontext.mc_fpstate, r, sizeof(*r));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r)
|
pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r)
|
||||||
{
|
{
|
||||||
memcpy(r, &uc->uc_mcontext.mc_fpstate, sizeof(r));
|
|
||||||
|
memcpy(r, &uc->uc_mcontext.mc_fpstate, sizeof(*r));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
pt_md_init(void)
|
pt_md_init(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Nothing to do */
|
/* Nothing to do */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue