X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Fi387-tdep.c;h=4b212c4cd97bc8b5f1807b36bd2a0cfde66b67be;hb=2c500098f2a2ade0966e2ac10e0e714474cfcd92;hp=21386fb13f078ace1016b835682c03f46f922a79;hpb=80571bffe3b90a83994c059c774bee3bc6d56749;p=binutils-gdb.git diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c index 21386fb13f0..4b212c4cd97 100644 --- a/gdb/i387-tdep.c +++ b/gdb/i387-tdep.c @@ -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