1 From 77080d5f7fd47dd567f22807d336bc9111f93d7b Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Thu, 4 Aug 2016 23:44:24 +0200
4 Subject: [PATCH] Revert "sim: unify SIM_CPU definition"
6 This reverts commit 20bca71d82598a015de0991196e45f0b5f7ead81.
8 This change causes a redefinition of SIM_CPU on the Blackfin
9 architecture, as it is defined in both the common sim/common/sim-base.h
10 and the architecture specific sim/bfin/sim-main.h.
12 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
14 sim/arm/sim-main.h | 3 +++
15 sim/avr/sim-main.h | 2 ++
16 sim/bfin/sim-main.h | 2 --
17 sim/common/sim-base.h | 2 --
18 sim/cr16/sim-main.h | 2 ++
19 sim/cris/sim-main.h | 3 +++
20 sim/d10v/sim-main.h | 2 ++
21 sim/frv/sim-main.h | 3 +++
22 sim/ft32/sim-main.h | 2 ++
23 sim/h8300/sim-main.h | 3 +++
24 sim/iq2000/sim-main.h | 3 +++
25 sim/lm32/sim-main.h | 3 +++
26 sim/m32r/sim-main.h | 3 +++
27 sim/m68hc11/sim-main.h | 3 +++
28 sim/mcore/sim-main.h | 2 ++
29 sim/microblaze/sim-main.h | 3 +++
30 sim/mips/sim-main.h | 3 +++
31 sim/mn10300/sim-main.h | 2 ++
32 sim/moxie/sim-main.h | 3 +++
33 sim/msp430/sim-main.h | 3 +++
34 sim/sh/sim-main.h | 3 +++
35 sim/sh64/sim-main.h | 3 +++
36 sim/v850/sim-main.h | 3 +++
37 23 files changed, 57 insertions(+), 4 deletions(-)
39 diff --git a/sim/arm/sim-main.h b/sim/arm/sim-main.h
40 index 3620810..f644122 100644
41 --- a/sim/arm/sim-main.h
42 +++ b/sim/arm/sim-main.h
46 #include "sim-basics.h"
48 +typedef struct _sim_cpu SIM_CPU;
53 diff --git a/sim/avr/sim-main.h b/sim/avr/sim-main.h
54 index 47155e3..cd41045 100644
55 --- a/sim/avr/sim-main.h
56 +++ b/sim/avr/sim-main.h
57 @@ -21,6 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
59 #include "sim-basics.h"
61 +typedef struct _sim_cpu SIM_CPU;
66 diff --git a/sim/bfin/sim-main.h b/sim/bfin/sim-main.h
67 index 51fb87e..cf1ed57 100644
68 --- a/sim/bfin/sim-main.h
69 +++ b/sim/bfin/sim-main.h
71 #include "sim-basics.h"
72 #include "sim-signal.h"
74 -/* TODO: Delete this. Need to convert bu32/etc... to common sim types
75 - and unwind the bfin-sim.h/machs.h include below first though. */
76 typedef struct _sim_cpu SIM_CPU;
79 diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h
80 index 350b352..1b849f4 100644
81 --- a/sim/common/sim-base.h
82 +++ b/sim/common/sim-base.h
83 @@ -72,8 +72,6 @@ typedef address_word sim_cia;
84 #define INVALID_INSTRUCTION_ADDRESS ((address_word)0 - 1)
87 -/* TODO: Probably should just delete SIM_CPU. */
88 -typedef struct _sim_cpu SIM_CPU;
89 typedef struct _sim_cpu sim_cpu;
91 #include "sim-module.h"
92 diff --git a/sim/cr16/sim-main.h b/sim/cr16/sim-main.h
93 index 208f917..78e3996 100644
94 --- a/sim/cr16/sim-main.h
95 +++ b/sim/cr16/sim-main.h
97 typedef long int word;
98 typedef unsigned long int uword;
100 +typedef struct _sim_cpu SIM_CPU;
102 #include "sim-base.h"
105 diff --git a/sim/cris/sim-main.h b/sim/cris/sim-main.h
106 index 8aab970..0ff907f 100644
107 --- a/sim/cris/sim-main.h
108 +++ b/sim/cris/sim-main.h
109 @@ -29,6 +29,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
110 one of -scache/-pbb. */
111 #define WITH_SCACHE_PBB 1
114 +typedef struct _sim_cpu SIM_CPU;
117 #include "sim-basics.h"
118 #include "cgen-types.h"
119 diff --git a/sim/d10v/sim-main.h b/sim/d10v/sim-main.h
120 index 76f06d8..fd5bd51 100644
121 --- a/sim/d10v/sim-main.h
122 +++ b/sim/d10v/sim-main.h
124 typedef long int word;
125 typedef unsigned long int uword;
127 +typedef struct _sim_cpu SIM_CPU;
129 #include "sim-base.h"
132 diff --git a/sim/frv/sim-main.h b/sim/frv/sim-main.h
133 index f95c1cc..701e208 100644
134 --- a/sim/frv/sim-main.h
135 +++ b/sim/frv/sim-main.h
136 @@ -19,6 +19,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
138 /* Main header for the frv. */
140 +struct _sim_cpu; /* FIXME: should be in sim-basics.h */
141 +typedef struct _sim_cpu SIM_CPU;
143 /* sim-basics.h includes config.h but cgen-types.h must be included before
144 sim-basics.h and cgen-types.h needs config.h. */
146 diff --git a/sim/ft32/sim-main.h b/sim/ft32/sim-main.h
147 index a15b247..eef0201 100644
148 --- a/sim/ft32/sim-main.h
149 +++ b/sim/ft32/sim-main.h
151 #include "sim-base.h"
154 +typedef struct _sim_cpu SIM_CPU;
156 #include "ft32-sim.h"
159 diff --git a/sim/h8300/sim-main.h b/sim/h8300/sim-main.h
160 index 6dbc1ac..e95c4d9 100644
161 --- a/sim/h8300/sim-main.h
162 +++ b/sim/h8300/sim-main.h
163 @@ -87,6 +87,9 @@ enum h8_typecodes {
166 #include "sim-basics.h"
168 +typedef struct _sim_cpu SIM_CPU;
170 #include "sim-base.h"
172 /* Structure used to describe addressing */
173 diff --git a/sim/iq2000/sim-main.h b/sim/iq2000/sim-main.h
174 index 829f9bb..a770dc5 100644
175 --- a/sim/iq2000/sim-main.h
176 +++ b/sim/iq2000/sim-main.h
181 +struct _sim_cpu; /* FIXME: should be in sim-basics.h */
182 +typedef struct _sim_cpu SIM_CPU;
184 /* sim-basics.h includes config.h but cgen-types.h must be included before
185 sim-basics.h and cgen-types.h needs config.h. */
187 diff --git a/sim/lm32/sim-main.h b/sim/lm32/sim-main.h
188 index 20e2b71..eeffde3 100644
189 --- a/sim/lm32/sim-main.h
190 +++ b/sim/lm32/sim-main.h
193 #define WITH_SCACHE_PBB 1
195 +struct _sim_cpu; /* FIXME: should be in sim-basics.h */
196 +typedef struct _sim_cpu SIM_CPU;
199 #include "sim-basics.h"
200 #include "cgen-types.h"
201 diff --git a/sim/m32r/sim-main.h b/sim/m32r/sim-main.h
202 index 5b24ce8..39f7ecc 100644
203 --- a/sim/m32r/sim-main.h
204 +++ b/sim/m32r/sim-main.h
206 one of -scache/-pbb. */
207 #define WITH_SCACHE_PBB 1
209 +struct _sim_cpu; /* FIXME: should be in sim-basics.h */
210 +typedef struct _sim_cpu SIM_CPU;
213 #include "sim-basics.h"
214 #include "cgen-types.h"
215 diff --git a/sim/m68hc11/sim-main.h b/sim/m68hc11/sim-main.h
216 index b940df7..0aa096f 100644
217 --- a/sim/m68hc11/sim-main.h
218 +++ b/sim/m68hc11/sim-main.h
219 @@ -21,6 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
222 #include "sim-basics.h"
224 +typedef struct _sim_cpu SIM_CPU;
226 #include "sim-signal.h"
227 #include "sim-base.h"
229 diff --git a/sim/mcore/sim-main.h b/sim/mcore/sim-main.h
230 index fce26e8..fa7ee9f 100644
231 --- a/sim/mcore/sim-main.h
232 +++ b/sim/mcore/sim-main.h
233 @@ -24,6 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
234 typedef long int word;
235 typedef unsigned long int uword;
237 +typedef struct _sim_cpu SIM_CPU;
239 #include "sim-base.h"
242 diff --git a/sim/microblaze/sim-main.h b/sim/microblaze/sim-main.h
243 index 3a7b088..9e6bf01 100644
244 --- a/sim/microblaze/sim-main.h
245 +++ b/sim/microblaze/sim-main.h
248 #include "microblaze.h"
249 #include "sim-basics.h"
251 +typedef struct _sim_cpu SIM_CPU;
253 #include "sim-base.h"
255 /* The machine state.
256 diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h
257 index 0ea1234..eedbfc9 100644
258 --- a/sim/mips/sim-main.h
259 +++ b/sim/mips/sim-main.h
260 @@ -27,6 +27,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
261 mips_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), (TRANSFER), (ERROR))
263 #include "sim-basics.h"
265 +typedef struct _sim_cpu SIM_CPU;
267 #include "sim-base.h"
270 diff --git a/sim/mn10300/sim-main.h b/sim/mn10300/sim-main.h
271 index 7171c03..3a917e7 100644
272 --- a/sim/mn10300/sim-main.h
273 +++ b/sim/mn10300/sim-main.h
278 +typedef struct _sim_cpu SIM_CPU;
280 #define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
281 mn10300_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), (TRANSFER), (ERROR))
283 diff --git a/sim/moxie/sim-main.h b/sim/moxie/sim-main.h
284 index 7091f21..b6b5ca3 100644
285 --- a/sim/moxie/sim-main.h
286 +++ b/sim/moxie/sim-main.h
287 @@ -21,6 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
290 #include "sim-basics.h"
292 +typedef struct _sim_cpu SIM_CPU;
294 #include "sim-base.h"
297 diff --git a/sim/msp430/sim-main.h b/sim/msp430/sim-main.h
298 index 4a2ab22..c7cdc5e 100644
299 --- a/sim/msp430/sim-main.h
300 +++ b/sim/msp430/sim-main.h
303 #include "sim-basics.h"
304 #include "sim-signal.h"
306 +typedef struct _sim_cpu SIM_CPU;
308 #include "msp430-sim.h"
309 #include "sim-base.h"
311 diff --git a/sim/sh/sim-main.h b/sim/sh/sim-main.h
312 index 4af7b03..6ab42a6 100644
313 --- a/sim/sh/sim-main.h
314 +++ b/sim/sh/sim-main.h
315 @@ -20,6 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
318 #include "sim-basics.h"
320 +typedef struct _sim_cpu SIM_CPU;
322 #include "sim-base.h"
325 diff --git a/sim/sh64/sim-main.h b/sim/sh64/sim-main.h
326 index da8f516..5fd7095 100644
327 --- a/sim/sh64/sim-main.h
328 +++ b/sim/sh64/sim-main.h
333 +struct _sim_cpu; /* FIXME: should be in sim-basics.h */
334 +typedef struct _sim_cpu SIM_CPU;
336 /* sim-basics.h includes config.h but cgen-types.h must be included before
337 sim-basics.h and cgen-types.h needs config.h. */
339 diff --git a/sim/v850/sim-main.h b/sim/v850/sim-main.h
340 index e7276a6..1a45f97 100644
341 --- a/sim/v850/sim-main.h
342 +++ b/sim/v850/sim-main.h
344 #include "sim-basics.h"
345 #include "sim-signal.h"
348 +typedef struct _sim_cpu SIM_CPU;
350 #include "sim-base.h"