* i387-tdep.h (i387_collect_fsave): New prototype.

* i387-tdep.c (i387_collect_fsave): New function containing most
of the code from i387_fill_fsave.
(i387_fill_fsave): Call i387_fill_fsave.
This commit is contained in:
Mark Kettenis 2004-03-15 22:44:12 +00:00
parent 871fbe6a50
commit 63b6c53fc1
3 changed files with 30 additions and 5 deletions

View file

@ -1,3 +1,10 @@
2004-03-15 Mark Kettenis <m.kettenis@osp.nl>
* i387-tdep.h (i387_collect_fsave): New prototype.
* i387-tdep.c (i387_collect_fsave): New function containing most
of the code from i387_fill_fsave.
(i387_fill_fsave): Call i387_fill_fsave.
2004-03-15 Mark Kettenis <kettenis@gnu.org>
* i386-linux-tdep.c: Update copyright year.

View file

@ -424,14 +424,13 @@ i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave)
}
/* Fill register REGNUM (if it is a floating-point register) in *FSAVE
with the value in GDB's register cache. If REGNUM is -1, do this
for all registers. This function doesn't touch any of the reserved
bits in *FSAVE. */
with the value from REGCACHE. If REGNUM is -1, do this for all
registers. This function doesn't touch any of the reserved bits in
*FSAVE. */
void
i387_fill_fsave (void *fsave, int regnum)
i387_collect_fsave (const struct regcache *regcache, int regnum, void *fsave)
{
struct regcache *regcache = current_regcache;
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
char *regs = fsave;
int i;
@ -468,6 +467,17 @@ i387_fill_fsave (void *fsave, int regnum)
}
#undef I387_ST0_REGNUM
}
/* Fill register REGNUM (if it is a floating-point register) in *FSAVE
with the value in GDB's register cache. If REGNUM is -1, do this
for all registers. This function doesn't touch any of the reserved
bits in *FSAVE. */
void
i387_fill_fsave (void *fsave, int regnum)
{
i387_collect_fsave (current_regcache, regnum, fsave);
}
/* At fxsave_offset[REGNUM] you'll find the offset to the location in

View file

@ -81,6 +81,14 @@ extern void i387_value_to_register (struct frame_info *frame, int regnum,
extern void i387_supply_fsave (struct regcache *regcache, int regnum,
const void *fsave);
/* Fill register REGNUM (if it is a floating-point register) in *FSAVE
with the value from REGCACHE. If REGNUM is -1, do this for all
registers. This function doesn't touch any of the reserved bits in
*FSAVE. */
extern void i387_collect_fsave (const struct regcache *regcache, int regnum,
void *fsave);
/* Fill register REGNUM (if it is a floating-point register) in *FSAVE
with the value in GDB's register cache. If REGNUM is -1, do this
for all registers. This function doesn't touch any of the reserved