Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Introduce i387_collect_fsave
  2004-03-19  0:09 [PATCH] Introduce i387_collect_fsave Mark Kettenis
@ 2004-03-15 22:48 ` Mark Kettenis
  2004-03-16 19:35 ` Eli Zaretskii
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Kettenis @ 2004-03-15 22:48 UTC (permalink / raw)
  To: gdb-patches

Similar to what I already did for i387_collect_fxsave.  The old
i387_fill_fsave and i387_fill_fxsave will be eliminated somewhere in
the future.

Committed,

Mark


Index: ChangeLog
from  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.

Index: i387-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i387-tdep.c,v
retrieving revision 1.39
diff -u -p -r1.39 i387-tdep.c
--- i387-tdep.c 28 Feb 2004 20:43:51 -0000 1.39
+++ i387-tdep.c 15 Mar 2004 22:41:24 -0000
@@ -424,14 +424,13 @@ i387_supply_fsave (struct regcache *regc
 }
 
 /* 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;
@@ -467,6 +466,17 @@ i387_fill_fsave (void *fsave, int regnum
 	  regcache_raw_collect (regcache, i, FSAVE_ADDR (regs, i));
       }
 #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
 
Index: i387-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/i387-tdep.h,v
retrieving revision 1.11
diff -u -p -r1.11 i387-tdep.h
--- i387-tdep.h 28 Feb 2004 20:43:51 -0000 1.11
+++ i387-tdep.h 15 Mar 2004 22:41:24 -0000
@@ -82,6 +82,14 @@ extern void i387_supply_fsave (struct re
 			       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
    bits in *FSAVE.  */


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Introduce i387_collect_fsave
  2004-03-19  0:09 [PATCH] Introduce i387_collect_fsave Mark Kettenis
  2004-03-15 22:48 ` Mark Kettenis
@ 2004-03-16 19:35 ` Eli Zaretskii
  2004-03-19  0:09   ` Mark Kettenis
  2004-03-19  0:09   ` Eli Zaretskii
  1 sibling, 2 replies; 6+ messages in thread
From: Eli Zaretskii @ 2004-03-16 19:35 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb-patches

> Date: Mon, 15 Mar 2004 23:48:24 +0100 (CET)
> From: Mark Kettenis <kettenis@chello.nl>
> 
> 	(i387_fill_fsave): Call i387_fill_fsave.
                                ^^^^^^^^^^^^^^^
You probably meant i387_collect_fsave.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Introduce i387_collect_fsave
  2004-03-19  0:09   ` Mark Kettenis
@ 2004-03-17  0:22     ` Mark Kettenis
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Kettenis @ 2004-03-17  0:22 UTC (permalink / raw)
  To: eliz; +Cc: gdb-patches

   Date: Tue, 16 Mar 2004 21:33:28 +0200
   From: "Eli Zaretskii" <eliz@elta.co.il>

   > Date: Mon, 15 Mar 2004 23:48:24 +0100 (CET)
   > From: Mark Kettenis <kettenis@chello.nl>
   > 
   > 	(i387_fill_fsave): Call i387_fill_fsave.
				   ^^^^^^^^^^^^^^^
   You probably meant i387_collect_fsave.

Oops, yes, thanks.  Corrected now.

Mark


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] Introduce i387_collect_fsave
@ 2004-03-19  0:09 Mark Kettenis
  2004-03-15 22:48 ` Mark Kettenis
  2004-03-16 19:35 ` Eli Zaretskii
  0 siblings, 2 replies; 6+ messages in thread
From: Mark Kettenis @ 2004-03-19  0:09 UTC (permalink / raw)
  To: gdb-patches

Similar to what I already did for i387_collect_fxsave.  The old
i387_fill_fsave and i387_fill_fxsave will be eliminated somewhere in
the future.

Committed,

Mark


Index: ChangeLog
from  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.

Index: i387-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i387-tdep.c,v
retrieving revision 1.39
diff -u -p -r1.39 i387-tdep.c
--- i387-tdep.c 28 Feb 2004 20:43:51 -0000 1.39
+++ i387-tdep.c 15 Mar 2004 22:41:24 -0000
@@ -424,14 +424,13 @@ i387_supply_fsave (struct regcache *regc
 }
 
 /* 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;
@@ -467,6 +466,17 @@ i387_fill_fsave (void *fsave, int regnum
 	  regcache_raw_collect (regcache, i, FSAVE_ADDR (regs, i));
       }
 #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
 
Index: i387-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/i387-tdep.h,v
retrieving revision 1.11
diff -u -p -r1.11 i387-tdep.h
--- i387-tdep.h 28 Feb 2004 20:43:51 -0000 1.11
+++ i387-tdep.h 15 Mar 2004 22:41:24 -0000
@@ -82,6 +82,14 @@ extern void i387_supply_fsave (struct re
 			       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
    bits in *FSAVE.  */


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Introduce i387_collect_fsave
  2004-03-16 19:35 ` Eli Zaretskii
@ 2004-03-19  0:09   ` Mark Kettenis
  2004-03-17  0:22     ` Mark Kettenis
  2004-03-19  0:09   ` Eli Zaretskii
  1 sibling, 1 reply; 6+ messages in thread
From: Mark Kettenis @ 2004-03-19  0:09 UTC (permalink / raw)
  To: eliz; +Cc: gdb-patches

   Date: Tue, 16 Mar 2004 21:33:28 +0200
   From: "Eli Zaretskii" <eliz@elta.co.il>

   > Date: Mon, 15 Mar 2004 23:48:24 +0100 (CET)
   > From: Mark Kettenis <kettenis@chello.nl>
   > 
   > 	(i387_fill_fsave): Call i387_fill_fsave.
				   ^^^^^^^^^^^^^^^
   You probably meant i387_collect_fsave.

Oops, yes, thanks.  Corrected now.

Mark


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Introduce i387_collect_fsave
  2004-03-16 19:35 ` Eli Zaretskii
  2004-03-19  0:09   ` Mark Kettenis
@ 2004-03-19  0:09   ` Eli Zaretskii
  1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2004-03-19  0:09 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb-patches

> Date: Mon, 15 Mar 2004 23:48:24 +0100 (CET)
> From: Mark Kettenis <kettenis@chello.nl>
> 
> 	(i387_fill_fsave): Call i387_fill_fsave.
                                ^^^^^^^^^^^^^^^
You probably meant i387_collect_fsave.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-03-17  0:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-19  0:09 [PATCH] Introduce i387_collect_fsave Mark Kettenis
2004-03-15 22:48 ` Mark Kettenis
2004-03-16 19:35 ` Eli Zaretskii
2004-03-19  0:09   ` Mark Kettenis
2004-03-17  0:22     ` Mark Kettenis
2004-03-19  0:09   ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox