* [RFC][01/19] Target FP: Clean up includes of doublest.h and floatformat.h
@ 2017-09-05 18:20 Ulrich Weigand
2017-10-05 17:18 ` Ulrich Weigand
0 siblings, 1 reply; 2+ messages in thread
From: Ulrich Weigand @ 2017-09-05 18:20 UTC (permalink / raw)
To: gdb-patches
[RFC][01/19] Target FP: Clean up includes of doublest.h and floatformat.h
As a first small step to getting rid of doublest.h, this patch removes the
include of "floatformat.h" in "doublest.h". This is actually not needed
for the file itself. A few source files now need to include "floatformat.h"
directly, since they got it indirectly via "doublest.h" and still need it.
In reviewing which files need it, I found a number of files that include
"floatformat.h" directly without actually needing it at all. Similarly,
a number of files include "doublest.h" without needing it. I've also
removed those unnecessary include statements.
Bye,
Ulrich
ChangeLog:
* doublest.h: Do not include "floatformat.h". Remove stale comments.
* gdbtypes.c: Include "floatformat.h".
* value.c: Likewise.
* arm-tdep.c: Likewise.
* m68k-tdep.c: Likewise.
* sh64-tdep.c: Likewise.
* findvar.c: Do not include "floatformat.h".
* amd64-darwin-tdep.c: Likewise.
* arm-linux-tdep.c: Likewise.
* i386-darwin-tdep.c: Likewise.
* i387-tdep.c: Likewise.
* m68k-linux-tdep.c: Likewise.
* mep-tdep.c: Likewise.
* mips-tdep.c: Likewise.
* nios2-tdep.c: Likewise.
* s390-linux-tdep.c: Likewise.
* sparc-obsd-tdep.c: Likewise.
* sparc-tdep.c: Likewise.
* sparc64-tdep.c: Likewise.
* spu-tdep.c: Likewise.
* tic6x-tdep.c: Likewise.
* tilegx-tdep.c: Likewise.
* vax-tdep.c: Likewise.
* xstormy16-tdep.c: Likewise.
* xtensa-tdep.c: Likewise.
* top.c: Do not include "doublest.h".
* aarch64-tdep.c: Likewise.
* alpha-tdep.c: Likewise.
* arm-linux-tdep.c: Likewise.
* m68k-linux-tdep.c: Likewise.
* tilegx-tdep.c: Likewise.
* xstormy16-tdep.c: Likewise.
Index: binutils-gdb/gdb/doublest.h
===================================================================
--- binutils-gdb.orig/gdb/doublest.h
+++ binutils-gdb/gdb/doublest.h
@@ -23,18 +23,6 @@
struct type;
struct floatformat;
-/* Setup definitions for host and target floating point formats. We need to
- consider the format for `float', `double', and `long double' for both target
- and host. We need to do this so that we know what kind of conversions need
- to be done when converting target numbers to and from the hosts DOUBLEST
- data type. */
-
-/* This is used to indicate that we don't know the format of the floating point
- number. Typically, this is useful for native ports, where the actual format
- is irrelevant, since no conversions will be taking place. */
-
-#include "floatformat.h" /* For struct floatformat */
-
/* Use `long double' if the host compiler supports it. (Note that this is not
necessarily any longer than `double'. On SunOS/gcc, it's the same as
double.) This is necessary because GDB internally converts all floating
Index: binutils-gdb/gdb/gdbtypes.c
===================================================================
--- binutils-gdb.orig/gdb/gdbtypes.c
+++ binutils-gdb/gdb/gdbtypes.c
@@ -38,6 +38,7 @@
#include "bcache.h"
#include "dwarf2loc.h"
#include "gdbcore.h"
+#include "floatformat.h"
/* Initialize BADNESS constants. */
Index: binutils-gdb/gdb/value.c
===================================================================
--- binutils-gdb.orig/gdb/value.c
+++ binutils-gdb/gdb/value.c
@@ -29,6 +29,7 @@
#include "language.h"
#include "demangle.h"
#include "doublest.h"
+#include "floatformat.h"
#include "regcache.h"
#include "block.h"
#include "dfp.h"
Index: binutils-gdb/gdb/findvar.c
===================================================================
--- binutils-gdb.orig/gdb/findvar.c
+++ binutils-gdb/gdb/findvar.c
@@ -25,7 +25,6 @@
#include "gdbcore.h"
#include "inferior.h"
#include "target.h"
-#include "floatformat.h"
#include "symfile.h" /* for overlay functions */
#include "regcache.h"
#include "user-regs.h"
Index: binutils-gdb/gdb/top.c
===================================================================
--- binutils-gdb.orig/gdb/top.c
+++ binutils-gdb/gdb/top.c
@@ -41,7 +41,6 @@
#include "top.h"
#include "version.h"
#include "serial.h"
-#include "doublest.h"
#include "main.h"
#include "event-loop.h"
#include "gdbthread.h"
Index: binutils-gdb/gdb/aarch64-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/aarch64-tdep.c
+++ binutils-gdb/gdb/aarch64-tdep.c
@@ -27,7 +27,6 @@
#include "dis-asm.h"
#include "regcache.h"
#include "reggroups.h"
-#include "doublest.h"
#include "value.h"
#include "arch-utils.h"
#include "osabi.h"
Index: binutils-gdb/gdb/alpha-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/alpha-tdep.c
+++ binutils-gdb/gdb/alpha-tdep.c
@@ -18,7 +18,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "doublest.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
Index: binutils-gdb/gdb/amd64-darwin-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/amd64-darwin-tdep.c
+++ binutils-gdb/gdb/amd64-darwin-tdep.c
@@ -23,7 +23,6 @@
#include "inferior.h"
#include "gdbcore.h"
#include "target.h"
-#include "floatformat.h"
#include "symtab.h"
#include "regcache.h"
#include "objfiles.h"
Index: binutils-gdb/gdb/arm-linux-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/arm-linux-tdep.c
+++ binutils-gdb/gdb/arm-linux-tdep.c
@@ -21,11 +21,9 @@
#include "target.h"
#include "value.h"
#include "gdbtypes.h"
-#include "floatformat.h"
#include "gdbcore.h"
#include "frame.h"
#include "regcache.h"
-#include "doublest.h"
#include "solib-svr4.h"
#include "osabi.h"
#include "regset.h"
Index: binutils-gdb/gdb/arm-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/arm-tdep.c
+++ binutils-gdb/gdb/arm-tdep.c
@@ -31,6 +31,7 @@
#include "regcache.h"
#include "reggroups.h"
#include "doublest.h"
+#include "floatformat.h"
#include "value.h"
#include "arch-utils.h"
#include "osabi.h"
Index: binutils-gdb/gdb/i386-darwin-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/i386-darwin-tdep.c
+++ binutils-gdb/gdb/i386-darwin-tdep.c
@@ -23,7 +23,6 @@
#include "inferior.h"
#include "gdbcore.h"
#include "target.h"
-#include "floatformat.h"
#include "symtab.h"
#include "regcache.h"
#include "objfiles.h"
Index: binutils-gdb/gdb/i387-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/i387-tdep.c
+++ binutils-gdb/gdb/i387-tdep.c
@@ -19,7 +19,6 @@
#include "defs.h"
#include "doublest.h"
-#include "floatformat.h"
#include "frame.h"
#include "gdbcore.h"
#include "inferior.h"
Index: binutils-gdb/gdb/m68k-linux-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/m68k-linux-tdep.c
+++ binutils-gdb/gdb/m68k-linux-tdep.c
@@ -19,8 +19,6 @@
#include "defs.h"
#include "gdbcore.h"
-#include "doublest.h"
-#include "floatformat.h"
#include "frame.h"
#include "target.h"
#include "gdbtypes.h"
Index: binutils-gdb/gdb/m68k-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/m68k-tdep.c
+++ binutils-gdb/gdb/m68k-tdep.c
@@ -32,6 +32,7 @@
#include "osabi.h"
#include "dis-asm.h"
#include "target-descriptions.h"
+#include "floatformat.h"
#include "m68k-tdep.h"
\f
Index: binutils-gdb/gdb/mep-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/mep-tdep.c
+++ binutils-gdb/gdb/mep-tdep.c
@@ -36,7 +36,6 @@
#include "arch-utils.h"
#include "regcache.h"
#include "remote.h"
-#include "floatformat.h"
#include "sim-regno.h"
#include "disasm.h"
#include "trad-frame.h"
Index: binutils-gdb/gdb/mips-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/mips-tdep.c
+++ binutils-gdb/gdb/mips-tdep.c
@@ -49,7 +49,6 @@
#include "frame-base.h"
#include "trad-frame.h"
#include "infcall.h"
-#include "floatformat.h"
#include "remote.h"
#include "target-descriptions.h"
#include "dwarf2-frame.h"
Index: binutils-gdb/gdb/nios2-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/nios2-tdep.c
+++ binutils-gdb/gdb/nios2-tdep.c
@@ -37,7 +37,6 @@
#include "value.h"
#include "symfile.h"
#include "arch-utils.h"
-#include "floatformat.h"
#include "infcall.h"
#include "regset.h"
#include "target-descriptions.h"
Index: binutils-gdb/gdb/s390-linux-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/s390-linux-tdep.c
+++ binutils-gdb/gdb/s390-linux-tdep.c
@@ -30,7 +30,6 @@
#include "gdbcore.h"
#include "gdbcmd.h"
#include "objfiles.h"
-#include "floatformat.h"
#include "regcache.h"
#include "trad-frame.h"
#include "frame-base.h"
Index: binutils-gdb/gdb/sh64-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/sh64-tdep.c
+++ binutils-gdb/gdb/sh64-tdep.c
@@ -26,6 +26,7 @@
#include "frame-unwind.h"
#include "dwarf2-frame.h"
#include "symtab.h"
+#include "floatformat.h"
#include "gdbtypes.h"
#include "gdbcmd.h"
#include "gdbcore.h"
Index: binutils-gdb/gdb/sparc-obsd-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/sparc-obsd-tdep.c
+++ binutils-gdb/gdb/sparc-obsd-tdep.c
@@ -18,7 +18,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "floatformat.h"
#include "frame.h"
#include "frame-unwind.h"
#include "gdbcore.h"
Index: binutils-gdb/gdb/sparc-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/sparc-tdep.c
+++ binutils-gdb/gdb/sparc-tdep.c
@@ -22,7 +22,6 @@
#include "dis-asm.h"
#include "dwarf2.h"
#include "dwarf2-frame.h"
-#include "floatformat.h"
#include "frame.h"
#include "frame-base.h"
#include "frame-unwind.h"
Index: binutils-gdb/gdb/sparc64-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/sparc64-tdep.c
+++ binutils-gdb/gdb/sparc64-tdep.c
@@ -20,7 +20,6 @@
#include "defs.h"
#include "arch-utils.h"
#include "dwarf2-frame.h"
-#include "floatformat.h"
#include "frame.h"
#include "frame-base.h"
#include "frame-unwind.h"
Index: binutils-gdb/gdb/spu-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/spu-tdep.c
+++ binutils-gdb/gdb/spu-tdep.c
@@ -38,7 +38,6 @@
#include "language.h"
#include "regcache.h"
#include "reggroups.h"
-#include "floatformat.h"
#include "block.h"
#include "observer.h"
#include "infcall.h"
Index: binutils-gdb/gdb/tic6x-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/tic6x-tdep.c
+++ binutils-gdb/gdb/tic6x-tdep.c
@@ -36,7 +36,6 @@
#include "value.h"
#include "symfile.h"
#include "arch-utils.h"
-#include "floatformat.h"
#include "glibc-tdep.h"
#include "infcall.h"
#include "regset.h"
Index: binutils-gdb/gdb/tilegx-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/tilegx-tdep.c
+++ binutils-gdb/gdb/tilegx-tdep.c
@@ -31,10 +31,8 @@
#include "dis-asm.h"
#include "inferior.h"
#include "arch-utils.h"
-#include "floatformat.h"
#include "regcache.h"
#include "regset.h"
-#include "doublest.h"
#include "osabi.h"
#include "linux-tdep.h"
#include "objfiles.h"
Index: binutils-gdb/gdb/vax-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/vax-tdep.c
+++ binutils-gdb/gdb/vax-tdep.c
@@ -20,7 +20,6 @@
#include "defs.h"
#include "arch-utils.h"
#include "dis-asm.h"
-#include "floatformat.h"
#include "frame.h"
#include "frame-base.h"
#include "frame-unwind.h"
Index: binutils-gdb/gdb/xstormy16-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/xstormy16-tdep.c
+++ binutils-gdb/gdb/xstormy16-tdep.c
@@ -30,9 +30,7 @@
#include "dis-asm.h"
#include "inferior.h"
#include "arch-utils.h"
-#include "floatformat.h"
#include "regcache.h"
-#include "doublest.h"
#include "osabi.h"
#include "objfiles.h"
Index: binutils-gdb/gdb/xtensa-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/xtensa-tdep.c
+++ binutils-gdb/gdb/xtensa-tdep.c
@@ -29,7 +29,6 @@
#include "dis-asm.h"
#include "inferior.h"
#include "osabi.h"
-#include "floatformat.h"
#include "regcache.h"
#include "reggroups.h"
#include "regset.h"
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RFC][01/19] Target FP: Clean up includes of doublest.h and floatformat.h
2017-09-05 18:20 [RFC][01/19] Target FP: Clean up includes of doublest.h and floatformat.h Ulrich Weigand
@ 2017-10-05 17:18 ` Ulrich Weigand
0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Weigand @ 2017-10-05 17:18 UTC (permalink / raw)
To: Ulrich Weigand; +Cc: gdb-patches
> ChangeLog:
>
> * doublest.h: Do not include "floatformat.h". Remove stale comments.
> * gdbtypes.c: Include "floatformat.h".
> * value.c: Likewise.
> * arm-tdep.c: Likewise.
> * m68k-tdep.c: Likewise.
> * sh64-tdep.c: Likewise.
>
> * findvar.c: Do not include "floatformat.h".
> * amd64-darwin-tdep.c: Likewise.
> * arm-linux-tdep.c: Likewise.
> * i386-darwin-tdep.c: Likewise.
> * i387-tdep.c: Likewise.
> * m68k-linux-tdep.c: Likewise.
> * mep-tdep.c: Likewise.
> * mips-tdep.c: Likewise.
> * nios2-tdep.c: Likewise.
> * s390-linux-tdep.c: Likewise.
> * sparc-obsd-tdep.c: Likewise.
> * sparc-tdep.c: Likewise.
> * sparc64-tdep.c: Likewise.
> * spu-tdep.c: Likewise.
> * tic6x-tdep.c: Likewise.
> * tilegx-tdep.c: Likewise.
> * vax-tdep.c: Likewise.
> * xstormy16-tdep.c: Likewise.
> * xtensa-tdep.c: Likewise.
>
> * top.c: Do not include "doublest.h".
> * aarch64-tdep.c: Likewise.
> * alpha-tdep.c: Likewise.
> * arm-linux-tdep.c: Likewise.
> * m68k-linux-tdep.c: Likewise.
> * tilegx-tdep.c: Likewise.
> * xstormy16-tdep.c: Likewise.
I've now pushed this.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-05 17:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-05 18:20 [RFC][01/19] Target FP: Clean up includes of doublest.h and floatformat.h Ulrich Weigand
2017-10-05 17:18 ` Ulrich Weigand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).