Makefile.in 19 KB

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