1 /* Misc. support for CPU family crisv32f.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright 1996-2010, 2012 Free Software Foundation, Inc.
7 This file is part of the GNU simulators.
9 This file 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, or (at your option)
14 It is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
17 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 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
25 #define WANT_CPU crisv32f
26 #define WANT_CPU_CRISV32F
31 /* Get the value of h-v32-v32. */
34 crisv32f_h_v32_v32_get (SIM_CPU *current_cpu)
36 return GET_H_V32_V32 ();
39 /* Set a value for h-v32-v32. */
42 crisv32f_h_v32_v32_set (SIM_CPU *current_cpu, BI newval)
44 SET_H_V32_V32 (newval);
47 /* Get the value of h-pc. */
50 crisv32f_h_pc_get (SIM_CPU *current_cpu)
55 /* Set a value for h-pc. */
58 crisv32f_h_pc_set (SIM_CPU *current_cpu, USI newval)
63 /* Get the value of h-gr. */
66 crisv32f_h_gr_get (SIM_CPU *current_cpu, UINT regno)
68 return GET_H_GR (regno);
71 /* Set a value for h-gr. */
74 crisv32f_h_gr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
76 SET_H_GR (regno, newval);
79 /* Get the value of h-gr-acr. */
82 crisv32f_h_gr_acr_get (SIM_CPU *current_cpu, UINT regno)
84 return CPU (h_gr_acr[regno]);
87 /* Set a value for h-gr-acr. */
90 crisv32f_h_gr_acr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
92 CPU (h_gr_acr[regno]) = newval;
95 /* Get the value of h-raw-gr-acr. */
98 crisv32f_h_raw_gr_acr_get (SIM_CPU *current_cpu, UINT regno)
100 return GET_H_RAW_GR_ACR (regno);
103 /* Set a value for h-raw-gr-acr. */
106 crisv32f_h_raw_gr_acr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
108 SET_H_RAW_GR_ACR (regno, newval);
111 /* Get the value of h-sr. */
114 crisv32f_h_sr_get (SIM_CPU *current_cpu, UINT regno)
116 return GET_H_SR (regno);
119 /* Set a value for h-sr. */
122 crisv32f_h_sr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
124 SET_H_SR (regno, newval);
127 /* Get the value of h-sr-v32. */
130 crisv32f_h_sr_v32_get (SIM_CPU *current_cpu, UINT regno)
132 return GET_H_SR_V32 (regno);
135 /* Set a value for h-sr-v32. */
138 crisv32f_h_sr_v32_set (SIM_CPU *current_cpu, UINT regno, SI newval)
140 SET_H_SR_V32 (regno, newval);
143 /* Get the value of h-supr. */
146 crisv32f_h_supr_get (SIM_CPU *current_cpu, UINT regno)
148 return GET_H_SUPR (regno);
151 /* Set a value for h-supr. */
154 crisv32f_h_supr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
156 SET_H_SUPR (regno, newval);
159 /* Get the value of h-cbit. */
162 crisv32f_h_cbit_get (SIM_CPU *current_cpu)
167 /* Set a value for h-cbit. */
170 crisv32f_h_cbit_set (SIM_CPU *current_cpu, BI newval)
172 CPU (h_cbit) = newval;
175 /* Get the value of h-cbit-move. */
178 crisv32f_h_cbit_move_get (SIM_CPU *current_cpu)
180 return GET_H_CBIT_MOVE ();
183 /* Set a value for h-cbit-move. */
186 crisv32f_h_cbit_move_set (SIM_CPU *current_cpu, BI newval)
188 SET_H_CBIT_MOVE (newval);
191 /* Get the value of h-cbit-move-v32. */
194 crisv32f_h_cbit_move_v32_get (SIM_CPU *current_cpu)
196 return GET_H_CBIT_MOVE_V32 ();
199 /* Set a value for h-cbit-move-v32. */
202 crisv32f_h_cbit_move_v32_set (SIM_CPU *current_cpu, BI newval)
204 SET_H_CBIT_MOVE_V32 (newval);
207 /* Get the value of h-vbit. */
210 crisv32f_h_vbit_get (SIM_CPU *current_cpu)
215 /* Set a value for h-vbit. */
218 crisv32f_h_vbit_set (SIM_CPU *current_cpu, BI newval)
220 CPU (h_vbit) = newval;
223 /* Get the value of h-vbit-move. */
226 crisv32f_h_vbit_move_get (SIM_CPU *current_cpu)
228 return GET_H_VBIT_MOVE ();
231 /* Set a value for h-vbit-move. */
234 crisv32f_h_vbit_move_set (SIM_CPU *current_cpu, BI newval)
236 SET_H_VBIT_MOVE (newval);
239 /* Get the value of h-vbit-move-v32. */
242 crisv32f_h_vbit_move_v32_get (SIM_CPU *current_cpu)
244 return GET_H_VBIT_MOVE_V32 ();
247 /* Set a value for h-vbit-move-v32. */
250 crisv32f_h_vbit_move_v32_set (SIM_CPU *current_cpu, BI newval)
252 SET_H_VBIT_MOVE_V32 (newval);
255 /* Get the value of h-zbit. */
258 crisv32f_h_zbit_get (SIM_CPU *current_cpu)
263 /* Set a value for h-zbit. */
266 crisv32f_h_zbit_set (SIM_CPU *current_cpu, BI newval)
268 CPU (h_zbit) = newval;
271 /* Get the value of h-zbit-move. */
274 crisv32f_h_zbit_move_get (SIM_CPU *current_cpu)
276 return GET_H_ZBIT_MOVE ();
279 /* Set a value for h-zbit-move. */
282 crisv32f_h_zbit_move_set (SIM_CPU *current_cpu, BI newval)
284 SET_H_ZBIT_MOVE (newval);
287 /* Get the value of h-zbit-move-v32. */
290 crisv32f_h_zbit_move_v32_get (SIM_CPU *current_cpu)
292 return GET_H_ZBIT_MOVE_V32 ();
295 /* Set a value for h-zbit-move-v32. */
298 crisv32f_h_zbit_move_v32_set (SIM_CPU *current_cpu, BI newval)
300 SET_H_ZBIT_MOVE_V32 (newval);
303 /* Get the value of h-nbit. */
306 crisv32f_h_nbit_get (SIM_CPU *current_cpu)
311 /* Set a value for h-nbit. */
314 crisv32f_h_nbit_set (SIM_CPU *current_cpu, BI newval)
316 CPU (h_nbit) = newval;
319 /* Get the value of h-nbit-move. */
322 crisv32f_h_nbit_move_get (SIM_CPU *current_cpu)
324 return GET_H_NBIT_MOVE ();
327 /* Set a value for h-nbit-move. */
330 crisv32f_h_nbit_move_set (SIM_CPU *current_cpu, BI newval)
332 SET_H_NBIT_MOVE (newval);
335 /* Get the value of h-nbit-move-v32. */
338 crisv32f_h_nbit_move_v32_get (SIM_CPU *current_cpu)
340 return GET_H_NBIT_MOVE_V32 ();
343 /* Set a value for h-nbit-move-v32. */
346 crisv32f_h_nbit_move_v32_set (SIM_CPU *current_cpu, BI newval)
348 SET_H_NBIT_MOVE_V32 (newval);
351 /* Get the value of h-xbit. */
354 crisv32f_h_xbit_get (SIM_CPU *current_cpu)
359 /* Set a value for h-xbit. */
362 crisv32f_h_xbit_set (SIM_CPU *current_cpu, BI newval)
364 CPU (h_xbit) = newval;
367 /* Get the value of h-ibit. */
370 crisv32f_h_ibit_get (SIM_CPU *current_cpu)
372 return GET_H_IBIT ();
375 /* Set a value for h-ibit. */
378 crisv32f_h_ibit_set (SIM_CPU *current_cpu, BI newval)
383 /* Get the value of h-pbit. */
386 crisv32f_h_pbit_get (SIM_CPU *current_cpu)
391 /* Set a value for h-pbit. */
394 crisv32f_h_pbit_set (SIM_CPU *current_cpu, BI newval)
396 CPU (h_pbit) = newval;
399 /* Get the value of h-rbit. */
402 crisv32f_h_rbit_get (SIM_CPU *current_cpu)
407 /* Set a value for h-rbit. */
410 crisv32f_h_rbit_set (SIM_CPU *current_cpu, BI newval)
412 CPU (h_rbit) = newval;
415 /* Get the value of h-ubit. */
418 crisv32f_h_ubit_get (SIM_CPU *current_cpu)
420 return GET_H_UBIT ();
423 /* Set a value for h-ubit. */
426 crisv32f_h_ubit_set (SIM_CPU *current_cpu, BI newval)
431 /* Get the value of h-gbit. */
434 crisv32f_h_gbit_get (SIM_CPU *current_cpu)
439 /* Set a value for h-gbit. */
442 crisv32f_h_gbit_set (SIM_CPU *current_cpu, BI newval)
444 CPU (h_gbit) = newval;
447 /* Get the value of h-kernel-sp. */
450 crisv32f_h_kernel_sp_get (SIM_CPU *current_cpu)
452 return CPU (h_kernel_sp);
455 /* Set a value for h-kernel-sp. */
458 crisv32f_h_kernel_sp_set (SIM_CPU *current_cpu, SI newval)
460 CPU (h_kernel_sp) = newval;
463 /* Get the value of h-ubit-v32. */
466 crisv32f_h_ubit_v32_get (SIM_CPU *current_cpu)
468 return CPU (h_ubit_v32);
471 /* Set a value for h-ubit-v32. */
474 crisv32f_h_ubit_v32_set (SIM_CPU *current_cpu, BI newval)
476 SET_H_UBIT_V32 (newval);
479 /* Get the value of h-ibit-v32. */
482 crisv32f_h_ibit_v32_get (SIM_CPU *current_cpu)
484 return CPU (h_ibit_v32);
487 /* Set a value for h-ibit-v32. */
490 crisv32f_h_ibit_v32_set (SIM_CPU *current_cpu, BI newval)
492 SET_H_IBIT_V32 (newval);
495 /* Get the value of h-mbit. */
498 crisv32f_h_mbit_get (SIM_CPU *current_cpu)
503 /* Set a value for h-mbit. */
506 crisv32f_h_mbit_set (SIM_CPU *current_cpu, BI newval)
511 /* Get the value of h-qbit. */
514 crisv32f_h_qbit_get (SIM_CPU *current_cpu)
519 /* Set a value for h-qbit. */
522 crisv32f_h_qbit_set (SIM_CPU *current_cpu, BI newval)
527 /* Get the value of h-sbit. */
530 crisv32f_h_sbit_get (SIM_CPU *current_cpu)
535 /* Set a value for h-sbit. */
538 crisv32f_h_sbit_set (SIM_CPU *current_cpu, BI newval)
543 /* Get the value of h-insn-prefixed-p. */
546 crisv32f_h_insn_prefixed_p_get (SIM_CPU *current_cpu)
548 return GET_H_INSN_PREFIXED_P ();
551 /* Set a value for h-insn-prefixed-p. */
554 crisv32f_h_insn_prefixed_p_set (SIM_CPU *current_cpu, BI newval)
556 SET_H_INSN_PREFIXED_P (newval);
559 /* Get the value of h-insn-prefixed-p-v32. */
562 crisv32f_h_insn_prefixed_p_v32_get (SIM_CPU *current_cpu)
564 return GET_H_INSN_PREFIXED_P_V32 ();
567 /* Set a value for h-insn-prefixed-p-v32. */
570 crisv32f_h_insn_prefixed_p_v32_set (SIM_CPU *current_cpu, BI newval)
572 SET_H_INSN_PREFIXED_P_V32 (newval);
575 /* Get the value of h-prefixreg-v32. */
578 crisv32f_h_prefixreg_v32_get (SIM_CPU *current_cpu)
580 return GET_H_PREFIXREG_V32 ();
583 /* Set a value for h-prefixreg-v32. */
586 crisv32f_h_prefixreg_v32_set (SIM_CPU *current_cpu, SI newval)
588 SET_H_PREFIXREG_V32 (newval);
591 /* Record trace results for INSN. */
594 crisv32f_record_trace_results (SIM_CPU *current_cpu, CGEN_INSN *insn,
595 int *indices, TRACE_RECORD *tr)