* i387-tdep.h (i387_collect_fsave): New prototype.
authorMark Kettenis <kettenis@gnu.org>
Mon, 15 Mar 2004 22:44:12 +0000 (22:44 +0000)
committerMark Kettenis <kettenis@gnu.org>
Mon, 15 Mar 2004 22:44:12 +0000 (22:44 +0000)
* i387-tdep.c (i387_collect_fsave): New function containing most
of the code from i387_fill_fsave.
(i387_fill_fsave): Call i387_fill_fsave.

gdb/ChangeLog
gdb/i387-tdep.c
gdb/i387-tdep.h

index e09535904b7f59213807d4a314a9a59b6ea89dd3..aa8c62c624d341aab074b591fb2aed26b2c50378 100644 (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.
index 21386fb13f078ace1016b835682c03f46f922a79..4b212c4cd97bc8b5f1807b36bd2a0cfde66b67be 100644 (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);
+}
 \f
 
 /* At fxsave_offset[REGNUM] you'll find the offset to the location in
index 978fdf9937e1edfce70148b60b5a1c15a005ab2d..38e6755989067becc9f3fad317fd6dd9b0c89277 100644 (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
This page took 0.028402 seconds and 4 git commands to generate.