0006-Revert-sim-unify-SIM_CPU-definition.patch 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. From 4d913bb73965fdb9c756e8d5916a829b60aa3a44 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"
  5. This reverts commit 20bca71d82598a015de0991196e45f0b5f7ead81.
  6. This change causes a redefinition of SIM_CPU on the Blackfin
  7. architecture, as it is defined in both the common sim/common/sim-base.h
  8. and the architecture specific sim/bfin/sim-main.h.
  9. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  10. ---
  11. sim/arm/sim-main.h | 3 +++
  12. sim/avr/sim-main.h | 2 ++
  13. sim/bfin/sim-main.h | 2 --
  14. sim/common/sim-base.h | 2 --
  15. sim/cr16/sim-main.h | 2 ++
  16. sim/cris/sim-main.h | 5 +++++
  17. sim/d10v/sim-main.h | 2 ++
  18. sim/frv/sim-main.h | 10 ++++++++++
  19. sim/ft32/sim-main.h | 2 ++
  20. sim/h8300/sim-main.h | 3 +++
  21. sim/iq2000/sim-main.h | 5 +++++
  22. sim/lm32/sim-main.h | 5 +++++
  23. sim/m32r/sim-main.h | 5 +++++
  24. sim/m68hc11/sim-main.h | 3 +++
  25. sim/mcore/sim-main.h | 2 ++
  26. sim/microblaze/sim-main.h | 3 +++
  27. sim/mips/sim-main.h | 3 +++
  28. sim/mn10300/sim-main.h | 2 ++
  29. sim/moxie/sim-main.h | 3 +++
  30. sim/msp430/sim-main.h | 3 +++
  31. sim/sh/sim-main.h | 3 +++
  32. sim/sh64/sim-main.h | 5 +++++
  33. sim/v850/sim-main.h | 3 +++
  34. 23 files changed, 74 insertions(+), 4 deletions(-)
  35. diff --git a/sim/arm/sim-main.h b/sim/arm/sim-main.h
  36. index 9a37b98..ae622bd 100644
  37. --- a/sim/arm/sim-main.h
  38. +++ b/sim/arm/sim-main.h
  39. @@ -20,6 +20,9 @@
  40. #define SIM_MAIN_H
  41. #include "sim-basics.h"
  42. +
  43. +typedef struct _sim_cpu SIM_CPU;
  44. +
  45. #include "sim-base.h"
  46. #include "bfd.h"
  47. diff --git a/sim/avr/sim-main.h b/sim/avr/sim-main.h
  48. index e0cac22..52904e3 100644
  49. --- a/sim/avr/sim-main.h
  50. +++ b/sim/avr/sim-main.h
  51. @@ -23,6 +23,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
  52. extern unsigned int pc;
  53. +typedef struct _sim_cpu SIM_CPU;
  54. +
  55. #include "sim-base.h"
  56. struct _sim_cpu {
  57. diff --git a/sim/bfin/sim-main.h b/sim/bfin/sim-main.h
  58. index 806fe15..53e1774 100644
  59. --- a/sim/bfin/sim-main.h
  60. +++ b/sim/bfin/sim-main.h
  61. @@ -24,8 +24,6 @@
  62. #include "sim-basics.h"
  63. #include "sim-signal.h"
  64. -/* TODO: Delete this. Need to convert bu32/etc... to common sim types
  65. - and unwind the bfin-sim.h/machs.h include below first though. */
  66. typedef struct _sim_cpu SIM_CPU;
  67. #include "bfin-sim.h"
  68. diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h
  69. index 21f61f4..e90e07c 100644
  70. --- a/sim/common/sim-base.h
  71. +++ b/sim/common/sim-base.h
  72. @@ -72,8 +72,6 @@ typedef address_word sim_cia;
  73. #define INVALID_INSTRUCTION_ADDRESS ((address_word)0 - 1)
  74. #endif
  75. -/* TODO: Probably should just delete SIM_CPU. */
  76. -typedef struct _sim_cpu SIM_CPU;
  77. typedef struct _sim_cpu sim_cpu;
  78. #include "sim-module.h"
  79. diff --git a/sim/cr16/sim-main.h b/sim/cr16/sim-main.h
  80. index a63b93e..1a80229 100644
  81. --- a/sim/cr16/sim-main.h
  82. +++ b/sim/cr16/sim-main.h
  83. @@ -24,6 +24,8 @@
  84. typedef long int word;
  85. typedef unsigned long int uword;
  86. +typedef struct _sim_cpu SIM_CPU;
  87. +
  88. #include "sim-base.h"
  89. #include "bfd.h"
  90. diff --git a/sim/cris/sim-main.h b/sim/cris/sim-main.h
  91. index 4dc04a2..fec0039 100644
  92. --- a/sim/cris/sim-main.h
  93. +++ b/sim/cris/sim-main.h
  94. @@ -24,6 +24,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
  95. #ifndef SIM_MAIN_H
  96. #define SIM_MAIN_H
  97. +#define USING_SIM_BASE_H
  98. +
  99. +struct _sim_cpu;
  100. +typedef struct _sim_cpu SIM_CPU;
  101. +
  102. #include "symcat.h"
  103. #include "sim-basics.h"
  104. #include "cgen-types.h"
  105. diff --git a/sim/d10v/sim-main.h b/sim/d10v/sim-main.h
  106. index 0b87811..a7d59dd 100644
  107. --- a/sim/d10v/sim-main.h
  108. +++ b/sim/d10v/sim-main.h
  109. @@ -24,6 +24,8 @@
  110. typedef long int word;
  111. typedef unsigned long int uword;
  112. +typedef struct _sim_cpu SIM_CPU;
  113. +
  114. #include "sim-base.h"
  115. #include "bfd.h"
  116. diff --git a/sim/frv/sim-main.h b/sim/frv/sim-main.h
  117. index d5a67cb..fd12c4f 100644
  118. --- a/sim/frv/sim-main.h
  119. +++ b/sim/frv/sim-main.h
  120. @@ -19,6 +19,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
  121. /* Main header for the frv. */
  122. +#define USING_SIM_BASE_H /* FIXME: quick hack */
  123. +
  124. +struct _sim_cpu; /* FIXME: should be in sim-basics.h */
  125. +typedef struct _sim_cpu SIM_CPU;
  126. +
  127. +/* Set the mask of unsupported traces. */
  128. +#define WITH_TRACE \
  129. + (~(TRACE_alu | TRACE_decode | TRACE_memory | TRACE_model | TRACE_fpu \
  130. + | TRACE_branch | TRACE_debug))
  131. +
  132. /* sim-basics.h includes config.h but cgen-types.h must be included before
  133. sim-basics.h and cgen-types.h needs config.h. */
  134. #include "config.h"
  135. diff --git a/sim/ft32/sim-main.h b/sim/ft32/sim-main.h
  136. index b27a690..a270a5d 100644
  137. --- a/sim/ft32/sim-main.h
  138. +++ b/sim/ft32/sim-main.h
  139. @@ -25,6 +25,8 @@
  140. #include "sim-base.h"
  141. #include "bfd.h"
  142. +typedef struct _sim_cpu SIM_CPU;
  143. +
  144. #include "ft32-sim.h"
  145. struct _sim_cpu {
  146. diff --git a/sim/h8300/sim-main.h b/sim/h8300/sim-main.h
  147. index 6dbc1ac..e95c4d9 100644
  148. --- a/sim/h8300/sim-main.h
  149. +++ b/sim/h8300/sim-main.h
  150. @@ -87,6 +87,9 @@ enum h8_typecodes {
  151. };
  152. #include "sim-basics.h"
  153. +
  154. +typedef struct _sim_cpu SIM_CPU;
  155. +
  156. #include "sim-base.h"
  157. /* Structure used to describe addressing */
  158. diff --git a/sim/iq2000/sim-main.h b/sim/iq2000/sim-main.h
  159. index 992520a..ce3baba 100644
  160. --- a/sim/iq2000/sim-main.h
  161. +++ b/sim/iq2000/sim-main.h
  162. @@ -4,6 +4,11 @@
  163. #ifndef SIM_MAIN_H
  164. #define SIM_MAIN_H
  165. +#define USING_SIM_BASE_H /* FIXME: quick hack */
  166. +
  167. +struct _sim_cpu; /* FIXME: should be in sim-basics.h */
  168. +typedef struct _sim_cpu SIM_CPU;
  169. +
  170. /* sim-basics.h includes config.h but cgen-types.h must be included before
  171. sim-basics.h and cgen-types.h needs config.h. */
  172. #include "config.h"
  173. diff --git a/sim/lm32/sim-main.h b/sim/lm32/sim-main.h
  174. index 4894e8d..210bb8b 100644
  175. --- a/sim/lm32/sim-main.h
  176. +++ b/sim/lm32/sim-main.h
  177. @@ -23,6 +23,11 @@
  178. #ifndef SIM_MAIN_H
  179. #define SIM_MAIN_H
  180. +#define USING_SIM_BASE_H /* FIXME: quick hack */
  181. +
  182. +struct _sim_cpu; /* FIXME: should be in sim-basics.h */
  183. +typedef struct _sim_cpu SIM_CPU;
  184. +
  185. #include "symcat.h"
  186. #include "sim-basics.h"
  187. #include "cgen-types.h"
  188. diff --git a/sim/m32r/sim-main.h b/sim/m32r/sim-main.h
  189. index cd39e98..74bb513 100644
  190. --- a/sim/m32r/sim-main.h
  191. +++ b/sim/m32r/sim-main.h
  192. @@ -3,6 +3,11 @@
  193. #ifndef SIM_MAIN_H
  194. #define SIM_MAIN_H
  195. +#define USING_SIM_BASE_H /* FIXME: quick hack */
  196. +
  197. +struct _sim_cpu; /* FIXME: should be in sim-basics.h */
  198. +typedef struct _sim_cpu SIM_CPU;
  199. +
  200. #include "symcat.h"
  201. #include "sim-basics.h"
  202. #include "cgen-types.h"
  203. diff --git a/sim/m68hc11/sim-main.h b/sim/m68hc11/sim-main.h
  204. index d1fc582..4f41db9 100644
  205. --- a/sim/m68hc11/sim-main.h
  206. +++ b/sim/m68hc11/sim-main.h
  207. @@ -25,6 +25,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
  208. #define SIM_HANDLES_LMA 1
  209. #include "sim-basics.h"
  210. +
  211. +typedef struct _sim_cpu SIM_CPU;
  212. +
  213. #include "sim-signal.h"
  214. #include "sim-base.h"
  215. diff --git a/sim/mcore/sim-main.h b/sim/mcore/sim-main.h
  216. index be50ec1..25698c1 100644
  217. --- a/sim/mcore/sim-main.h
  218. +++ b/sim/mcore/sim-main.h
  219. @@ -24,6 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
  220. typedef long int word;
  221. typedef unsigned long int uword;
  222. +typedef struct _sim_cpu SIM_CPU;
  223. +
  224. #include "sim-base.h"
  225. #include "bfd.h"
  226. diff --git a/sim/microblaze/sim-main.h b/sim/microblaze/sim-main.h
  227. index 6781374..6b7b776 100644
  228. --- a/sim/microblaze/sim-main.h
  229. +++ b/sim/microblaze/sim-main.h
  230. @@ -20,6 +20,9 @@
  231. #include "microblaze.h"
  232. #include "sim-basics.h"
  233. +
  234. +typedef struct _sim_cpu SIM_CPU;
  235. +
  236. #include "sim-base.h"
  237. /* The machine state.
  238. diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h
  239. index 8d698ad..9729804 100644
  240. --- a/sim/mips/sim-main.h
  241. +++ b/sim/mips/sim-main.h
  242. @@ -29,6 +29,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
  243. mips_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), (TRANSFER), (ERROR))
  244. #include "sim-basics.h"
  245. +
  246. +typedef struct _sim_cpu SIM_CPU;
  247. +
  248. #include "sim-base.h"
  249. #include "bfd.h"
  250. diff --git a/sim/mn10300/sim-main.h b/sim/mn10300/sim-main.h
  251. index 847506e..2ddbfb9 100644
  252. --- a/sim/mn10300/sim-main.h
  253. +++ b/sim/mn10300/sim-main.h
  254. @@ -42,6 +42,8 @@
  255. #include "itable.h"
  256. #include "idecode.h"
  257. +typedef struct _sim_cpu SIM_CPU;
  258. +
  259. #define WITH_WATCHPOINTS 1
  260. #define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
  261. diff --git a/sim/moxie/sim-main.h b/sim/moxie/sim-main.h
  262. index b1a64fc..c60437e 100644
  263. --- a/sim/moxie/sim-main.h
  264. +++ b/sim/moxie/sim-main.h
  265. @@ -21,6 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
  266. #define SIM_MAIN_H
  267. #include "sim-basics.h"
  268. +
  269. +typedef struct _sim_cpu SIM_CPU;
  270. +
  271. #include "sim-base.h"
  272. #include "bfd.h"
  273. diff --git a/sim/msp430/sim-main.h b/sim/msp430/sim-main.h
  274. index 19c8cca..37bb42d 100644
  275. --- a/sim/msp430/sim-main.h
  276. +++ b/sim/msp430/sim-main.h
  277. @@ -23,6 +23,9 @@
  278. #include "sim-basics.h"
  279. #include "sim-signal.h"
  280. +
  281. +typedef struct _sim_cpu SIM_CPU;
  282. +
  283. #include "msp430-sim.h"
  284. #include "sim-base.h"
  285. diff --git a/sim/sh/sim-main.h b/sim/sh/sim-main.h
  286. index e67df28..e2e17d7 100644
  287. --- a/sim/sh/sim-main.h
  288. +++ b/sim/sh/sim-main.h
  289. @@ -20,6 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
  290. #define SIM_MAIN_H
  291. #include "sim-basics.h"
  292. +
  293. +typedef struct _sim_cpu SIM_CPU;
  294. +
  295. #include "sim-base.h"
  296. typedef struct
  297. diff --git a/sim/sh64/sim-main.h b/sim/sh64/sim-main.h
  298. index 7b24ab0..8fb595e 100644
  299. --- a/sim/sh64/sim-main.h
  300. +++ b/sim/sh64/sim-main.h
  301. @@ -3,6 +3,11 @@
  302. #ifndef SIM_MAIN_H
  303. #define SIM_MAIN_H
  304. +#define USING_SIM_BASE_H /* FIXME: quick hack */
  305. +
  306. +struct _sim_cpu; /* FIXME: should be in sim-basics.h */
  307. +typedef struct _sim_cpu SIM_CPU;
  308. +
  309. /* sim-basics.h includes config.h but cgen-types.h must be included before
  310. sim-basics.h and cgen-types.h needs config.h. */
  311. #include "config.h"
  312. diff --git a/sim/v850/sim-main.h b/sim/v850/sim-main.h
  313. index 5127d28..16cbd97 100644
  314. --- a/sim/v850/sim-main.h
  315. +++ b/sim/v850/sim-main.h
  316. @@ -16,6 +16,9 @@
  317. #include "sim-basics.h"
  318. #include "sim-signal.h"
  319. #include "sim-fpu.h"
  320. +
  321. +typedef struct _sim_cpu SIM_CPU;
  322. +
  323. #include "sim-base.h"
  324. #include "simops.h"
  325. --
  326. 2.7.4