* build fix
[binutils-gdb.git] / sim / fr30 / cpu.c
blobfb94688c623d2f72b78326c3d463779045d33318
1 /* Misc. support for CPU family fr30bf.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright (C) 1996, 1997, 1998, 1999 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 2, or (at your option)
12 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 along
20 with this program; if not, write to the Free Software Foundation, Inc.,
21 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 #define WANT_CPU fr30bf
26 #define WANT_CPU_FR30BF
28 #include "sim-main.h"
29 #include "cgen-ops.h"
31 /* Get the value of h-pc. */
33 USI
34 fr30bf_h_pc_get (SIM_CPU *current_cpu)
36 return CPU (h_pc);
39 /* Set a value for h-pc. */
41 void
42 fr30bf_h_pc_set (SIM_CPU *current_cpu, USI newval)
44 CPU (h_pc) = newval;
47 /* Get the value of h-gr. */
50 fr30bf_h_gr_get (SIM_CPU *current_cpu, UINT regno)
52 return CPU (h_gr[regno]);
55 /* Set a value for h-gr. */
57 void
58 fr30bf_h_gr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
60 CPU (h_gr[regno]) = newval;
63 /* Get the value of h-cr. */
66 fr30bf_h_cr_get (SIM_CPU *current_cpu, UINT regno)
68 return CPU (h_cr[regno]);
71 /* Set a value for h-cr. */
73 void
74 fr30bf_h_cr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
76 CPU (h_cr[regno]) = newval;
79 /* Get the value of h-dr. */
82 fr30bf_h_dr_get (SIM_CPU *current_cpu, UINT regno)
84 return GET_H_DR (regno);
87 /* Set a value for h-dr. */
89 void
90 fr30bf_h_dr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
92 SET_H_DR (regno, newval);
95 /* Get the value of h-ps. */
97 USI
98 fr30bf_h_ps_get (SIM_CPU *current_cpu)
100 return GET_H_PS ();
103 /* Set a value for h-ps. */
105 void
106 fr30bf_h_ps_set (SIM_CPU *current_cpu, USI newval)
108 SET_H_PS (newval);
111 /* Get the value of h-r13. */
114 fr30bf_h_r13_get (SIM_CPU *current_cpu)
116 return CPU (h_r13);
119 /* Set a value for h-r13. */
121 void
122 fr30bf_h_r13_set (SIM_CPU *current_cpu, SI newval)
124 CPU (h_r13) = newval;
127 /* Get the value of h-r14. */
130 fr30bf_h_r14_get (SIM_CPU *current_cpu)
132 return CPU (h_r14);
135 /* Set a value for h-r14. */
137 void
138 fr30bf_h_r14_set (SIM_CPU *current_cpu, SI newval)
140 CPU (h_r14) = newval;
143 /* Get the value of h-r15. */
146 fr30bf_h_r15_get (SIM_CPU *current_cpu)
148 return CPU (h_r15);
151 /* Set a value for h-r15. */
153 void
154 fr30bf_h_r15_set (SIM_CPU *current_cpu, SI newval)
156 CPU (h_r15) = newval;
159 /* Get the value of h-nbit. */
162 fr30bf_h_nbit_get (SIM_CPU *current_cpu)
164 return CPU (h_nbit);
167 /* Set a value for h-nbit. */
169 void
170 fr30bf_h_nbit_set (SIM_CPU *current_cpu, BI newval)
172 CPU (h_nbit) = newval;
175 /* Get the value of h-zbit. */
178 fr30bf_h_zbit_get (SIM_CPU *current_cpu)
180 return CPU (h_zbit);
183 /* Set a value for h-zbit. */
185 void
186 fr30bf_h_zbit_set (SIM_CPU *current_cpu, BI newval)
188 CPU (h_zbit) = newval;
191 /* Get the value of h-vbit. */
194 fr30bf_h_vbit_get (SIM_CPU *current_cpu)
196 return CPU (h_vbit);
199 /* Set a value for h-vbit. */
201 void
202 fr30bf_h_vbit_set (SIM_CPU *current_cpu, BI newval)
204 CPU (h_vbit) = newval;
207 /* Get the value of h-cbit. */
210 fr30bf_h_cbit_get (SIM_CPU *current_cpu)
212 return CPU (h_cbit);
215 /* Set a value for h-cbit. */
217 void
218 fr30bf_h_cbit_set (SIM_CPU *current_cpu, BI newval)
220 CPU (h_cbit) = newval;
223 /* Get the value of h-ibit. */
226 fr30bf_h_ibit_get (SIM_CPU *current_cpu)
228 return CPU (h_ibit);
231 /* Set a value for h-ibit. */
233 void
234 fr30bf_h_ibit_set (SIM_CPU *current_cpu, BI newval)
236 CPU (h_ibit) = newval;
239 /* Get the value of h-sbit. */
242 fr30bf_h_sbit_get (SIM_CPU *current_cpu)
244 return GET_H_SBIT ();
247 /* Set a value for h-sbit. */
249 void
250 fr30bf_h_sbit_set (SIM_CPU *current_cpu, BI newval)
252 SET_H_SBIT (newval);
255 /* Get the value of h-tbit. */
258 fr30bf_h_tbit_get (SIM_CPU *current_cpu)
260 return CPU (h_tbit);
263 /* Set a value for h-tbit. */
265 void
266 fr30bf_h_tbit_set (SIM_CPU *current_cpu, BI newval)
268 CPU (h_tbit) = newval;
271 /* Get the value of h-d0bit. */
274 fr30bf_h_d0bit_get (SIM_CPU *current_cpu)
276 return CPU (h_d0bit);
279 /* Set a value for h-d0bit. */
281 void
282 fr30bf_h_d0bit_set (SIM_CPU *current_cpu, BI newval)
284 CPU (h_d0bit) = newval;
287 /* Get the value of h-d1bit. */
290 fr30bf_h_d1bit_get (SIM_CPU *current_cpu)
292 return CPU (h_d1bit);
295 /* Set a value for h-d1bit. */
297 void
298 fr30bf_h_d1bit_set (SIM_CPU *current_cpu, BI newval)
300 CPU (h_d1bit) = newval;
303 /* Get the value of h-ccr. */
306 fr30bf_h_ccr_get (SIM_CPU *current_cpu)
308 return GET_H_CCR ();
311 /* Set a value for h-ccr. */
313 void
314 fr30bf_h_ccr_set (SIM_CPU *current_cpu, UQI newval)
316 SET_H_CCR (newval);
319 /* Get the value of h-scr. */
322 fr30bf_h_scr_get (SIM_CPU *current_cpu)
324 return GET_H_SCR ();
327 /* Set a value for h-scr. */
329 void
330 fr30bf_h_scr_set (SIM_CPU *current_cpu, UQI newval)
332 SET_H_SCR (newval);
335 /* Get the value of h-ilm. */
338 fr30bf_h_ilm_get (SIM_CPU *current_cpu)
340 return GET_H_ILM ();
343 /* Set a value for h-ilm. */
345 void
346 fr30bf_h_ilm_set (SIM_CPU *current_cpu, UQI newval)
348 SET_H_ILM (newval);
351 /* Record trace results for INSN. */
353 void
354 fr30bf_record_trace_results (SIM_CPU *current_cpu, CGEN_INSN *insn,
355 int *indices, TRACE_RECORD *tr)