mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-06 07:28:44 +08:00
* amd64-tdep.c (amd64_supply_fpregset): Adjust comment.
(amd64_collect_fpregset): New function. (amd64_regset_from_core_section): Use amd64_collect_fpregset.
This commit is contained in:
@ -1,5 +1,9 @@
|
|||||||
2004-05-30 Mark Kettenis <kettenis@gnu.org>
|
2004-05-30 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
|
* amd64-tdep.c (amd64_supply_fpregset): Adjust comment.
|
||||||
|
(amd64_collect_fpregset): New function.
|
||||||
|
(amd64_regset_from_core_section): Use amd64_collect_fpregset.
|
||||||
|
|
||||||
* hppa-tdep.h (hppa_regnum): Add HPPA_R31_REGNUM.
|
* hppa-tdep.h (hppa_regnum): Add HPPA_R31_REGNUM.
|
||||||
|
|
||||||
* i386-tdep.c (i386_supply_gregset): Adjust comment.
|
* i386-tdep.c (i386_supply_gregset): Adjust comment.
|
||||||
|
@ -1048,9 +1048,9 @@ amd64_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Supply register REGNUM from the floating-point register set REGSET
|
/* Supply register REGNUM from the buffer specified by FPREGS and LEN
|
||||||
to register cache REGCACHE. If REGNUM is -1, do this for all
|
in the floating-point register set REGSET to register cache
|
||||||
registers in REGSET. */
|
REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
amd64_supply_fpregset (const struct regset *regset, struct regcache *regcache,
|
amd64_supply_fpregset (const struct regset *regset, struct regcache *regcache,
|
||||||
@ -1062,6 +1062,22 @@ amd64_supply_fpregset (const struct regset *regset, struct regcache *regcache,
|
|||||||
amd64_supply_fxsave (regcache, regnum, fpregs);
|
amd64_supply_fxsave (regcache, regnum, fpregs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Collect register REGNUM from the register cache REGCACHE and store
|
||||||
|
it in the buffer specified by FPREGS and LEN as described by the
|
||||||
|
floating-point register set REGSET. If REGNUM is -1, do this for
|
||||||
|
all registers in REGSET. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
amd64_collect_fpregset (const struct regset *regset,
|
||||||
|
const struct regcache *regcache,
|
||||||
|
int regnum, void *fpregs, size_t len)
|
||||||
|
{
|
||||||
|
const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
|
||||||
|
|
||||||
|
gdb_assert (len == tdep->sizeof_fpregset);
|
||||||
|
amd64_collect_fxsave (regcache, regnum, fpregs);
|
||||||
|
}
|
||||||
|
|
||||||
/* Return the appropriate register set for the core section identified
|
/* Return the appropriate register set for the core section identified
|
||||||
by SECT_NAME and SECT_SIZE. */
|
by SECT_NAME and SECT_SIZE. */
|
||||||
|
|
||||||
@ -1074,7 +1090,8 @@ amd64_regset_from_core_section (struct gdbarch *gdbarch,
|
|||||||
if (strcmp (sect_name, ".reg2") == 0 && sect_size == tdep->sizeof_fpregset)
|
if (strcmp (sect_name, ".reg2") == 0 && sect_size == tdep->sizeof_fpregset)
|
||||||
{
|
{
|
||||||
if (tdep->fpregset == NULL)
|
if (tdep->fpregset == NULL)
|
||||||
tdep->fpregset = regset_alloc (gdbarch, amd64_supply_fpregset, NULL);
|
tdep->fpregset = regset_alloc (gdbarch, amd64_supply_fpregset,
|
||||||
|
amd64_collect_fpregset);
|
||||||
|
|
||||||
return tdep->fpregset;
|
return tdep->fpregset;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user