Makefile.in 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  1. # Makefile template for Configure for the MIPS simulator.
  2. # Written by Cygnus Support.
  3. ## COMMON_PRE_CONFIG_FRAG
  4. # Object files created by various simulator generators.
  5. SIM_IGEN_OBJ = \
  6. support.o \
  7. itable.o \
  8. semantics.o \
  9. idecode.o \
  10. icache.o \
  11. engine.o \
  12. irun.o \
  13. SIM_M16_OBJ = \
  14. m16_support.o \
  15. m16_semantics.o \
  16. m16_idecode.o \
  17. m16_icache.o \
  18. \
  19. m32_support.o \
  20. m32_semantics.o \
  21. m32_idecode.o \
  22. m32_icache.o \
  23. \
  24. itable.o \
  25. m16run.o \
  26. SIM_MICROMIPS_OBJ = \
  27. micromips16_support.o \
  28. micromips16_semantics.o \
  29. micromips16_idecode.o \
  30. micromips16_icache.o \
  31. \
  32. micromips32_support.o \
  33. micromips32_semantics.o \
  34. micromips32_idecode.o \
  35. micromips32_icache.o \
  36. \
  37. micromips_m32_support.o \
  38. micromips_m32_semantics.o \
  39. micromips_m32_idecode.o \
  40. micromips_m32_icache.o \
  41. \
  42. itable.o \
  43. micromipsrun.o \
  44. SIM_MULTI_OBJ = @sim_multi_obj@ \
  45. itable.o \
  46. multi-run.o \
  47. SIM_OBJS = \
  48. interp.o \
  49. $(SIM_@sim_gen@_OBJ) \
  50. $(SIM_NEW_COMMON_OBJS) \
  51. cp1.o \
  52. mdmx.o \
  53. dsp.o \
  54. sim-main.o \
  55. sim-resume.o \
  56. SIM_EXTRA_HW_DEVICES = tx3904cpu tx3904irc tx3904tmr tx3904sio
  57. # List of flags to always pass to $(CC).
  58. SIM_SUBTARGET=@SIM_SUBTARGET@
  59. SIM_EXTRA_CFLAGS = $(SIM_SUBTARGET)
  60. SIM_EXTRA_CLEAN = clean-extra
  61. SIM_EXTRA_DISTCLEAN = distclean-extra
  62. all: $(SIM_@sim_gen@_ALL)
  63. SIM_EXTRA_DEPS = itable.h
  64. ## COMMON_POST_CONFIG_FRAG
  65. IGEN_TRACE= # -G omit-line-numbers # -G trace-rule-selection -G trace-rule-rejection -G trace-entries # -G trace-all
  66. IGEN_INSN=$(srcdir)/mips.igen
  67. IGEN_DC=$(srcdir)/mips.dc
  68. M16_DC=$(srcdir)/m16.dc
  69. MICROMIPS32_DC=$(srcdir)/micromips.dc
  70. MICROMIPS16_DC=$(srcdir)/micromips16.dc
  71. IGEN_INCLUDE=\
  72. $(srcdir)/micromipsdsp.igen \
  73. $(srcdir)/micromips.igen \
  74. $(srcdir)/m16.igen \
  75. $(srcdir)/m16e.igen \
  76. $(srcdir)/mdmx.igen \
  77. $(srcdir)/mips3d.igen \
  78. $(srcdir)/sb1.igen \
  79. $(srcdir)/tx.igen \
  80. $(srcdir)/vr.igen \
  81. $(srcdir)/dsp.igen \
  82. $(srcdir)/dsp2.igen \
  83. $(srcdir)/mips3264r2.igen \
  84. $(srcdir)/mips3264r6.igen \
  85. # NB: Since these can be built by a number of generators, care
  86. # must be taken to ensure that they are only dependant on
  87. # one of those generators.
  88. BUILT_SRC_FROM_GEN = \
  89. itable.h \
  90. itable.c \
  91. SIM_IGEN_ALL = tmp-igen
  92. SIM_M16_ALL = tmp-m16
  93. SIM_MICROMIPS_ALL = tmp-micromips
  94. SIM_MULTI_ALL = tmp-multi
  95. $(BUILT_SRC_FROM_GEN): $(SIM_@sim_gen@_ALL)
  96. BUILT_SRC_FROM_IGEN = \
  97. icache.h \
  98. icache.c \
  99. idecode.h \
  100. idecode.c \
  101. semantics.h \
  102. semantics.c \
  103. model.h \
  104. model.c \
  105. support.h \
  106. support.c \
  107. engine.h \
  108. engine.c \
  109. irun.c \
  110. $(BUILT_SRC_FROM_IGEN): tmp-igen
  111. tmp-igen: $(IGEN_INSN) $(IGEN_DC) $(IGEN) $(IGEN_INCLUDE)
  112. $(ECHO_IGEN) $(IGEN_RUN) \
  113. $(IGEN_TRACE) \
  114. -I $(srcdir) \
  115. -Werror \
  116. -Wnodiscard \
  117. @sim_igen_flags@ \
  118. -G gen-direct-access \
  119. -G gen-zero-r0 \
  120. -B 32 \
  121. -H 31 \
  122. -i $(IGEN_INSN) \
  123. -o $(IGEN_DC) \
  124. -x \
  125. -n icache.h -hc tmp-icache.h \
  126. -n icache.c -c tmp-icache.c \
  127. -n semantics.h -hs tmp-semantics.h \
  128. -n semantics.c -s tmp-semantics.c \
  129. -n idecode.h -hd tmp-idecode.h \
  130. -n idecode.c -d tmp-idecode.c \
  131. -n model.h -hm tmp-model.h \
  132. -n model.c -m tmp-model.c \
  133. -n support.h -hf tmp-support.h \
  134. -n support.c -f tmp-support.c \
  135. -n itable.h -ht tmp-itable.h \
  136. -n itable.c -t tmp-itable.c \
  137. -n engine.h -he tmp-engine.h \
  138. -n engine.c -e tmp-engine.c \
  139. -n irun.c -r tmp-irun.c
  140. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-icache.h icache.h
  141. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-icache.c icache.c
  142. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-idecode.h idecode.h
  143. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-idecode.c idecode.c
  144. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-semantics.h semantics.h
  145. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-semantics.c semantics.c
  146. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-model.h model.h
  147. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-model.c model.c
  148. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-support.h support.h
  149. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-support.c support.c
  150. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-itable.h itable.h
  151. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-itable.c itable.c
  152. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-engine.h engine.h
  153. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-engine.c engine.c
  154. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-irun.c irun.c
  155. $(SILENCE) touch $@
  156. BUILT_SRC_FROM_M16 = \
  157. m16_icache.h \
  158. m16_icache.c \
  159. m16_idecode.h \
  160. m16_idecode.c \
  161. m16_semantics.h \
  162. m16_semantics.c \
  163. m16_model.h \
  164. m16_model.c \
  165. m16_support.h \
  166. m16_support.c \
  167. \
  168. m32_icache.h \
  169. m32_icache.c \
  170. m32_idecode.h \
  171. m32_idecode.c \
  172. m32_semantics.h \
  173. m32_semantics.c \
  174. m32_model.h \
  175. m32_model.c \
  176. m32_support.h \
  177. m32_support.c \
  178. $(BUILT_SRC_FROM_M16): tmp-m16
  179. tmp-m16: $(IGEN_INSN) $(IGEN_DC) $(IGEN) $(IGEN_INCLUDE)
  180. $(ECHO_IGEN) $(IGEN_RUN) \
  181. $(IGEN_TRACE) \
  182. -I $(srcdir) \
  183. -Werror \
  184. -Wnodiscard \
  185. @sim_m16_flags@ \
  186. -G gen-direct-access \
  187. -G gen-zero-r0 \
  188. -B 16 \
  189. -H 15 \
  190. -i $(IGEN_INSN) \
  191. -o $(M16_DC) \
  192. -P m16_ \
  193. -x \
  194. -n m16_icache.h -hc tmp-icache.h \
  195. -n m16_icache.c -c tmp-icache.c \
  196. -n m16_semantics.h -hs tmp-semantics.h \
  197. -n m16_semantics.c -s tmp-semantics.c \
  198. -n m16_idecode.h -hd tmp-idecode.h \
  199. -n m16_idecode.c -d tmp-idecode.c \
  200. -n m16_model.h -hm tmp-model.h \
  201. -n m16_model.c -m tmp-model.c \
  202. -n m16_support.h -hf tmp-support.h \
  203. -n m16_support.c -f tmp-support.c \
  204. #
  205. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-icache.h m16_icache.h
  206. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-icache.c m16_icache.c
  207. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-idecode.h m16_idecode.h
  208. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-idecode.c m16_idecode.c
  209. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-semantics.h m16_semantics.h
  210. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-semantics.c m16_semantics.c
  211. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-model.h m16_model.h
  212. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-model.c m16_model.c
  213. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-support.h m16_support.h
  214. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-support.c m16_support.c
  215. $(ECHO_IGEN) $(IGEN_RUN) \
  216. $(IGEN_TRACE) \
  217. -I $(srcdir) \
  218. -Werror \
  219. -Wnodiscard \
  220. @sim_igen_flags@ \
  221. -G gen-direct-access \
  222. -G gen-zero-r0 \
  223. -B 32 \
  224. -H 31 \
  225. -i $(IGEN_INSN) \
  226. -o $(IGEN_DC) \
  227. -P m32_ \
  228. -x \
  229. -n m32_icache.h -hc tmp-icache.h \
  230. -n m32_icache.c -c tmp-icache.c \
  231. -n m32_semantics.h -hs tmp-semantics.h \
  232. -n m32_semantics.c -s tmp-semantics.c \
  233. -n m32_idecode.h -hd tmp-idecode.h \
  234. -n m32_idecode.c -d tmp-idecode.c \
  235. -n m32_model.h -hm tmp-model.h \
  236. -n m32_model.c -m tmp-model.c \
  237. -n m32_support.h -hf tmp-support.h \
  238. -n m32_support.c -f tmp-support.c \
  239. #
  240. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-icache.h m32_icache.h
  241. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-icache.c m32_icache.c
  242. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-idecode.h m32_idecode.h
  243. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-idecode.c m32_idecode.c
  244. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-semantics.h m32_semantics.h
  245. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-semantics.c m32_semantics.c
  246. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-model.h m32_model.h
  247. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-model.c m32_model.c
  248. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-support.h m32_support.h
  249. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-support.c m32_support.c
  250. $(ECHO_IGEN) $(IGEN_RUN) \
  251. $(IGEN_TRACE) \
  252. -I $(srcdir) \
  253. -Werror \
  254. -Wnodiscard \
  255. -Wnowidth \
  256. @sim_igen_flags@ @sim_m16_flags@ \
  257. -G gen-direct-access \
  258. -G gen-zero-r0 \
  259. -i $(IGEN_INSN) \
  260. -n itable.h -ht tmp-itable.h \
  261. -n itable.c -t tmp-itable.c \
  262. #
  263. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-itable.h itable.h
  264. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-itable.c itable.c
  265. $(SILENCE) touch $@
  266. BUILT_SRC_FROM_MICROMIPS = \
  267. micromips16_icache.h \
  268. micromips16_icache.c \
  269. micromips16_idecode.h \
  270. micromips16_idecode.c \
  271. micromips16_semantics.h \
  272. micromips16_semantics.c \
  273. micromips16_model.h \
  274. micromips16_model.c \
  275. micromips16_support.h \
  276. micromips16_support.c \
  277. \
  278. micromips32_icache.h \
  279. micromips32_icache.c \
  280. micromips32_idecode.h \
  281. micromips32_idecode.c \
  282. micromips32_semantics.h \
  283. micromips32_semantics.c \
  284. micromips32_model.h \
  285. micromips32_model.c \
  286. micromips32_support.h \
  287. micromips32_support.c \
  288. \
  289. micromips_m32_icache.h \
  290. micromips_m32_icache.c \
  291. micromips_m32_idecode.h \
  292. micromips_m32_idecode.c \
  293. micromips_m32_semantics.h \
  294. micromips_m32_semantics.c \
  295. micromips_m32_model.h \
  296. micromips_m32_model.c \
  297. micromips_m32_support.h \
  298. micromips_m32_support.c \
  299. $(BUILT_SRC_FROM_MICROMIPS): tmp-micromips
  300. tmp-micromips: $(IGEN_INSN) $(IGEN_DC) $(IGEN) $(IGEN_INCLUDE)
  301. $(ECHO_IGEN) $(IGEN_RUN) \
  302. $(IGEN_TRACE) \
  303. -I $(srcdir) \
  304. -Werror \
  305. -Wnodiscard \
  306. @sim_micromips16_flags@ \
  307. -G gen-direct-access \
  308. -G gen-zero-r0 \
  309. -B 16 \
  310. -H 15 \
  311. -i $(IGEN_INSN) \
  312. -o $(MICROMIPS16_DC) \
  313. -P micromips16_ \
  314. -x \
  315. -n micromips16_icache.h -hc tmp-icache.h \
  316. -n micromips16_icache.c -c tmp-icache.c \
  317. -n micromips16_semantics.h -hs tmp-semantics.h \
  318. -n micromips16_semantics.c -s tmp-semantics.c \
  319. -n micromips16_idecode.h -hd tmp-idecode.h \
  320. -n micromips16_idecode.c -d tmp-idecode.c \
  321. -n micromips16_model.h -hm tmp-model.h \
  322. -n micromips16_model.c -m tmp-model.c \
  323. -n micromips16_support.h -hf tmp-support.h \
  324. -n micromips16_support.c -f tmp-support.c \
  325. #
  326. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-icache.h micromips16_icache.h
  327. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-icache.c micromips16_icache.c
  328. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-idecode.h micromips16_idecode.h
  329. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-idecode.c micromips16_idecode.c
  330. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-semantics.h micromips16_semantics.h
  331. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-semantics.c micromips16_semantics.c
  332. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-model.h micromips16_model.h
  333. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-model.c micromips16_model.c
  334. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-support.h micromips16_support.h
  335. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-support.c micromips16_support.c
  336. $(ECHO_IGEN) $(IGEN_RUN) \
  337. $(IGEN_TRACE) \
  338. -I $(srcdir) \
  339. -Werror \
  340. -Wnodiscard \
  341. @sim_micromips_flags@ \
  342. -G gen-direct-access \
  343. -G gen-zero-r0 \
  344. -B 32 \
  345. -H 31 \
  346. -i $(IGEN_INSN) \
  347. -o $(MICROMIPS32_DC) \
  348. -P micromips32_ \
  349. -x \
  350. -n micromips32_icache.h -hc tmp-icache.h \
  351. -n micromips32_icache.c -c tmp-icache.c \
  352. -n micromips32_semantics.h -hs tmp-semantics.h \
  353. -n micromips32_semantics.c -s tmp-semantics.c \
  354. -n micromips32_idecode.h -hd tmp-idecode.h \
  355. -n micromips32_idecode.c -d tmp-idecode.c \
  356. -n micromips32_model.h -hm tmp-model.h \
  357. -n micromips32_model.c -m tmp-model.c \
  358. -n micromips32_support.h -hf tmp-support.h \
  359. -n micromips32_support.c -f tmp-support.c \
  360. #
  361. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-icache.h micromips32_icache.h
  362. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-icache.c micromips32_icache.c
  363. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-idecode.h micromips32_idecode.h
  364. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-idecode.c micromips32_idecode.c
  365. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-semantics.h micromips32_semantics.h
  366. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-semantics.c micromips32_semantics.c
  367. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-model.h micromips32_model.h
  368. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-model.c micromips32_model.c
  369. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-support.h micromips32_support.h
  370. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-support.c micromips32_support.c
  371. $(ECHO_IGEN) $(IGEN_RUN) \
  372. $(IGEN_TRACE) \
  373. -I $(srcdir) \
  374. -Werror \
  375. -Wnodiscard \
  376. @sim_igen_flags@ \
  377. -G gen-direct-access \
  378. -G gen-zero-r0 \
  379. -B 32 \
  380. -H 31 \
  381. -i $(IGEN_INSN) \
  382. -o $(IGEN_DC) \
  383. -P micromips_m32_ \
  384. -x \
  385. -n micromips_m32_icache.h -hc tmp-icache.h \
  386. -n micromips_m32_icache.c -c tmp-icache.c \
  387. -n micromips_m32_semantics.h -hs tmp-semantics.h \
  388. -n micromips_m32_semantics.c -s tmp-semantics.c \
  389. -n micromips_m32_idecode.h -hd tmp-idecode.h \
  390. -n micromips_m32_idecode.c -d tmp-idecode.c \
  391. -n micromips_m32_model.h -hm tmp-model.h \
  392. -n micromips_m32_model.c -m tmp-model.c \
  393. -n micromips_m32_support.h -hf tmp-support.h \
  394. -n micromips_m32_support.c -f tmp-support.c \
  395. #
  396. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-icache.h micromips_m32_icache.h
  397. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-icache.c micromips_m32_icache.c
  398. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-idecode.h micromips_m32_idecode.h
  399. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-idecode.c micromips_m32_idecode.c
  400. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-semantics.h micromips_m32_semantics.h
  401. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-semantics.c micromips_m32_semantics.c
  402. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-model.h micromips_m32_model.h
  403. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-model.c micromips_m32_model.c
  404. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-support.h micromips_m32_support.h
  405. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-support.c micromips_m32_support.c
  406. $(ECHO_IGEN) $(IGEN_RUN) \
  407. $(IGEN_TRACE) \
  408. -I $(srcdir) \
  409. -Werror \
  410. -Wnodiscard \
  411. -Wnowidth \
  412. @sim_igen_flags@ @sim_micromips_flags@ @sim_micromips16_flags@\
  413. -G gen-direct-access \
  414. -G gen-zero-r0 \
  415. -i $(IGEN_INSN) \
  416. -n itable.h -ht tmp-itable.h \
  417. -n itable.c -t tmp-itable.c \
  418. #
  419. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-itable.h itable.h
  420. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-itable.c itable.c
  421. $(SILENCE) touch $@
  422. BUILT_SRC_FROM_MULTI = @sim_multi_src@
  423. SIM_MULTI_IGEN_CONFIGS = @sim_multi_igen_configs@
  424. $(BUILT_SRC_FROM_MULTI): tmp-multi
  425. tmp-multi: tmp-mach-multi tmp-itable-multi tmp-run-multi
  426. tmp-mach-multi: $(IGEN_INSN) $(IGEN_DC) $(IGEN) $(IGEN_INCLUDE)
  427. for t in $(SIM_MULTI_IGEN_CONFIGS); do \
  428. p=`echo $${t} | sed -e 's/:.*//'` ; \
  429. m=`echo $${t} | sed -e 's/.*:\(.*\):.*/\1/'` ; \
  430. f=`echo $${t} | sed -e 's/.*://'` ; \
  431. case $${p} in \
  432. micromips16*) e="-B 16 -H 15 -o $(MICROMIPS16_DC) -F 16" ;; \
  433. micromips32* | micromips64*) \
  434. e="-B 32 -H 31 -o $(MICROMIPS32_DC) -F $${f}" ;; \
  435. micromips_m32*) \
  436. e="-B 32 -H 31 -o $(IGEN_DC) -F $${f}"; \
  437. m="mips32r2,mips3d,mdmx,dsp,dsp2,smartmips" ;; \
  438. micromips_m64*) \
  439. e="-B 32 -H 31 -o $(IGEN_DC) -F $${f}"; \
  440. m="mips64r2,mips3d,mdmx,dsp,dsp2,smartmips" ;; \
  441. m16*) e="-B 16 -H 15 -o $(M16_DC) -F 16" ;; \
  442. *) e="-B 32 -H 31 -o $(IGEN_DC) -F $${f}" ;; \
  443. esac; \
  444. $(IGEN_RUN) \
  445. $(IGEN_TRACE) \
  446. $${e} \
  447. -I $(srcdir) \
  448. -Werror \
  449. -Wnodiscard \
  450. -N 0 \
  451. -M $${m} \
  452. -G gen-direct-access \
  453. -G gen-zero-r0 \
  454. -i $(IGEN_INSN) \
  455. -P $${p}_ \
  456. -x \
  457. -n $${p}_icache.h -hc tmp-icache.h \
  458. -n $${p}_icache.c -c tmp-icache.c \
  459. -n $${p}_semantics.h -hs tmp-semantics.h \
  460. -n $${p}_semantics.c -s tmp-semantics.c \
  461. -n $${p}_idecode.h -hd tmp-idecode.h \
  462. -n $${p}_idecode.c -d tmp-idecode.c \
  463. -n $${p}_model.h -hm tmp-model.h \
  464. -n $${p}_model.c -m tmp-model.c \
  465. -n $${p}_support.h -hf tmp-support.h \
  466. -n $${p}_support.c -f tmp-support.c \
  467. -n $${p}_engine.h -he tmp-engine.h \
  468. -n $${p}_engine.c -e tmp-engine.c \
  469. || exit; \
  470. $(SHELL) $(srcdir)/../../move-if-change tmp-icache.h \
  471. $${p}_icache.h ; \
  472. $(SHELL) $(srcdir)/../../move-if-change tmp-icache.c \
  473. $${p}_icache.c ; \
  474. $(SHELL) $(srcdir)/../../move-if-change tmp-idecode.h \
  475. $${p}_idecode.h ; \
  476. $(SHELL) $(srcdir)/../../move-if-change tmp-idecode.c \
  477. $${p}_idecode.c ; \
  478. $(SHELL) $(srcdir)/../../move-if-change tmp-semantics.h \
  479. $${p}_semantics.h ; \
  480. $(SHELL) $(srcdir)/../../move-if-change tmp-semantics.c \
  481. $${p}_semantics.c ; \
  482. $(SHELL) $(srcdir)/../../move-if-change tmp-model.h \
  483. $${p}_model.h ; \
  484. $(SHELL) $(srcdir)/../../move-if-change tmp-model.c \
  485. $${p}_model.c ; \
  486. $(SHELL) $(srcdir)/../../move-if-change tmp-support.h \
  487. $${p}_support.h ; \
  488. $(SHELL) $(srcdir)/../../move-if-change tmp-support.c \
  489. $${p}_support.c ; \
  490. $(SHELL) $(srcdir)/../../move-if-change tmp-engine.h \
  491. $${p}_engine.h ; \
  492. $(SHELL) $(srcdir)/../../move-if-change tmp-engine.c \
  493. $${p}_engine.c ; \
  494. done
  495. $(SILENCE) touch $@
  496. tmp-itable-multi: $(IGEN_INSN) $(IGEN_DC) $(IGEN) $(IGEN_INCLUDE)
  497. $(ECHO_IGEN) $(IGEN_RUN) \
  498. $(IGEN_TRACE) \
  499. -I $(srcdir) \
  500. -Werror \
  501. -Wnodiscard \
  502. -Wnowidth \
  503. -N 0 \
  504. @sim_multi_flags@ \
  505. -G gen-direct-access \
  506. -G gen-zero-r0 \
  507. -i $(IGEN_INSN) \
  508. -n itable.h -ht tmp-itable.h \
  509. -n itable.c -t tmp-itable.c \
  510. #
  511. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-itable.h itable.h
  512. $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-itable.c itable.c
  513. $(SILENCE) touch $@
  514. tmp-run-multi: $(srcdir)/m16run.c $(srcdir)/micromipsrun.c
  515. for t in $(SIM_MULTI_IGEN_CONFIGS); do \
  516. case $${t} in \
  517. m16*) \
  518. m=`echo $${t} | sed -e 's/^m16//' -e 's/:.*//'`; \
  519. sed < $(srcdir)/m16run.c > tmp-run \
  520. -e "s/^sim_/m16$${m}_/" \
  521. -e "/include/s/sim-engine/m16$${m}_engine/" \
  522. -e "s/m16_/m16$${m}_/" \
  523. -e "s/m32_/m32$${m}_/" ; \
  524. $(SHELL) $(srcdir)/../../move-if-change tmp-run \
  525. m16$${m}_run.c ; \
  526. ;;\
  527. micromips32*) \
  528. m=`echo $${t} | sed -e 's/^micromips32//' -e 's/:.*//'`; \
  529. sed < $(srcdir)/micromipsrun.c > tmp-run \
  530. -e "s/^sim_/micromips32$${m}_/" \
  531. -e "/include/s/sim-engine/micromips32$${m}_engine/" \
  532. -e "s/micromips16_/micromips16$${m}_/" \
  533. -e "s/micromips32_/micromips32$${m}_/" \
  534. -e "s/m32_/m32$${m}_/" ; \
  535. $(SHELL) $(srcdir)/../../move-if-change tmp-run \
  536. micromips$${m}_run.c ; \
  537. ;;\
  538. micromips64*) \
  539. m=`echo $${t} | sed -e 's/^micromips64//' -e 's/:.*//'`; \
  540. sed < $(srcdir)/micromipsrun.c > tmp-run \
  541. -e "s/^sim_/micromips64$${m}_/" \
  542. -e "/include/s/sim-engine/micromips64$${m}_engine/" \
  543. -e "s/micromips16_/micromips16$${m}_/" \
  544. -e "s/micromips32_/micromips64$${m}_/" \
  545. -e "s/m32_/m64$${m}_/" ; \
  546. $(SHELL) $(srcdir)/../../move-if-change tmp-run \
  547. micromips$${m}_run.c ; \
  548. ;;\
  549. esac \
  550. done
  551. $(SILENCE) touch $@
  552. clean-extra:
  553. rm -f $(BUILT_SRC_FROM_GEN)
  554. rm -f $(BUILT_SRC_FROM_IGEN)
  555. rm -f $(BUILT_SRC_FROM_M16)
  556. rm -f $(BUILT_SRC_FROM_MICROMIPS)
  557. rm -f $(BUILT_SRC_FROM_MULTI)
  558. rm -f tmp-*
  559. rm -f micromips16*.o micromips32*.o m16*.o m32*.o itable*.o
  560. distclean-extra:
  561. rm -f multi-include.h multi-run.c