1 /* Misc. support for CPU family sh64.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright (C) 1996, 1997, 1998, 1999, 2000 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)
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.
31 /* Get the value of h-pc. */
34 sh64_h_pc_get (SIM_CPU *current_cpu)
39 /* Set a value for h-pc. */
42 sh64_h_pc_set (SIM_CPU *current_cpu, UDI newval)
47 /* Get the value of h-gr. */
50 sh64_h_gr_get (SIM_CPU *current_cpu, UINT regno)
52 return GET_H_GR (regno);
55 /* Set a value for h-gr. */
58 sh64_h_gr_set (SIM_CPU *current_cpu, UINT regno, DI newval)
60 SET_H_GR (regno, newval);
63 /* Get the value of h-grc. */
66 sh64_h_grc_get (SIM_CPU *current_cpu, UINT regno)
68 return GET_H_GRC (regno);
71 /* Set a value for h-grc. */
74 sh64_h_grc_set (SIM_CPU *current_cpu, UINT regno, SI newval)
76 SET_H_GRC (regno, newval);
79 /* Get the value of h-cr. */
82 sh64_h_cr_get (SIM_CPU *current_cpu, UINT regno)
84 return GET_H_CR (regno);
87 /* Set a value for h-cr. */
90 sh64_h_cr_set (SIM_CPU *current_cpu, UINT regno, DI newval)
92 SET_H_CR (regno, newval);
95 /* Get the value of h-sr. */
98 sh64_h_sr_get (SIM_CPU *current_cpu)
103 /* Set a value for h-sr. */
106 sh64_h_sr_set (SIM_CPU *current_cpu, SI newval)
111 /* Get the value of h-fpscr. */
114 sh64_h_fpscr_get (SIM_CPU *current_cpu)
116 return CPU (h_fpscr);
119 /* Set a value for h-fpscr. */
122 sh64_h_fpscr_set (SIM_CPU *current_cpu, SI newval)
124 CPU (h_fpscr) = newval;
127 /* Get the value of h-frbit. */
130 sh64_h_frbit_get (SIM_CPU *current_cpu)
132 return GET_H_FRBIT ();
135 /* Set a value for h-frbit. */
138 sh64_h_frbit_set (SIM_CPU *current_cpu, BI newval)
140 SET_H_FRBIT (newval);
143 /* Get the value of h-szbit. */
146 sh64_h_szbit_get (SIM_CPU *current_cpu)
148 return GET_H_SZBIT ();
151 /* Set a value for h-szbit. */
154 sh64_h_szbit_set (SIM_CPU *current_cpu, BI newval)
156 SET_H_SZBIT (newval);
159 /* Get the value of h-prbit. */
162 sh64_h_prbit_get (SIM_CPU *current_cpu)
164 return GET_H_PRBIT ();
167 /* Set a value for h-prbit. */
170 sh64_h_prbit_set (SIM_CPU *current_cpu, BI newval)
172 SET_H_PRBIT (newval);
175 /* Get the value of h-sbit. */
178 sh64_h_sbit_get (SIM_CPU *current_cpu)
180 return GET_H_SBIT ();
183 /* Set a value for h-sbit. */
186 sh64_h_sbit_set (SIM_CPU *current_cpu, BI newval)
191 /* Get the value of h-mbit. */
194 sh64_h_mbit_get (SIM_CPU *current_cpu)
196 return GET_H_MBIT ();
199 /* Set a value for h-mbit. */
202 sh64_h_mbit_set (SIM_CPU *current_cpu, BI newval)
207 /* Get the value of h-qbit. */
210 sh64_h_qbit_get (SIM_CPU *current_cpu)
212 return GET_H_QBIT ();
215 /* Set a value for h-qbit. */
218 sh64_h_qbit_set (SIM_CPU *current_cpu, BI newval)
223 /* Get the value of h-fr. */
226 sh64_h_fr_get (SIM_CPU *current_cpu, UINT regno)
228 return CPU (h_fr[regno]);
231 /* Set a value for h-fr. */
234 sh64_h_fr_set (SIM_CPU *current_cpu, UINT regno, SF newval)
236 CPU (h_fr[regno]) = newval;
239 /* Get the value of h-fp. */
242 sh64_h_fp_get (SIM_CPU *current_cpu, UINT regno)
244 return CPU (h_fp[regno]);
247 /* Set a value for h-fp. */
250 sh64_h_fp_set (SIM_CPU *current_cpu, UINT regno, DF newval)
252 CPU (h_fp[regno]) = newval;
255 /* Get the value of h-fv. */
258 sh64_h_fv_get (SIM_CPU *current_cpu, UINT regno)
260 return GET_H_FV (regno);
263 /* Set a value for h-fv. */
266 sh64_h_fv_set (SIM_CPU *current_cpu, UINT regno, SF newval)
268 SET_H_FV (regno, newval);
271 /* Get the value of h-fmtx. */
274 sh64_h_fmtx_get (SIM_CPU *current_cpu, UINT regno)
276 return GET_H_FMTX (regno);
279 /* Set a value for h-fmtx. */
282 sh64_h_fmtx_set (SIM_CPU *current_cpu, UINT regno, SF newval)
284 SET_H_FMTX (regno, newval);
287 /* Get the value of h-dr. */
290 sh64_h_dr_get (SIM_CPU *current_cpu, UINT regno)
292 return GET_H_DR (regno);
295 /* Set a value for h-dr. */
298 sh64_h_dr_set (SIM_CPU *current_cpu, UINT regno, DF newval)
300 SET_H_DR (regno, newval);
303 /* Get the value of h-tr. */
306 sh64_h_tr_get (SIM_CPU *current_cpu, UINT regno)
308 return CPU (h_tr[regno]);
311 /* Set a value for h-tr. */
314 sh64_h_tr_set (SIM_CPU *current_cpu, UINT regno, DI newval)
316 CPU (h_tr[regno]) = newval;
319 /* Get the value of h-endian. */
322 sh64_h_endian_get (SIM_CPU *current_cpu)
324 return GET_H_ENDIAN ();
327 /* Set a value for h-endian. */
330 sh64_h_endian_set (SIM_CPU *current_cpu, BI newval)
332 SET_H_ENDIAN (newval);
335 /* Get the value of h-ism. */
338 sh64_h_ism_get (SIM_CPU *current_cpu)
343 /* Set a value for h-ism. */
346 sh64_h_ism_set (SIM_CPU *current_cpu, BI newval)
351 /* Get the value of h-frc. */
354 sh64_h_frc_get (SIM_CPU *current_cpu, UINT regno)
356 return GET_H_FRC (regno);
359 /* Set a value for h-frc. */
362 sh64_h_frc_set (SIM_CPU *current_cpu, UINT regno, SF newval)
364 SET_H_FRC (regno, newval);
367 /* Get the value of h-drc. */
370 sh64_h_drc_get (SIM_CPU *current_cpu, UINT regno)
372 return GET_H_DRC (regno);
375 /* Set a value for h-drc. */
378 sh64_h_drc_set (SIM_CPU *current_cpu, UINT regno, DF newval)
380 SET_H_DRC (regno, newval);
383 /* Get the value of h-xf. */
386 sh64_h_xf_get (SIM_CPU *current_cpu, UINT regno)
388 return GET_H_XF (regno);
391 /* Set a value for h-xf. */
394 sh64_h_xf_set (SIM_CPU *current_cpu, UINT regno, SF newval)
396 SET_H_XF (regno, newval);
399 /* Get the value of h-xd. */
402 sh64_h_xd_get (SIM_CPU *current_cpu, UINT regno)
404 return GET_H_XD (regno);
407 /* Set a value for h-xd. */
410 sh64_h_xd_set (SIM_CPU *current_cpu, UINT regno, DF newval)
412 SET_H_XD (regno, newval);
415 /* Get the value of h-fvc. */
418 sh64_h_fvc_get (SIM_CPU *current_cpu, UINT regno)
420 return GET_H_FVC (regno);
423 /* Set a value for h-fvc. */
426 sh64_h_fvc_set (SIM_CPU *current_cpu, UINT regno, SF newval)
428 SET_H_FVC (regno, newval);
431 /* Get the value of h-fpccr. */
434 sh64_h_fpccr_get (SIM_CPU *current_cpu)
436 return GET_H_FPCCR ();
439 /* Set a value for h-fpccr. */
442 sh64_h_fpccr_set (SIM_CPU *current_cpu, SI newval)
444 SET_H_FPCCR (newval);
447 /* Get the value of h-gbr. */
450 sh64_h_gbr_get (SIM_CPU *current_cpu)
455 /* Set a value for h-gbr. */
458 sh64_h_gbr_set (SIM_CPU *current_cpu, SI newval)
463 /* Get the value of h-pr. */
466 sh64_h_pr_get (SIM_CPU *current_cpu)
471 /* Set a value for h-pr. */
474 sh64_h_pr_set (SIM_CPU *current_cpu, SI newval)
479 /* Get the value of h-macl. */
482 sh64_h_macl_get (SIM_CPU *current_cpu)
484 return GET_H_MACL ();
487 /* Set a value for h-macl. */
490 sh64_h_macl_set (SIM_CPU *current_cpu, SI newval)
495 /* Get the value of h-mach. */
498 sh64_h_mach_get (SIM_CPU *current_cpu)
500 return GET_H_MACH ();
503 /* Set a value for h-mach. */
506 sh64_h_mach_set (SIM_CPU *current_cpu, SI newval)
511 /* Get the value of h-tbit. */
514 sh64_h_tbit_get (SIM_CPU *current_cpu)
516 return GET_H_TBIT ();
519 /* Set a value for h-tbit. */
522 sh64_h_tbit_set (SIM_CPU *current_cpu, BI newval)
527 /* Record trace results for INSN. */
530 sh64_record_trace_results (SIM_CPU *current_cpu, CGEN_INSN *insn,
531 int *indices, TRACE_RECORD *tr)