Update
[gdb.git] / sim / m32r / cpu.c
blob966b96b054017647d67ccf19b17512d623a6d763
1 /* Misc. support for CPU family m32rbf.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
7 This file is part of the GNU simulators.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
24 #define WANT_CPU m32rbf
25 #define WANT_CPU_M32RBF
27 #include "sim-main.h"
28 #include "cgen-ops.h"
30 /* Get the value of h-pc. */
32 USI
33 m32rbf_h_pc_get (SIM_CPU *current_cpu)
35 return CPU (h_pc);
38 /* Set a value for h-pc. */
40 void
41 m32rbf_h_pc_set (SIM_CPU *current_cpu, USI newval)
43 CPU (h_pc) = newval;
46 /* Get the value of h-gr. */
49 m32rbf_h_gr_get (SIM_CPU *current_cpu, UINT regno)
51 return CPU (h_gr[regno]);
54 /* Set a value for h-gr. */
56 void
57 m32rbf_h_gr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
59 CPU (h_gr[regno]) = newval;
62 /* Get the value of h-cr. */
64 USI
65 m32rbf_h_cr_get (SIM_CPU *current_cpu, UINT regno)
67 return GET_H_CR (regno);
70 /* Set a value for h-cr. */
72 void
73 m32rbf_h_cr_set (SIM_CPU *current_cpu, UINT regno, USI newval)
75 SET_H_CR (regno, newval);
78 /* Get the value of h-accum. */
81 m32rbf_h_accum_get (SIM_CPU *current_cpu)
83 return GET_H_ACCUM ();
86 /* Set a value for h-accum. */
88 void
89 m32rbf_h_accum_set (SIM_CPU *current_cpu, DI newval)
91 SET_H_ACCUM (newval);
94 /* Get the value of h-cond. */
97 m32rbf_h_cond_get (SIM_CPU *current_cpu)
99 return CPU (h_cond);
102 /* Set a value for h-cond. */
104 void
105 m32rbf_h_cond_set (SIM_CPU *current_cpu, BI newval)
107 CPU (h_cond) = newval;
110 /* Get the value of h-psw. */
113 m32rbf_h_psw_get (SIM_CPU *current_cpu)
115 return GET_H_PSW ();
118 /* Set a value for h-psw. */
120 void
121 m32rbf_h_psw_set (SIM_CPU *current_cpu, UQI newval)
123 SET_H_PSW (newval);
126 /* Get the value of h-bpsw. */
129 m32rbf_h_bpsw_get (SIM_CPU *current_cpu)
131 return CPU (h_bpsw);
134 /* Set a value for h-bpsw. */
136 void
137 m32rbf_h_bpsw_set (SIM_CPU *current_cpu, UQI newval)
139 CPU (h_bpsw) = newval;
142 /* Get the value of h-bbpsw. */
145 m32rbf_h_bbpsw_get (SIM_CPU *current_cpu)
147 return CPU (h_bbpsw);
150 /* Set a value for h-bbpsw. */
152 void
153 m32rbf_h_bbpsw_set (SIM_CPU *current_cpu, UQI newval)
155 CPU (h_bbpsw) = newval;
158 /* Get the value of h-lock. */
161 m32rbf_h_lock_get (SIM_CPU *current_cpu)
163 return CPU (h_lock);
166 /* Set a value for h-lock. */
168 void
169 m32rbf_h_lock_set (SIM_CPU *current_cpu, BI newval)
171 CPU (h_lock) = newval;
174 /* Record trace results for INSN. */
176 void
177 m32rbf_record_trace_results (SIM_CPU *current_cpu, CGEN_INSN *insn,
178 int *indices, TRACE_RECORD *tr)