cpuv32.c 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  1. /* Misc. support for CPU family crisv32f.
  2. THIS FILE IS MACHINE GENERATED WITH CGEN.
  3. Copyright 1996-2022 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 crisv32f
  17. #define WANT_CPU_CRISV32F
  18. #include "sim-main.h"
  19. #include "cgen-ops.h"
  20. /* Get the value of h-v32-v32. */
  21. BI
  22. crisv32f_h_v32_v32_get (SIM_CPU *current_cpu)
  23. {
  24. return GET_H_V32_V32 ();
  25. }
  26. /* Set a value for h-v32-v32. */
  27. void
  28. crisv32f_h_v32_v32_set (SIM_CPU *current_cpu, BI newval)
  29. {
  30. SET_H_V32_V32 (newval);
  31. }
  32. /* Get the value of h-pc. */
  33. USI
  34. crisv32f_h_pc_get (SIM_CPU *current_cpu)
  35. {
  36. return CPU (h_pc);
  37. }
  38. /* Set a value for h-pc. */
  39. void
  40. crisv32f_h_pc_set (SIM_CPU *current_cpu, USI newval)
  41. {
  42. SET_H_PC (newval);
  43. }
  44. /* Get the value of h-gr. */
  45. SI
  46. crisv32f_h_gr_get (SIM_CPU *current_cpu, UINT regno)
  47. {
  48. return GET_H_GR (regno);
  49. }
  50. /* Set a value for h-gr. */
  51. void
  52. crisv32f_h_gr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
  53. {
  54. SET_H_GR (regno, newval);
  55. }
  56. /* Get the value of h-gr-acr. */
  57. SI
  58. crisv32f_h_gr_acr_get (SIM_CPU *current_cpu, UINT regno)
  59. {
  60. return CPU (h_gr_acr[regno]);
  61. }
  62. /* Set a value for h-gr-acr. */
  63. void
  64. crisv32f_h_gr_acr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
  65. {
  66. CPU (h_gr_acr[regno]) = newval;
  67. }
  68. /* Get the value of h-raw-gr-acr. */
  69. SI
  70. crisv32f_h_raw_gr_acr_get (SIM_CPU *current_cpu, UINT regno)
  71. {
  72. return GET_H_RAW_GR_ACR (regno);
  73. }
  74. /* Set a value for h-raw-gr-acr. */
  75. void
  76. crisv32f_h_raw_gr_acr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
  77. {
  78. SET_H_RAW_GR_ACR (regno, newval);
  79. }
  80. /* Get the value of h-sr. */
  81. SI
  82. crisv32f_h_sr_get (SIM_CPU *current_cpu, UINT regno)
  83. {
  84. return GET_H_SR (regno);
  85. }
  86. /* Set a value for h-sr. */
  87. void
  88. crisv32f_h_sr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
  89. {
  90. SET_H_SR (regno, newval);
  91. }
  92. /* Get the value of h-sr-v32. */
  93. SI
  94. crisv32f_h_sr_v32_get (SIM_CPU *current_cpu, UINT regno)
  95. {
  96. return GET_H_SR_V32 (regno);
  97. }
  98. /* Set a value for h-sr-v32. */
  99. void
  100. crisv32f_h_sr_v32_set (SIM_CPU *current_cpu, UINT regno, SI newval)
  101. {
  102. SET_H_SR_V32 (regno, newval);
  103. }
  104. /* Get the value of h-supr. */
  105. SI
  106. crisv32f_h_supr_get (SIM_CPU *current_cpu, UINT regno)
  107. {
  108. return GET_H_SUPR (regno);
  109. }
  110. /* Set a value for h-supr. */
  111. void
  112. crisv32f_h_supr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
  113. {
  114. SET_H_SUPR (regno, newval);
  115. }
  116. /* Get the value of h-cbit. */
  117. BI
  118. crisv32f_h_cbit_get (SIM_CPU *current_cpu)
  119. {
  120. return CPU (h_cbit);
  121. }
  122. /* Set a value for h-cbit. */
  123. void
  124. crisv32f_h_cbit_set (SIM_CPU *current_cpu, BI newval)
  125. {
  126. CPU (h_cbit) = newval;
  127. }
  128. /* Get the value of h-cbit-move. */
  129. BI
  130. crisv32f_h_cbit_move_get (SIM_CPU *current_cpu)
  131. {
  132. return GET_H_CBIT_MOVE ();
  133. }
  134. /* Set a value for h-cbit-move. */
  135. void
  136. crisv32f_h_cbit_move_set (SIM_CPU *current_cpu, BI newval)
  137. {
  138. SET_H_CBIT_MOVE (newval);
  139. }
  140. /* Get the value of h-cbit-move-v32. */
  141. BI
  142. crisv32f_h_cbit_move_v32_get (SIM_CPU *current_cpu)
  143. {
  144. return GET_H_CBIT_MOVE_V32 ();
  145. }
  146. /* Set a value for h-cbit-move-v32. */
  147. void
  148. crisv32f_h_cbit_move_v32_set (SIM_CPU *current_cpu, BI newval)
  149. {
  150. SET_H_CBIT_MOVE_V32 (newval);
  151. }
  152. /* Get the value of h-vbit. */
  153. BI
  154. crisv32f_h_vbit_get (SIM_CPU *current_cpu)
  155. {
  156. return CPU (h_vbit);
  157. }
  158. /* Set a value for h-vbit. */
  159. void
  160. crisv32f_h_vbit_set (SIM_CPU *current_cpu, BI newval)
  161. {
  162. CPU (h_vbit) = newval;
  163. }
  164. /* Get the value of h-vbit-move. */
  165. BI
  166. crisv32f_h_vbit_move_get (SIM_CPU *current_cpu)
  167. {
  168. return GET_H_VBIT_MOVE ();
  169. }
  170. /* Set a value for h-vbit-move. */
  171. void
  172. crisv32f_h_vbit_move_set (SIM_CPU *current_cpu, BI newval)
  173. {
  174. SET_H_VBIT_MOVE (newval);
  175. }
  176. /* Get the value of h-vbit-move-v32. */
  177. BI
  178. crisv32f_h_vbit_move_v32_get (SIM_CPU *current_cpu)
  179. {
  180. return GET_H_VBIT_MOVE_V32 ();
  181. }
  182. /* Set a value for h-vbit-move-v32. */
  183. void
  184. crisv32f_h_vbit_move_v32_set (SIM_CPU *current_cpu, BI newval)
  185. {
  186. SET_H_VBIT_MOVE_V32 (newval);
  187. }
  188. /* Get the value of h-zbit. */
  189. BI
  190. crisv32f_h_zbit_get (SIM_CPU *current_cpu)
  191. {
  192. return CPU (h_zbit);
  193. }
  194. /* Set a value for h-zbit. */
  195. void
  196. crisv32f_h_zbit_set (SIM_CPU *current_cpu, BI newval)
  197. {
  198. CPU (h_zbit) = newval;
  199. }
  200. /* Get the value of h-zbit-move. */
  201. BI
  202. crisv32f_h_zbit_move_get (SIM_CPU *current_cpu)
  203. {
  204. return GET_H_ZBIT_MOVE ();
  205. }
  206. /* Set a value for h-zbit-move. */
  207. void
  208. crisv32f_h_zbit_move_set (SIM_CPU *current_cpu, BI newval)
  209. {
  210. SET_H_ZBIT_MOVE (newval);
  211. }
  212. /* Get the value of h-zbit-move-v32. */
  213. BI
  214. crisv32f_h_zbit_move_v32_get (SIM_CPU *current_cpu)
  215. {
  216. return GET_H_ZBIT_MOVE_V32 ();
  217. }
  218. /* Set a value for h-zbit-move-v32. */
  219. void
  220. crisv32f_h_zbit_move_v32_set (SIM_CPU *current_cpu, BI newval)
  221. {
  222. SET_H_ZBIT_MOVE_V32 (newval);
  223. }
  224. /* Get the value of h-nbit. */
  225. BI
  226. crisv32f_h_nbit_get (SIM_CPU *current_cpu)
  227. {
  228. return CPU (h_nbit);
  229. }
  230. /* Set a value for h-nbit. */
  231. void
  232. crisv32f_h_nbit_set (SIM_CPU *current_cpu, BI newval)
  233. {
  234. CPU (h_nbit) = newval;
  235. }
  236. /* Get the value of h-nbit-move. */
  237. BI
  238. crisv32f_h_nbit_move_get (SIM_CPU *current_cpu)
  239. {
  240. return GET_H_NBIT_MOVE ();
  241. }
  242. /* Set a value for h-nbit-move. */
  243. void
  244. crisv32f_h_nbit_move_set (SIM_CPU *current_cpu, BI newval)
  245. {
  246. SET_H_NBIT_MOVE (newval);
  247. }
  248. /* Get the value of h-nbit-move-v32. */
  249. BI
  250. crisv32f_h_nbit_move_v32_get (SIM_CPU *current_cpu)
  251. {
  252. return GET_H_NBIT_MOVE_V32 ();
  253. }
  254. /* Set a value for h-nbit-move-v32. */
  255. void
  256. crisv32f_h_nbit_move_v32_set (SIM_CPU *current_cpu, BI newval)
  257. {
  258. SET_H_NBIT_MOVE_V32 (newval);
  259. }
  260. /* Get the value of h-xbit. */
  261. BI
  262. crisv32f_h_xbit_get (SIM_CPU *current_cpu)
  263. {
  264. return CPU (h_xbit);
  265. }
  266. /* Set a value for h-xbit. */
  267. void
  268. crisv32f_h_xbit_set (SIM_CPU *current_cpu, BI newval)
  269. {
  270. CPU (h_xbit) = newval;
  271. }
  272. /* Get the value of h-ibit. */
  273. BI
  274. crisv32f_h_ibit_get (SIM_CPU *current_cpu)
  275. {
  276. return GET_H_IBIT ();
  277. }
  278. /* Set a value for h-ibit. */
  279. void
  280. crisv32f_h_ibit_set (SIM_CPU *current_cpu, BI newval)
  281. {
  282. SET_H_IBIT (newval);
  283. }
  284. /* Get the value of h-pbit. */
  285. BI
  286. crisv32f_h_pbit_get (SIM_CPU *current_cpu)
  287. {
  288. return CPU (h_pbit);
  289. }
  290. /* Set a value for h-pbit. */
  291. void
  292. crisv32f_h_pbit_set (SIM_CPU *current_cpu, BI newval)
  293. {
  294. CPU (h_pbit) = newval;
  295. }
  296. /* Get the value of h-rbit. */
  297. BI
  298. crisv32f_h_rbit_get (SIM_CPU *current_cpu)
  299. {
  300. return CPU (h_rbit);
  301. }
  302. /* Set a value for h-rbit. */
  303. void
  304. crisv32f_h_rbit_set (SIM_CPU *current_cpu, BI newval)
  305. {
  306. CPU (h_rbit) = newval;
  307. }
  308. /* Get the value of h-ubit. */
  309. BI
  310. crisv32f_h_ubit_get (SIM_CPU *current_cpu)
  311. {
  312. return GET_H_UBIT ();
  313. }
  314. /* Set a value for h-ubit. */
  315. void
  316. crisv32f_h_ubit_set (SIM_CPU *current_cpu, BI newval)
  317. {
  318. SET_H_UBIT (newval);
  319. }
  320. /* Get the value of h-gbit. */
  321. BI
  322. crisv32f_h_gbit_get (SIM_CPU *current_cpu)
  323. {
  324. return CPU (h_gbit);
  325. }
  326. /* Set a value for h-gbit. */
  327. void
  328. crisv32f_h_gbit_set (SIM_CPU *current_cpu, BI newval)
  329. {
  330. CPU (h_gbit) = newval;
  331. }
  332. /* Get the value of h-kernel-sp. */
  333. SI
  334. crisv32f_h_kernel_sp_get (SIM_CPU *current_cpu)
  335. {
  336. return CPU (h_kernel_sp);
  337. }
  338. /* Set a value for h-kernel-sp. */
  339. void
  340. crisv32f_h_kernel_sp_set (SIM_CPU *current_cpu, SI newval)
  341. {
  342. CPU (h_kernel_sp) = newval;
  343. }
  344. /* Get the value of h-ubit-v32. */
  345. BI
  346. crisv32f_h_ubit_v32_get (SIM_CPU *current_cpu)
  347. {
  348. return CPU (h_ubit_v32);
  349. }
  350. /* Set a value for h-ubit-v32. */
  351. void
  352. crisv32f_h_ubit_v32_set (SIM_CPU *current_cpu, BI newval)
  353. {
  354. SET_H_UBIT_V32 (newval);
  355. }
  356. /* Get the value of h-ibit-v32. */
  357. BI
  358. crisv32f_h_ibit_v32_get (SIM_CPU *current_cpu)
  359. {
  360. return CPU (h_ibit_v32);
  361. }
  362. /* Set a value for h-ibit-v32. */
  363. void
  364. crisv32f_h_ibit_v32_set (SIM_CPU *current_cpu, BI newval)
  365. {
  366. SET_H_IBIT_V32 (newval);
  367. }
  368. /* Get the value of h-mbit. */
  369. BI
  370. crisv32f_h_mbit_get (SIM_CPU *current_cpu)
  371. {
  372. return CPU (h_mbit);
  373. }
  374. /* Set a value for h-mbit. */
  375. void
  376. crisv32f_h_mbit_set (SIM_CPU *current_cpu, BI newval)
  377. {
  378. SET_H_MBIT (newval);
  379. }
  380. /* Get the value of h-qbit. */
  381. BI
  382. crisv32f_h_qbit_get (SIM_CPU *current_cpu)
  383. {
  384. return CPU (h_qbit);
  385. }
  386. /* Set a value for h-qbit. */
  387. void
  388. crisv32f_h_qbit_set (SIM_CPU *current_cpu, BI newval)
  389. {
  390. SET_H_QBIT (newval);
  391. }
  392. /* Get the value of h-sbit. */
  393. BI
  394. crisv32f_h_sbit_get (SIM_CPU *current_cpu)
  395. {
  396. return CPU (h_sbit);
  397. }
  398. /* Set a value for h-sbit. */
  399. void
  400. crisv32f_h_sbit_set (SIM_CPU *current_cpu, BI newval)
  401. {
  402. SET_H_SBIT (newval);
  403. }
  404. /* Get the value of h-insn-prefixed-p. */
  405. BI
  406. crisv32f_h_insn_prefixed_p_get (SIM_CPU *current_cpu)
  407. {
  408. return GET_H_INSN_PREFIXED_P ();
  409. }
  410. /* Set a value for h-insn-prefixed-p. */
  411. void
  412. crisv32f_h_insn_prefixed_p_set (SIM_CPU *current_cpu, BI newval)
  413. {
  414. SET_H_INSN_PREFIXED_P (newval);
  415. }
  416. /* Get the value of h-insn-prefixed-p-v32. */
  417. BI
  418. crisv32f_h_insn_prefixed_p_v32_get (SIM_CPU *current_cpu)
  419. {
  420. return GET_H_INSN_PREFIXED_P_V32 ();
  421. }
  422. /* Set a value for h-insn-prefixed-p-v32. */
  423. void
  424. crisv32f_h_insn_prefixed_p_v32_set (SIM_CPU *current_cpu, BI newval)
  425. {
  426. SET_H_INSN_PREFIXED_P_V32 (newval);
  427. }
  428. /* Get the value of h-prefixreg-v32. */
  429. SI
  430. crisv32f_h_prefixreg_v32_get (SIM_CPU *current_cpu)
  431. {
  432. return GET_H_PREFIXREG_V32 ();
  433. }
  434. /* Set a value for h-prefixreg-v32. */
  435. void
  436. crisv32f_h_prefixreg_v32_set (SIM_CPU *current_cpu, SI newval)
  437. {
  438. SET_H_PREFIXREG_V32 (newval);
  439. }