cpu.c 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709
  1. /* Misc. support for CPU family frvbf.
  2. THIS FILE IS MACHINE GENERATED WITH CGEN.
  3. Copyright 1996-2015 Free Software Foundation, Inc.
  4. This file is part of the GNU simulators.
  5. This file is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3, or (at your option)
  8. any later version.
  9. It is distributed in the hope that it will be useful, but WITHOUT
  10. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  11. or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
  12. License for more details.
  13. You should have received a copy of the GNU General Public License along
  14. with this program; if not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #define WANT_CPU frvbf
  17. #define WANT_CPU_FRVBF
  18. #include "sim-main.h"
  19. #include "cgen-ops.h"
  20. /* Get the value of h-reloc-ann. */
  21. BI
  22. frvbf_h_reloc_ann_get (SIM_CPU *current_cpu)
  23. {
  24. return CPU (h_reloc_ann);
  25. }
  26. /* Set a value for h-reloc-ann. */
  27. void
  28. frvbf_h_reloc_ann_set (SIM_CPU *current_cpu, BI newval)
  29. {
  30. CPU (h_reloc_ann) = newval;
  31. }
  32. /* Get the value of h-pc. */
  33. USI
  34. frvbf_h_pc_get (SIM_CPU *current_cpu)
  35. {
  36. return CPU (h_pc);
  37. }
  38. /* Set a value for h-pc. */
  39. void
  40. frvbf_h_pc_set (SIM_CPU *current_cpu, USI newval)
  41. {
  42. CPU (h_pc) = newval;
  43. }
  44. /* Get the value of h-psr_imple. */
  45. UQI
  46. frvbf_h_psr_imple_get (SIM_CPU *current_cpu)
  47. {
  48. return CPU (h_psr_imple);
  49. }
  50. /* Set a value for h-psr_imple. */
  51. void
  52. frvbf_h_psr_imple_set (SIM_CPU *current_cpu, UQI newval)
  53. {
  54. CPU (h_psr_imple) = newval;
  55. }
  56. /* Get the value of h-psr_ver. */
  57. UQI
  58. frvbf_h_psr_ver_get (SIM_CPU *current_cpu)
  59. {
  60. return CPU (h_psr_ver);
  61. }
  62. /* Set a value for h-psr_ver. */
  63. void
  64. frvbf_h_psr_ver_set (SIM_CPU *current_cpu, UQI newval)
  65. {
  66. CPU (h_psr_ver) = newval;
  67. }
  68. /* Get the value of h-psr_ice. */
  69. BI
  70. frvbf_h_psr_ice_get (SIM_CPU *current_cpu)
  71. {
  72. return CPU (h_psr_ice);
  73. }
  74. /* Set a value for h-psr_ice. */
  75. void
  76. frvbf_h_psr_ice_set (SIM_CPU *current_cpu, BI newval)
  77. {
  78. CPU (h_psr_ice) = newval;
  79. }
  80. /* Get the value of h-psr_nem. */
  81. BI
  82. frvbf_h_psr_nem_get (SIM_CPU *current_cpu)
  83. {
  84. return CPU (h_psr_nem);
  85. }
  86. /* Set a value for h-psr_nem. */
  87. void
  88. frvbf_h_psr_nem_set (SIM_CPU *current_cpu, BI newval)
  89. {
  90. CPU (h_psr_nem) = newval;
  91. }
  92. /* Get the value of h-psr_cm. */
  93. BI
  94. frvbf_h_psr_cm_get (SIM_CPU *current_cpu)
  95. {
  96. return CPU (h_psr_cm);
  97. }
  98. /* Set a value for h-psr_cm. */
  99. void
  100. frvbf_h_psr_cm_set (SIM_CPU *current_cpu, BI newval)
  101. {
  102. CPU (h_psr_cm) = newval;
  103. }
  104. /* Get the value of h-psr_be. */
  105. BI
  106. frvbf_h_psr_be_get (SIM_CPU *current_cpu)
  107. {
  108. return CPU (h_psr_be);
  109. }
  110. /* Set a value for h-psr_be. */
  111. void
  112. frvbf_h_psr_be_set (SIM_CPU *current_cpu, BI newval)
  113. {
  114. CPU (h_psr_be) = newval;
  115. }
  116. /* Get the value of h-psr_esr. */
  117. BI
  118. frvbf_h_psr_esr_get (SIM_CPU *current_cpu)
  119. {
  120. return CPU (h_psr_esr);
  121. }
  122. /* Set a value for h-psr_esr. */
  123. void
  124. frvbf_h_psr_esr_set (SIM_CPU *current_cpu, BI newval)
  125. {
  126. CPU (h_psr_esr) = newval;
  127. }
  128. /* Get the value of h-psr_ef. */
  129. BI
  130. frvbf_h_psr_ef_get (SIM_CPU *current_cpu)
  131. {
  132. return CPU (h_psr_ef);
  133. }
  134. /* Set a value for h-psr_ef. */
  135. void
  136. frvbf_h_psr_ef_set (SIM_CPU *current_cpu, BI newval)
  137. {
  138. CPU (h_psr_ef) = newval;
  139. }
  140. /* Get the value of h-psr_em. */
  141. BI
  142. frvbf_h_psr_em_get (SIM_CPU *current_cpu)
  143. {
  144. return CPU (h_psr_em);
  145. }
  146. /* Set a value for h-psr_em. */
  147. void
  148. frvbf_h_psr_em_set (SIM_CPU *current_cpu, BI newval)
  149. {
  150. CPU (h_psr_em) = newval;
  151. }
  152. /* Get the value of h-psr_pil. */
  153. UQI
  154. frvbf_h_psr_pil_get (SIM_CPU *current_cpu)
  155. {
  156. return CPU (h_psr_pil);
  157. }
  158. /* Set a value for h-psr_pil. */
  159. void
  160. frvbf_h_psr_pil_set (SIM_CPU *current_cpu, UQI newval)
  161. {
  162. CPU (h_psr_pil) = newval;
  163. }
  164. /* Get the value of h-psr_ps. */
  165. BI
  166. frvbf_h_psr_ps_get (SIM_CPU *current_cpu)
  167. {
  168. return CPU (h_psr_ps);
  169. }
  170. /* Set a value for h-psr_ps. */
  171. void
  172. frvbf_h_psr_ps_set (SIM_CPU *current_cpu, BI newval)
  173. {
  174. CPU (h_psr_ps) = newval;
  175. }
  176. /* Get the value of h-psr_et. */
  177. BI
  178. frvbf_h_psr_et_get (SIM_CPU *current_cpu)
  179. {
  180. return CPU (h_psr_et);
  181. }
  182. /* Set a value for h-psr_et. */
  183. void
  184. frvbf_h_psr_et_set (SIM_CPU *current_cpu, BI newval)
  185. {
  186. CPU (h_psr_et) = newval;
  187. }
  188. /* Get the value of h-psr_s. */
  189. BI
  190. frvbf_h_psr_s_get (SIM_CPU *current_cpu)
  191. {
  192. return CPU (h_psr_s);
  193. }
  194. /* Set a value for h-psr_s. */
  195. void
  196. frvbf_h_psr_s_set (SIM_CPU *current_cpu, BI newval)
  197. {
  198. SET_H_PSR_S (newval);
  199. }
  200. /* Get the value of h-tbr_tba. */
  201. USI
  202. frvbf_h_tbr_tba_get (SIM_CPU *current_cpu)
  203. {
  204. return CPU (h_tbr_tba);
  205. }
  206. /* Set a value for h-tbr_tba. */
  207. void
  208. frvbf_h_tbr_tba_set (SIM_CPU *current_cpu, USI newval)
  209. {
  210. CPU (h_tbr_tba) = newval;
  211. }
  212. /* Get the value of h-tbr_tt. */
  213. UQI
  214. frvbf_h_tbr_tt_get (SIM_CPU *current_cpu)
  215. {
  216. return CPU (h_tbr_tt);
  217. }
  218. /* Set a value for h-tbr_tt. */
  219. void
  220. frvbf_h_tbr_tt_set (SIM_CPU *current_cpu, UQI newval)
  221. {
  222. CPU (h_tbr_tt) = newval;
  223. }
  224. /* Get the value of h-bpsr_bs. */
  225. BI
  226. frvbf_h_bpsr_bs_get (SIM_CPU *current_cpu)
  227. {
  228. return CPU (h_bpsr_bs);
  229. }
  230. /* Set a value for h-bpsr_bs. */
  231. void
  232. frvbf_h_bpsr_bs_set (SIM_CPU *current_cpu, BI newval)
  233. {
  234. CPU (h_bpsr_bs) = newval;
  235. }
  236. /* Get the value of h-bpsr_bet. */
  237. BI
  238. frvbf_h_bpsr_bet_get (SIM_CPU *current_cpu)
  239. {
  240. return CPU (h_bpsr_bet);
  241. }
  242. /* Set a value for h-bpsr_bet. */
  243. void
  244. frvbf_h_bpsr_bet_set (SIM_CPU *current_cpu, BI newval)
  245. {
  246. CPU (h_bpsr_bet) = newval;
  247. }
  248. /* Get the value of h-gr. */
  249. USI
  250. frvbf_h_gr_get (SIM_CPU *current_cpu, UINT regno)
  251. {
  252. return GET_H_GR (regno);
  253. }
  254. /* Set a value for h-gr. */
  255. void
  256. frvbf_h_gr_set (SIM_CPU *current_cpu, UINT regno, USI newval)
  257. {
  258. SET_H_GR (regno, newval);
  259. }
  260. /* Get the value of h-gr_double. */
  261. DI
  262. frvbf_h_gr_double_get (SIM_CPU *current_cpu, UINT regno)
  263. {
  264. return GET_H_GR_DOUBLE (regno);
  265. }
  266. /* Set a value for h-gr_double. */
  267. void
  268. frvbf_h_gr_double_set (SIM_CPU *current_cpu, UINT regno, DI newval)
  269. {
  270. SET_H_GR_DOUBLE (regno, newval);
  271. }
  272. /* Get the value of h-gr_hi. */
  273. UHI
  274. frvbf_h_gr_hi_get (SIM_CPU *current_cpu, UINT regno)
  275. {
  276. return GET_H_GR_HI (regno);
  277. }
  278. /* Set a value for h-gr_hi. */
  279. void
  280. frvbf_h_gr_hi_set (SIM_CPU *current_cpu, UINT regno, UHI newval)
  281. {
  282. SET_H_GR_HI (regno, newval);
  283. }
  284. /* Get the value of h-gr_lo. */
  285. UHI
  286. frvbf_h_gr_lo_get (SIM_CPU *current_cpu, UINT regno)
  287. {
  288. return GET_H_GR_LO (regno);
  289. }
  290. /* Set a value for h-gr_lo. */
  291. void
  292. frvbf_h_gr_lo_set (SIM_CPU *current_cpu, UINT regno, UHI newval)
  293. {
  294. SET_H_GR_LO (regno, newval);
  295. }
  296. /* Get the value of h-fr. */
  297. SF
  298. frvbf_h_fr_get (SIM_CPU *current_cpu, UINT regno)
  299. {
  300. return GET_H_FR (regno);
  301. }
  302. /* Set a value for h-fr. */
  303. void
  304. frvbf_h_fr_set (SIM_CPU *current_cpu, UINT regno, SF newval)
  305. {
  306. SET_H_FR (regno, newval);
  307. }
  308. /* Get the value of h-fr_double. */
  309. DF
  310. frvbf_h_fr_double_get (SIM_CPU *current_cpu, UINT regno)
  311. {
  312. return GET_H_FR_DOUBLE (regno);
  313. }
  314. /* Set a value for h-fr_double. */
  315. void
  316. frvbf_h_fr_double_set (SIM_CPU *current_cpu, UINT regno, DF newval)
  317. {
  318. SET_H_FR_DOUBLE (regno, newval);
  319. }
  320. /* Get the value of h-fr_int. */
  321. USI
  322. frvbf_h_fr_int_get (SIM_CPU *current_cpu, UINT regno)
  323. {
  324. return GET_H_FR_INT (regno);
  325. }
  326. /* Set a value for h-fr_int. */
  327. void
  328. frvbf_h_fr_int_set (SIM_CPU *current_cpu, UINT regno, USI newval)
  329. {
  330. SET_H_FR_INT (regno, newval);
  331. }
  332. /* Get the value of h-fr_hi. */
  333. UHI
  334. frvbf_h_fr_hi_get (SIM_CPU *current_cpu, UINT regno)
  335. {
  336. return GET_H_FR_HI (regno);
  337. }
  338. /* Set a value for h-fr_hi. */
  339. void
  340. frvbf_h_fr_hi_set (SIM_CPU *current_cpu, UINT regno, UHI newval)
  341. {
  342. SET_H_FR_HI (regno, newval);
  343. }
  344. /* Get the value of h-fr_lo. */
  345. UHI
  346. frvbf_h_fr_lo_get (SIM_CPU *current_cpu, UINT regno)
  347. {
  348. return GET_H_FR_LO (regno);
  349. }
  350. /* Set a value for h-fr_lo. */
  351. void
  352. frvbf_h_fr_lo_set (SIM_CPU *current_cpu, UINT regno, UHI newval)
  353. {
  354. SET_H_FR_LO (regno, newval);
  355. }
  356. /* Get the value of h-fr_0. */
  357. UHI
  358. frvbf_h_fr_0_get (SIM_CPU *current_cpu, UINT regno)
  359. {
  360. return GET_H_FR_0 (regno);
  361. }
  362. /* Set a value for h-fr_0. */
  363. void
  364. frvbf_h_fr_0_set (SIM_CPU *current_cpu, UINT regno, UHI newval)
  365. {
  366. SET_H_FR_0 (regno, newval);
  367. }
  368. /* Get the value of h-fr_1. */
  369. UHI
  370. frvbf_h_fr_1_get (SIM_CPU *current_cpu, UINT regno)
  371. {
  372. return GET_H_FR_1 (regno);
  373. }
  374. /* Set a value for h-fr_1. */
  375. void
  376. frvbf_h_fr_1_set (SIM_CPU *current_cpu, UINT regno, UHI newval)
  377. {
  378. SET_H_FR_1 (regno, newval);
  379. }
  380. /* Get the value of h-fr_2. */
  381. UHI
  382. frvbf_h_fr_2_get (SIM_CPU *current_cpu, UINT regno)
  383. {
  384. return GET_H_FR_2 (regno);
  385. }
  386. /* Set a value for h-fr_2. */
  387. void
  388. frvbf_h_fr_2_set (SIM_CPU *current_cpu, UINT regno, UHI newval)
  389. {
  390. SET_H_FR_2 (regno, newval);
  391. }
  392. /* Get the value of h-fr_3. */
  393. UHI
  394. frvbf_h_fr_3_get (SIM_CPU *current_cpu, UINT regno)
  395. {
  396. return GET_H_FR_3 (regno);
  397. }
  398. /* Set a value for h-fr_3. */
  399. void
  400. frvbf_h_fr_3_set (SIM_CPU *current_cpu, UINT regno, UHI newval)
  401. {
  402. SET_H_FR_3 (regno, newval);
  403. }
  404. /* Get the value of h-cpr. */
  405. SI
  406. frvbf_h_cpr_get (SIM_CPU *current_cpu, UINT regno)
  407. {
  408. return CPU (h_cpr[regno]);
  409. }
  410. /* Set a value for h-cpr. */
  411. void
  412. frvbf_h_cpr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
  413. {
  414. CPU (h_cpr[regno]) = newval;
  415. }
  416. /* Get the value of h-cpr_double. */
  417. DI
  418. frvbf_h_cpr_double_get (SIM_CPU *current_cpu, UINT regno)
  419. {
  420. return GET_H_CPR_DOUBLE (regno);
  421. }
  422. /* Set a value for h-cpr_double. */
  423. void
  424. frvbf_h_cpr_double_set (SIM_CPU *current_cpu, UINT regno, DI newval)
  425. {
  426. SET_H_CPR_DOUBLE (regno, newval);
  427. }
  428. /* Get the value of h-spr. */
  429. USI
  430. frvbf_h_spr_get (SIM_CPU *current_cpu, UINT regno)
  431. {
  432. return GET_H_SPR (regno);
  433. }
  434. /* Set a value for h-spr. */
  435. void
  436. frvbf_h_spr_set (SIM_CPU *current_cpu, UINT regno, USI newval)
  437. {
  438. SET_H_SPR (regno, newval);
  439. }
  440. /* Get the value of h-accg. */
  441. USI
  442. frvbf_h_accg_get (SIM_CPU *current_cpu, UINT regno)
  443. {
  444. return GET_H_ACCG (regno);
  445. }
  446. /* Set a value for h-accg. */
  447. void
  448. frvbf_h_accg_set (SIM_CPU *current_cpu, UINT regno, USI newval)
  449. {
  450. SET_H_ACCG (regno, newval);
  451. }
  452. /* Get the value of h-acc40S. */
  453. DI
  454. frvbf_h_acc40S_get (SIM_CPU *current_cpu, UINT regno)
  455. {
  456. return GET_H_ACC40S (regno);
  457. }
  458. /* Set a value for h-acc40S. */
  459. void
  460. frvbf_h_acc40S_set (SIM_CPU *current_cpu, UINT regno, DI newval)
  461. {
  462. SET_H_ACC40S (regno, newval);
  463. }
  464. /* Get the value of h-acc40U. */
  465. UDI
  466. frvbf_h_acc40U_get (SIM_CPU *current_cpu, UINT regno)
  467. {
  468. return GET_H_ACC40U (regno);
  469. }
  470. /* Set a value for h-acc40U. */
  471. void
  472. frvbf_h_acc40U_set (SIM_CPU *current_cpu, UINT regno, UDI newval)
  473. {
  474. SET_H_ACC40U (regno, newval);
  475. }
  476. /* Get the value of h-iacc0. */
  477. DI
  478. frvbf_h_iacc0_get (SIM_CPU *current_cpu, UINT regno)
  479. {
  480. return GET_H_IACC0 (regno);
  481. }
  482. /* Set a value for h-iacc0. */
  483. void
  484. frvbf_h_iacc0_set (SIM_CPU *current_cpu, UINT regno, DI newval)
  485. {
  486. SET_H_IACC0 (regno, newval);
  487. }
  488. /* Get the value of h-iccr. */
  489. UQI
  490. frvbf_h_iccr_get (SIM_CPU *current_cpu, UINT regno)
  491. {
  492. return CPU (h_iccr[regno]);
  493. }
  494. /* Set a value for h-iccr. */
  495. void
  496. frvbf_h_iccr_set (SIM_CPU *current_cpu, UINT regno, UQI newval)
  497. {
  498. CPU (h_iccr[regno]) = newval;
  499. }
  500. /* Get the value of h-fccr. */
  501. UQI
  502. frvbf_h_fccr_get (SIM_CPU *current_cpu, UINT regno)
  503. {
  504. return CPU (h_fccr[regno]);
  505. }
  506. /* Set a value for h-fccr. */
  507. void
  508. frvbf_h_fccr_set (SIM_CPU *current_cpu, UINT regno, UQI newval)
  509. {
  510. CPU (h_fccr[regno]) = newval;
  511. }
  512. /* Get the value of h-cccr. */
  513. UQI
  514. frvbf_h_cccr_get (SIM_CPU *current_cpu, UINT regno)
  515. {
  516. return CPU (h_cccr[regno]);
  517. }
  518. /* Set a value for h-cccr. */
  519. void
  520. frvbf_h_cccr_set (SIM_CPU *current_cpu, UINT regno, UQI newval)
  521. {
  522. CPU (h_cccr[regno]) = newval;
  523. }
  524. /* Record trace results for INSN. */
  525. void
  526. frvbf_record_trace_results (SIM_CPU *current_cpu, CGEN_INSN *insn,
  527. int *indices, TRACE_RECORD *tr)
  528. {
  529. }