cpu.c 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. /* Misc. support for CPU family m32rbf.
  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 m32rbf
  17. #define WANT_CPU_M32RBF
  18. #include "sim-main.h"
  19. #include "cgen-ops.h"
  20. /* Get the value of h-pc. */
  21. USI
  22. m32rbf_h_pc_get (SIM_CPU *current_cpu)
  23. {
  24. return CPU (h_pc);
  25. }
  26. /* Set a value for h-pc. */
  27. void
  28. m32rbf_h_pc_set (SIM_CPU *current_cpu, USI newval)
  29. {
  30. CPU (h_pc) = newval;
  31. }
  32. /* Get the value of h-gr. */
  33. SI
  34. m32rbf_h_gr_get (SIM_CPU *current_cpu, UINT regno)
  35. {
  36. return CPU (h_gr[regno]);
  37. }
  38. /* Set a value for h-gr. */
  39. void
  40. m32rbf_h_gr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
  41. {
  42. CPU (h_gr[regno]) = newval;
  43. }
  44. /* Get the value of h-cr. */
  45. USI
  46. m32rbf_h_cr_get (SIM_CPU *current_cpu, UINT regno)
  47. {
  48. return GET_H_CR (regno);
  49. }
  50. /* Set a value for h-cr. */
  51. void
  52. m32rbf_h_cr_set (SIM_CPU *current_cpu, UINT regno, USI newval)
  53. {
  54. SET_H_CR (regno, newval);
  55. }
  56. /* Get the value of h-accum. */
  57. DI
  58. m32rbf_h_accum_get (SIM_CPU *current_cpu)
  59. {
  60. return GET_H_ACCUM ();
  61. }
  62. /* Set a value for h-accum. */
  63. void
  64. m32rbf_h_accum_set (SIM_CPU *current_cpu, DI newval)
  65. {
  66. SET_H_ACCUM (newval);
  67. }
  68. /* Get the value of h-cond. */
  69. BI
  70. m32rbf_h_cond_get (SIM_CPU *current_cpu)
  71. {
  72. return CPU (h_cond);
  73. }
  74. /* Set a value for h-cond. */
  75. void
  76. m32rbf_h_cond_set (SIM_CPU *current_cpu, BI newval)
  77. {
  78. CPU (h_cond) = newval;
  79. }
  80. /* Get the value of h-psw. */
  81. UQI
  82. m32rbf_h_psw_get (SIM_CPU *current_cpu)
  83. {
  84. return GET_H_PSW ();
  85. }
  86. /* Set a value for h-psw. */
  87. void
  88. m32rbf_h_psw_set (SIM_CPU *current_cpu, UQI newval)
  89. {
  90. SET_H_PSW (newval);
  91. }
  92. /* Get the value of h-bpsw. */
  93. UQI
  94. m32rbf_h_bpsw_get (SIM_CPU *current_cpu)
  95. {
  96. return CPU (h_bpsw);
  97. }
  98. /* Set a value for h-bpsw. */
  99. void
  100. m32rbf_h_bpsw_set (SIM_CPU *current_cpu, UQI newval)
  101. {
  102. CPU (h_bpsw) = newval;
  103. }
  104. /* Get the value of h-bbpsw. */
  105. UQI
  106. m32rbf_h_bbpsw_get (SIM_CPU *current_cpu)
  107. {
  108. return CPU (h_bbpsw);
  109. }
  110. /* Set a value for h-bbpsw. */
  111. void
  112. m32rbf_h_bbpsw_set (SIM_CPU *current_cpu, UQI newval)
  113. {
  114. CPU (h_bbpsw) = newval;
  115. }
  116. /* Get the value of h-lock. */
  117. BI
  118. m32rbf_h_lock_get (SIM_CPU *current_cpu)
  119. {
  120. return CPU (h_lock);
  121. }
  122. /* Set a value for h-lock. */
  123. void
  124. m32rbf_h_lock_set (SIM_CPU *current_cpu, BI newval)
  125. {
  126. CPU (h_lock) = newval;
  127. }