From: Mike Frysinger Date: Sat, 18 Apr 2015 08:19:56 +0000 (-0400) Subject: sim: unify SIM_CPU definition X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=20bca71d82598a015de0991196e45f0b5f7ead81;p=binutils-gdb.git sim: unify SIM_CPU definition Since every target typedefs this the same way, move it to the common code. We have to leave Blackfin behind here for now because of inter-dependencies on types and headers: sim-base.h includes sim-model.h which needs types in machs.h which needs types in bfim-sim.h which needs SIM_CPU. --- diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog index cb5b1cfe8de..4d932108a43 100644 --- a/sim/arm/ChangeLog +++ b/sim/arm/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (SIM_CPU): Delete. + 2015-04-18 Mike Frysinger * sim-main.h (sim_cia): Delete. diff --git a/sim/arm/sim-main.h b/sim/arm/sim-main.h index ae622bd1cb4..9a37b989ae0 100644 --- a/sim/arm/sim-main.h +++ b/sim/arm/sim-main.h @@ -20,9 +20,6 @@ #define SIM_MAIN_H #include "sim-basics.h" - -typedef struct _sim_cpu SIM_CPU; - #include "sim-base.h" #include "bfd.h" diff --git a/sim/avr/ChangeLog b/sim/avr/ChangeLog index 9b4ca2aecb5..c486303508b 100644 --- a/sim/avr/ChangeLog +++ b/sim/avr/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (SIM_CPU): Delete. + 2015-04-18 Mike Frysinger * sim-main.h (sim_cia): Delete. diff --git a/sim/avr/sim-main.h b/sim/avr/sim-main.h index 52904e385e2..e0cac221df7 100644 --- a/sim/avr/sim-main.h +++ b/sim/avr/sim-main.h @@ -23,8 +23,6 @@ along with this program. If not, see . */ extern unsigned int pc; -typedef struct _sim_cpu SIM_CPU; - #include "sim-base.h" struct _sim_cpu { diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 036db162060..64d20c30a09 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (SIM_CPU): Add note to clean this up. + 2015-04-18 Mike Frysinger * sim-main.h (sim_cia): Delete. diff --git a/sim/bfin/sim-main.h b/sim/bfin/sim-main.h index 1fbfa08a991..a3e4230b0ea 100644 --- a/sim/bfin/sim-main.h +++ b/sim/bfin/sim-main.h @@ -24,6 +24,8 @@ #include "sim-basics.h" #include "sim-signal.h" +/* TODO: Delete this. Need to convert bu32/etc... to common sim types + and unwind the bfin-sim.h/machs.h include below first though. */ typedef struct _sim_cpu SIM_CPU; #include "bfin-sim.h" diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index f437768cead..858e432ea5e 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-base.h (SIM_CPU): New typedef. + 2015-04-18 Mike Frysinger * cgen-engine.h (CIA_ADDR): Delete. diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h index e90e07ca340..21f61f4dc1f 100644 --- a/sim/common/sim-base.h +++ b/sim/common/sim-base.h @@ -72,6 +72,8 @@ typedef address_word sim_cia; #define INVALID_INSTRUCTION_ADDRESS ((address_word)0 - 1) #endif +/* TODO: Probably should just delete SIM_CPU. */ +typedef struct _sim_cpu SIM_CPU; typedef struct _sim_cpu sim_cpu; #include "sim-module.h" diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog index 8b15b74e732..1108bdbe7cb 100644 --- a/sim/cr16/ChangeLog +++ b/sim/cr16/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (SIM_CPU): Delete. + 2015-04-18 Mike Frysinger * sim-main.h (sim_cia): Delete. diff --git a/sim/cr16/sim-main.h b/sim/cr16/sim-main.h index 1a8022912c6..a63b93e56f0 100644 --- a/sim/cr16/sim-main.h +++ b/sim/cr16/sim-main.h @@ -24,8 +24,6 @@ typedef long int word; typedef unsigned long int uword; -typedef struct _sim_cpu SIM_CPU; - #include "sim-base.h" #include "bfd.h" diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog index 4c81975125c..ff1cc938d87 100644 --- a/sim/cris/ChangeLog +++ b/sim/cris/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (_sim_cpu, SIM_CPU): Delete. + 2015-04-18 Mike Frysinger * sim-main.h (sim_cia): Delete. diff --git a/sim/cris/sim-main.h b/sim/cris/sim-main.h index 7eb74b5fbe7..6e501061bff 100644 --- a/sim/cris/sim-main.h +++ b/sim/cris/sim-main.h @@ -26,9 +26,6 @@ along with this program. If not, see . */ #define USING_SIM_BASE_H -struct _sim_cpu; -typedef struct _sim_cpu SIM_CPU; - #include "symcat.h" #include "sim-basics.h" #include "cgen-types.h" diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog index a56d3ab7b6c..8960e6bdae8 100644 --- a/sim/d10v/ChangeLog +++ b/sim/d10v/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (SIM_CPU): Delete. + 2015-04-18 Mike Frysinger * sim-main.h (sim_cia): Delete. diff --git a/sim/d10v/sim-main.h b/sim/d10v/sim-main.h index a7d59ddf837..0b87811d570 100644 --- a/sim/d10v/sim-main.h +++ b/sim/d10v/sim-main.h @@ -24,8 +24,6 @@ typedef long int word; typedef unsigned long int uword; -typedef struct _sim_cpu SIM_CPU; - #include "sim-base.h" #include "bfd.h" diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog index 750695f6e03..c3562e8eb3f 100644 --- a/sim/frv/ChangeLog +++ b/sim/frv/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (_sim_cpu, SIM_CPU): Delete. + 2015-04-18 Mike Frysinger * sim-main.h (sim_cia): Delete. diff --git a/sim/frv/sim-main.h b/sim/frv/sim-main.h index fd12c4fa945..077a47d581d 100644 --- a/sim/frv/sim-main.h +++ b/sim/frv/sim-main.h @@ -21,9 +21,6 @@ along with this program. If not, see . */ #define USING_SIM_BASE_H /* FIXME: quick hack */ -struct _sim_cpu; /* FIXME: should be in sim-basics.h */ -typedef struct _sim_cpu SIM_CPU; - /* Set the mask of unsupported traces. */ #define WITH_TRACE \ (~(TRACE_alu | TRACE_decode | TRACE_memory | TRACE_model | TRACE_fpu \ diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog index 62748893f5d..3553e68a72f 100644 --- a/sim/ft32/ChangeLog +++ b/sim/ft32/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (SIM_CPU): Delete. + 2015-04-18 Mike Frysinger * sim-main.h (sim_cia): Delete. diff --git a/sim/ft32/sim-main.h b/sim/ft32/sim-main.h index a270a5df04e..b27a690ab05 100644 --- a/sim/ft32/sim-main.h +++ b/sim/ft32/sim-main.h @@ -25,8 +25,6 @@ #include "sim-base.h" #include "bfd.h" -typedef struct _sim_cpu SIM_CPU; - #include "ft32-sim.h" struct _sim_cpu { diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog index 814a835e38e..c7eb47494ee 100644 --- a/sim/h8300/ChangeLog +++ b/sim/h8300/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (SIM_CPU): Delete. + 2015-04-18 Mike Frysinger * sim-main.h (sim_cia): Delete. diff --git a/sim/h8300/sim-main.h b/sim/h8300/sim-main.h index e95c4d90e86..6dbc1ac1c2b 100644 --- a/sim/h8300/sim-main.h +++ b/sim/h8300/sim-main.h @@ -87,9 +87,6 @@ enum h8_typecodes { }; #include "sim-basics.h" - -typedef struct _sim_cpu SIM_CPU; - #include "sim-base.h" /* Structure used to describe addressing */ diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog index c9ea375be0d..a9db07a6dd7 100644 --- a/sim/iq2000/ChangeLog +++ b/sim/iq2000/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (_sim_cpu, SIM_CPU): Delete. + 2015-04-18 Mike Frysinger * sim-main.h (sim_cia): Delete. diff --git a/sim/iq2000/sim-main.h b/sim/iq2000/sim-main.h index ce3babadf73..bc45c78309a 100644 --- a/sim/iq2000/sim-main.h +++ b/sim/iq2000/sim-main.h @@ -6,9 +6,6 @@ #define USING_SIM_BASE_H /* FIXME: quick hack */ -struct _sim_cpu; /* FIXME: should be in sim-basics.h */ -typedef struct _sim_cpu SIM_CPU; - /* sim-basics.h includes config.h but cgen-types.h must be included before sim-basics.h and cgen-types.h needs config.h. */ #include "config.h" diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog index 3109bbc5aa3..e267eaa6b1b 100644 --- a/sim/lm32/ChangeLog +++ b/sim/lm32/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (_sim_cpu, SIM_CPU): Delete. + 2015-04-18 Mike Frysinger * sim-main.h (sim_cia): Delete. diff --git a/sim/lm32/sim-main.h b/sim/lm32/sim-main.h index d37f74bb474..9a6ba1adf47 100644 --- a/sim/lm32/sim-main.h +++ b/sim/lm32/sim-main.h @@ -25,9 +25,6 @@ #define USING_SIM_BASE_H /* FIXME: quick hack */ -struct _sim_cpu; /* FIXME: should be in sim-basics.h */ -typedef struct _sim_cpu SIM_CPU; - #include "symcat.h" #include "sim-basics.h" #include "cgen-types.h" diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog index dc82037128a..ff4767b8a30 100644 --- a/sim/m32r/ChangeLog +++ b/sim/m32r/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (_sim_cpu, SIM_CPU): Delete. + 2015-04-18 Mike Frysinger * sim-main.h (sim_cia): Delete. diff --git a/sim/m32r/sim-main.h b/sim/m32r/sim-main.h index 6839a4152b8..d296c538eba 100644 --- a/sim/m32r/sim-main.h +++ b/sim/m32r/sim-main.h @@ -5,9 +5,6 @@ #define USING_SIM_BASE_H /* FIXME: quick hack */ -struct _sim_cpu; /* FIXME: should be in sim-basics.h */ -typedef struct _sim_cpu SIM_CPU; - #include "symcat.h" #include "sim-basics.h" #include "cgen-types.h" diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog index a5c9c5aa623..957abb58a15 100644 --- a/sim/m68hc11/ChangeLog +++ b/sim/m68hc11/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (SIM_CPU): Delete. + 2015-04-18 Mike Frysinger * sim-main.h (sim_cia): Delete. diff --git a/sim/m68hc11/sim-main.h b/sim/m68hc11/sim-main.h index 4f41db929bf..d1fc582e681 100644 --- a/sim/m68hc11/sim-main.h +++ b/sim/m68hc11/sim-main.h @@ -25,9 +25,6 @@ along with this program. If not, see . */ #define SIM_HANDLES_LMA 1 #include "sim-basics.h" - -typedef struct _sim_cpu SIM_CPU; - #include "sim-signal.h" #include "sim-base.h" diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog index 98ebb1e92d1..915cc285561 100644 --- a/sim/mcore/ChangeLog +++ b/sim/mcore/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (SIM_CPU): Delete. + 2015-04-18 Mike Frysinger * sim-main.h (sim_cia): Delete. diff --git a/sim/mcore/sim-main.h b/sim/mcore/sim-main.h index 25698c187c9..be50ec132b1 100644 --- a/sim/mcore/sim-main.h +++ b/sim/mcore/sim-main.h @@ -24,8 +24,6 @@ along with this program. If not, see . */ typedef long int word; typedef unsigned long int uword; -typedef struct _sim_cpu SIM_CPU; - #include "sim-base.h" #include "bfd.h" diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog index 560cc134a36..cd4be04ad50 100644 --- a/sim/microblaze/ChangeLog +++ b/sim/microblaze/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (SIM_CPU): Delete. + 2015-04-18 Mike Frysinger * sim-main.h (sim_cia): Delete. diff --git a/sim/microblaze/sim-main.h b/sim/microblaze/sim-main.h index 4a5c5dfebe3..ab4e6afd0d8 100644 --- a/sim/microblaze/sim-main.h +++ b/sim/microblaze/sim-main.h @@ -20,9 +20,6 @@ #include "microblaze.h" #include "sim-basics.h" - -typedef struct _sim_cpu SIM_CPU; - #include "sim-base.h" /* The machine state. diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index 177d1d3e2b6..51b4b297166 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (SIM_CPU): Delete. + 2015-04-18 Mike Frysinger * sim-main.h (sim_cia): Delete. diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h index 8826857472d..e6bbd518c04 100644 --- a/sim/mips/sim-main.h +++ b/sim/mips/sim-main.h @@ -33,9 +33,6 @@ along with this program. If not, see . */ mips_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), (TRANSFER), (ERROR)) #include "sim-basics.h" - -typedef struct _sim_cpu SIM_CPU; - #include "sim-base.h" #include "bfd.h" diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index 1b649e23d86..bee772f5570 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (SIM_CPU): Delete. + 2015-04-18 Mike Frysinger * sim-main.h (sim_cia): Delete. diff --git a/sim/mn10300/sim-main.h b/sim/mn10300/sim-main.h index 2ddbfb951a0..847506e4fe9 100644 --- a/sim/mn10300/sim-main.h +++ b/sim/mn10300/sim-main.h @@ -42,8 +42,6 @@ #include "itable.h" #include "idecode.h" -typedef struct _sim_cpu SIM_CPU; - #define WITH_WATCHPOINTS 1 #define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \ diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog index 6ea5fef9292..22277bd77d8 100644 --- a/sim/moxie/ChangeLog +++ b/sim/moxie/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (SIM_CPU): Delete. + 2015-04-18 Mike Frysinger * sim-main.h (sim_cia): Delete. diff --git a/sim/moxie/sim-main.h b/sim/moxie/sim-main.h index c60437ef36e..b1a64fcd9f7 100644 --- a/sim/moxie/sim-main.h +++ b/sim/moxie/sim-main.h @@ -21,9 +21,6 @@ along with this program. If not, see . */ #define SIM_MAIN_H #include "sim-basics.h" - -typedef struct _sim_cpu SIM_CPU; - #include "sim-base.h" #include "bfd.h" diff --git a/sim/msp430/ChangeLog b/sim/msp430/ChangeLog index ce816935ca9..c2205b5d7f0 100644 --- a/sim/msp430/ChangeLog +++ b/sim/msp430/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (SIM_CPU): Delete. + 2015-04-18 Mike Frysinger * sim-main.h (sim_cia): Delete. diff --git a/sim/msp430/sim-main.h b/sim/msp430/sim-main.h index fdc4151313e..f08f3e41222 100644 --- a/sim/msp430/sim-main.h +++ b/sim/msp430/sim-main.h @@ -23,9 +23,6 @@ #include "sim-basics.h" #include "sim-signal.h" - -typedef struct _sim_cpu SIM_CPU; - #include "msp430-sim.h" #include "sim-base.h" diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog index b776ad0dbe9..2127ab8cfac 100644 --- a/sim/sh/ChangeLog +++ b/sim/sh/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (SIM_CPU): Delete. + 2015-04-18 Mike Frysinger * sim-main.h (sim_cia): Delete. diff --git a/sim/sh/sim-main.h b/sim/sh/sim-main.h index e2e17d7f166..e67df289109 100644 --- a/sim/sh/sim-main.h +++ b/sim/sh/sim-main.h @@ -20,9 +20,6 @@ along with this program. If not, see . */ #define SIM_MAIN_H #include "sim-basics.h" - -typedef struct _sim_cpu SIM_CPU; - #include "sim-base.h" typedef struct diff --git a/sim/sh64/ChangeLog b/sim/sh64/ChangeLog index 0dac7a7b01d..f75140ef7e4 100644 --- a/sim/sh64/ChangeLog +++ b/sim/sh64/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (_sim_cpu, SIM_CPU): Delete. + 2015-04-18 Mike Frysinger * sim-main.h (CIA_ADDR): Define. diff --git a/sim/sh64/sim-main.h b/sim/sh64/sim-main.h index 8fb595ed820..1a1a2b7fbfa 100644 --- a/sim/sh64/sim-main.h +++ b/sim/sh64/sim-main.h @@ -5,9 +5,6 @@ #define USING_SIM_BASE_H /* FIXME: quick hack */ -struct _sim_cpu; /* FIXME: should be in sim-basics.h */ -typedef struct _sim_cpu SIM_CPU; - /* sim-basics.h includes config.h but cgen-types.h must be included before sim-basics.h and cgen-types.h needs config.h. */ #include "config.h" diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 6b815d61961..f47e33f8b27 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Mike Frysinger + + * sim-main.h (SIM_CPU): Delete. + 2015-04-18 Mike Frysinger * sim-main.h (sim_cia): Delete. diff --git a/sim/v850/sim-main.h b/sim/v850/sim-main.h index 16cbd9707ae..5127d280102 100644 --- a/sim/v850/sim-main.h +++ b/sim/v850/sim-main.h @@ -16,9 +16,6 @@ #include "sim-basics.h" #include "sim-signal.h" #include "sim-fpu.h" - -typedef struct _sim_cpu SIM_CPU; - #include "sim-base.h" #include "simops.h"