xref: /netbsd-src/external/gpl3/gdb/dist/sim/m32r/cpu.c (revision 05fa08567a80471fd0eb3843a238392874f2577c)
14e98e3e1Schristos /* Misc. support for CPU family m32rbf.
24e98e3e1Schristos 
34e98e3e1Schristos THIS FILE IS MACHINE GENERATED WITH CGEN.
44e98e3e1Schristos 
5*05fa0856Schristos Copyright (C) 1996-2024 Free Software Foundation, Inc.
64e98e3e1Schristos 
74e98e3e1Schristos This file is part of the GNU simulators.
84e98e3e1Schristos 
94e98e3e1Schristos    This file is free software; you can redistribute it and/or modify
104e98e3e1Schristos    it under the terms of the GNU General Public License as published by
114e98e3e1Schristos    the Free Software Foundation; either version 3, or (at your option)
124e98e3e1Schristos    any later version.
134e98e3e1Schristos 
144e98e3e1Schristos    It is distributed in the hope that it will be useful, but WITHOUT
154e98e3e1Schristos    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
164e98e3e1Schristos    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
174e98e3e1Schristos    License for more details.
184e98e3e1Schristos 
194e98e3e1Schristos    You should have received a copy of the GNU General Public License along
20*05fa0856Schristos    with this program; if not, write to the Free Software Foundation, Inc.,
21*05fa0856Schristos    51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
224e98e3e1Schristos 
234e98e3e1Schristos */
244e98e3e1Schristos 
254e98e3e1Schristos #define WANT_CPU m32rbf
264e98e3e1Schristos #define WANT_CPU_M32RBF
274e98e3e1Schristos 
284e98e3e1Schristos #include "sim-main.h"
294e98e3e1Schristos #include "cgen-ops.h"
304e98e3e1Schristos 
314e98e3e1Schristos /* Get the value of h-pc.  */
324e98e3e1Schristos 
334e98e3e1Schristos USI
344e98e3e1Schristos m32rbf_h_pc_get (SIM_CPU *current_cpu)
354e98e3e1Schristos {
364e98e3e1Schristos   return CPU (h_pc);
374e98e3e1Schristos }
384e98e3e1Schristos 
394e98e3e1Schristos /* Set a value for h-pc.  */
404e98e3e1Schristos 
414e98e3e1Schristos void
424e98e3e1Schristos m32rbf_h_pc_set (SIM_CPU *current_cpu, USI newval)
434e98e3e1Schristos {
444e98e3e1Schristos   CPU (h_pc) = newval;
454e98e3e1Schristos }
464e98e3e1Schristos 
474e98e3e1Schristos /* Get the value of h-gr.  */
484e98e3e1Schristos 
494e98e3e1Schristos SI
504e98e3e1Schristos m32rbf_h_gr_get (SIM_CPU *current_cpu, UINT regno)
514e98e3e1Schristos {
524e98e3e1Schristos   return CPU (h_gr[regno]);
534e98e3e1Schristos }
544e98e3e1Schristos 
554e98e3e1Schristos /* Set a value for h-gr.  */
564e98e3e1Schristos 
574e98e3e1Schristos void
584e98e3e1Schristos m32rbf_h_gr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
594e98e3e1Schristos {
604e98e3e1Schristos   CPU (h_gr[regno]) = newval;
614e98e3e1Schristos }
624e98e3e1Schristos 
634e98e3e1Schristos /* Get the value of h-cr.  */
644e98e3e1Schristos 
654e98e3e1Schristos USI
664e98e3e1Schristos m32rbf_h_cr_get (SIM_CPU *current_cpu, UINT regno)
674e98e3e1Schristos {
684e98e3e1Schristos   return GET_H_CR (regno);
694e98e3e1Schristos }
704e98e3e1Schristos 
714e98e3e1Schristos /* Set a value for h-cr.  */
724e98e3e1Schristos 
734e98e3e1Schristos void
744e98e3e1Schristos m32rbf_h_cr_set (SIM_CPU *current_cpu, UINT regno, USI newval)
754e98e3e1Schristos {
764e98e3e1Schristos   SET_H_CR (regno, newval);
774e98e3e1Schristos }
784e98e3e1Schristos 
794e98e3e1Schristos /* Get the value of h-accum.  */
804e98e3e1Schristos 
814e98e3e1Schristos DI
824e98e3e1Schristos m32rbf_h_accum_get (SIM_CPU *current_cpu)
834e98e3e1Schristos {
844e98e3e1Schristos   return GET_H_ACCUM ();
854e98e3e1Schristos }
864e98e3e1Schristos 
874e98e3e1Schristos /* Set a value for h-accum.  */
884e98e3e1Schristos 
894e98e3e1Schristos void
904e98e3e1Schristos m32rbf_h_accum_set (SIM_CPU *current_cpu, DI newval)
914e98e3e1Schristos {
924e98e3e1Schristos   SET_H_ACCUM (newval);
934e98e3e1Schristos }
944e98e3e1Schristos 
954e98e3e1Schristos /* Get the value of h-cond.  */
964e98e3e1Schristos 
974e98e3e1Schristos BI
984e98e3e1Schristos m32rbf_h_cond_get (SIM_CPU *current_cpu)
994e98e3e1Schristos {
1004e98e3e1Schristos   return CPU (h_cond);
1014e98e3e1Schristos }
1024e98e3e1Schristos 
1034e98e3e1Schristos /* Set a value for h-cond.  */
1044e98e3e1Schristos 
1054e98e3e1Schristos void
1064e98e3e1Schristos m32rbf_h_cond_set (SIM_CPU *current_cpu, BI newval)
1074e98e3e1Schristos {
1084e98e3e1Schristos   CPU (h_cond) = newval;
1094e98e3e1Schristos }
1104e98e3e1Schristos 
1114e98e3e1Schristos /* Get the value of h-psw.  */
1124e98e3e1Schristos 
1134e98e3e1Schristos UQI
1144e98e3e1Schristos m32rbf_h_psw_get (SIM_CPU *current_cpu)
1154e98e3e1Schristos {
1164e98e3e1Schristos   return GET_H_PSW ();
1174e98e3e1Schristos }
1184e98e3e1Schristos 
1194e98e3e1Schristos /* Set a value for h-psw.  */
1204e98e3e1Schristos 
1214e98e3e1Schristos void
1224e98e3e1Schristos m32rbf_h_psw_set (SIM_CPU *current_cpu, UQI newval)
1234e98e3e1Schristos {
1244e98e3e1Schristos   SET_H_PSW (newval);
1254e98e3e1Schristos }
1264e98e3e1Schristos 
1274e98e3e1Schristos /* Get the value of h-bpsw.  */
1284e98e3e1Schristos 
1294e98e3e1Schristos UQI
1304e98e3e1Schristos m32rbf_h_bpsw_get (SIM_CPU *current_cpu)
1314e98e3e1Schristos {
1324e98e3e1Schristos   return CPU (h_bpsw);
1334e98e3e1Schristos }
1344e98e3e1Schristos 
1354e98e3e1Schristos /* Set a value for h-bpsw.  */
1364e98e3e1Schristos 
1374e98e3e1Schristos void
1384e98e3e1Schristos m32rbf_h_bpsw_set (SIM_CPU *current_cpu, UQI newval)
1394e98e3e1Schristos {
1404e98e3e1Schristos   CPU (h_bpsw) = newval;
1414e98e3e1Schristos }
1424e98e3e1Schristos 
1434e98e3e1Schristos /* Get the value of h-bbpsw.  */
1444e98e3e1Schristos 
1454e98e3e1Schristos UQI
1464e98e3e1Schristos m32rbf_h_bbpsw_get (SIM_CPU *current_cpu)
1474e98e3e1Schristos {
1484e98e3e1Schristos   return CPU (h_bbpsw);
1494e98e3e1Schristos }
1504e98e3e1Schristos 
1514e98e3e1Schristos /* Set a value for h-bbpsw.  */
1524e98e3e1Schristos 
1534e98e3e1Schristos void
1544e98e3e1Schristos m32rbf_h_bbpsw_set (SIM_CPU *current_cpu, UQI newval)
1554e98e3e1Schristos {
1564e98e3e1Schristos   CPU (h_bbpsw) = newval;
1574e98e3e1Schristos }
1584e98e3e1Schristos 
1594e98e3e1Schristos /* Get the value of h-lock.  */
1604e98e3e1Schristos 
1614e98e3e1Schristos BI
1624e98e3e1Schristos m32rbf_h_lock_get (SIM_CPU *current_cpu)
1634e98e3e1Schristos {
1644e98e3e1Schristos   return CPU (h_lock);
1654e98e3e1Schristos }
1664e98e3e1Schristos 
1674e98e3e1Schristos /* Set a value for h-lock.  */
1684e98e3e1Schristos 
1694e98e3e1Schristos void
1704e98e3e1Schristos m32rbf_h_lock_set (SIM_CPU *current_cpu, BI newval)
1714e98e3e1Schristos {
1724e98e3e1Schristos   CPU (h_lock) = newval;
1734e98e3e1Schristos }
174