6b13f685e
김민수
BSP 최초 추가
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
|
From 4d913bb73965fdb9c756e8d5916a829b60aa3a44 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Thu, 4 Aug 2016 23:44:24 +0200
Subject: [PATCH] Revert "sim: unify SIM_CPU definition"
This reverts commit 20bca71d82598a015de0991196e45f0b5f7ead81.
This change causes a redefinition of SIM_CPU on the Blackfin
architecture, as it is defined in both the common sim/common/sim-base.h
and the architecture specific sim/bfin/sim-main.h.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
sim/arm/sim-main.h | 3 +++
sim/avr/sim-main.h | 2 ++
sim/bfin/sim-main.h | 2 --
sim/common/sim-base.h | 2 --
sim/cr16/sim-main.h | 2 ++
sim/cris/sim-main.h | 5 +++++
sim/d10v/sim-main.h | 2 ++
sim/frv/sim-main.h | 10 ++++++++++
sim/ft32/sim-main.h | 2 ++
sim/h8300/sim-main.h | 3 +++
sim/iq2000/sim-main.h | 5 +++++
sim/lm32/sim-main.h | 5 +++++
sim/m32r/sim-main.h | 5 +++++
sim/m68hc11/sim-main.h | 3 +++
sim/mcore/sim-main.h | 2 ++
sim/microblaze/sim-main.h | 3 +++
sim/mips/sim-main.h | 3 +++
sim/mn10300/sim-main.h | 2 ++
sim/moxie/sim-main.h | 3 +++
sim/msp430/sim-main.h | 3 +++
sim/sh/sim-main.h | 3 +++
sim/sh64/sim-main.h | 5 +++++
sim/v850/sim-main.h | 3 +++
23 files changed, 74 insertions(+), 4 deletions(-)
diff --git a/sim/arm/sim-main.h b/sim/arm/sim-main.h
index 9a37b98..ae622bd 100644
--- a/sim/arm/sim-main.h
+++ b/sim/arm/sim-main.h
@@ -20,6 +20,9 @@
#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/sim-main.h b/sim/avr/sim-main.h
index e0cac22..52904e3 100644
--- a/sim/avr/sim-main.h
+++ b/sim/avr/sim-main.h
@@ -23,6 +23,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
extern unsigned int pc;
+typedef struct _sim_cpu SIM_CPU;
+
#include "sim-base.h"
struct _sim_cpu {
diff --git a/sim/bfin/sim-main.h b/sim/bfin/sim-main.h
index 806fe15..53e1774 100644
--- a/sim/bfin/sim-main.h
+++ b/sim/bfin/sim-main.h
@@ -24,8 +24,6 @@
#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/sim-base.h b/sim/common/sim-base.h
index 21f61f4..e90e07c 100644
--- a/sim/common/sim-base.h
+++ b/sim/common/sim-base.h
@@ -72,8 +72,6 @@ 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/sim-main.h b/sim/cr16/sim-main.h
index a63b93e..1a80229 100644
--- a/sim/cr16/sim-main.h
+++ b/sim/cr16/sim-main.h
@@ -24,6 +24,8 @@
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/sim-main.h b/sim/cris/sim-main.h
index 4dc04a2..fec0039 100644
--- a/sim/cris/sim-main.h
+++ b/sim/cris/sim-main.h
@@ -24,6 +24,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
+#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/sim-main.h b/sim/d10v/sim-main.h
index 0b87811..a7d59dd 100644
--- a/sim/d10v/sim-main.h
+++ b/sim/d10v/sim-main.h
@@ -24,6 +24,8 @@
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/sim-main.h b/sim/frv/sim-main.h
index d5a67cb..fd12c4f 100644
--- a/sim/frv/sim-main.h
+++ b/sim/frv/sim-main.h
@@ -19,6 +19,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Main header for the frv. */
+#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 \
+ | TRACE_branch | TRACE_debug))
+
/* 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/ft32/sim-main.h b/sim/ft32/sim-main.h
index b27a690..a270a5d 100644
--- a/sim/ft32/sim-main.h
+++ b/sim/ft32/sim-main.h
@@ -25,6 +25,8 @@
#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/sim-main.h b/sim/h8300/sim-main.h
index 6dbc1ac..e95c4d9 100644
--- a/sim/h8300/sim-main.h
+++ b/sim/h8300/sim-main.h
@@ -87,6 +87,9 @@ 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/sim-main.h b/sim/iq2000/sim-main.h
index 992520a..ce3baba 100644
--- a/sim/iq2000/sim-main.h
+++ b/sim/iq2000/sim-main.h
@@ -4,6 +4,11 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
+#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/sim-main.h b/sim/lm32/sim-main.h
index 4894e8d..210bb8b 100644
--- a/sim/lm32/sim-main.h
+++ b/sim/lm32/sim-main.h
@@ -23,6 +23,11 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
+#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/sim-main.h b/sim/m32r/sim-main.h
index cd39e98..74bb513 100644
--- a/sim/m32r/sim-main.h
+++ b/sim/m32r/sim-main.h
@@ -3,6 +3,11 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
+#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/sim-main.h b/sim/m68hc11/sim-main.h
index d1fc582..4f41db9 100644
--- a/sim/m68hc11/sim-main.h
+++ b/sim/m68hc11/sim-main.h
@@ -25,6 +25,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#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/sim-main.h b/sim/mcore/sim-main.h
index be50ec1..25698c1 100644
--- a/sim/mcore/sim-main.h
+++ b/sim/mcore/sim-main.h
@@ -24,6 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
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/sim-main.h b/sim/microblaze/sim-main.h
index 6781374..6b7b776 100644
--- a/sim/microblaze/sim-main.h
+++ b/sim/microblaze/sim-main.h
@@ -20,6 +20,9 @@
#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/sim-main.h b/sim/mips/sim-main.h
index 8d698ad..9729804 100644
--- a/sim/mips/sim-main.h
+++ b/sim/mips/sim-main.h
@@ -29,6 +29,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
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/sim-main.h b/sim/mn10300/sim-main.h
index 847506e..2ddbfb9 100644
--- a/sim/mn10300/sim-main.h
+++ b/sim/mn10300/sim-main.h
@@ -42,6 +42,8 @@
#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/sim-main.h b/sim/moxie/sim-main.h
index b1a64fc..c60437e 100644
--- a/sim/moxie/sim-main.h
+++ b/sim/moxie/sim-main.h
@@ -21,6 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#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/sim-main.h b/sim/msp430/sim-main.h
index 19c8cca..37bb42d 100644
--- a/sim/msp430/sim-main.h
+++ b/sim/msp430/sim-main.h
@@ -23,6 +23,9 @@
#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/sim-main.h b/sim/sh/sim-main.h
index e67df28..e2e17d7 100644
--- a/sim/sh/sim-main.h
+++ b/sim/sh/sim-main.h
@@ -20,6 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#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/sim-main.h b/sim/sh64/sim-main.h
index 7b24ab0..8fb595e 100644
--- a/sim/sh64/sim-main.h
+++ b/sim/sh64/sim-main.h
@@ -3,6 +3,11 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
+#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/sim-main.h b/sim/v850/sim-main.h
index 5127d28..16cbd97 100644
--- a/sim/v850/sim-main.h
+++ b/sim/v850/sim-main.h
@@ -16,6 +16,9 @@
#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"
--
2.7.4
|