1 /* Misc. support for CPU family crisv32f.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright 1996-2015 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, see <http://www.gnu.org/licenses/>.
24 #define WANT_CPU crisv32f
25 #define WANT_CPU_CRISV32F
30 /* Get the value of h-v32-v32. */
33 crisv32f_h_v32_v32_get (SIM_CPU *current_cpu)
35 return GET_H_V32_V32 ();
38 /* Set a value for h-v32-v32. */
41 crisv32f_h_v32_v32_set (SIM_CPU *current_cpu, BI newval)
43 SET_H_V32_V32 (newval);
46 /* Get the value of h-pc. */
49 crisv32f_h_pc_get (SIM_CPU *current_cpu)
54 /* Set a value for h-pc. */
57 crisv32f_h_pc_set (SIM_CPU *current_cpu, USI newval)
62 /* Get the value of h-gr. */
65 crisv32f_h_gr_get (SIM_CPU *current_cpu, UINT regno)
67 return GET_H_GR (regno);
70 /* Set a value for h-gr. */
73 crisv32f_h_gr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
75 SET_H_GR (regno, newval);
78 /* Get the value of h-gr-acr. */
81 crisv32f_h_gr_acr_get (SIM_CPU *current_cpu, UINT regno)
83 return CPU (h_gr_acr[regno]);
86 /* Set a value for h-gr-acr. */
89 crisv32f_h_gr_acr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
91 CPU (h_gr_acr[regno]) = newval;
94 /* Get the value of h-raw-gr-acr. */
97 crisv32f_h_raw_gr_acr_get (SIM_CPU *current_cpu, UINT regno)
99 return GET_H_RAW_GR_ACR (regno);
102 /* Set a value for h-raw-gr-acr. */
105 crisv32f_h_raw_gr_acr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
107 SET_H_RAW_GR_ACR (regno, newval);
110 /* Get the value of h-sr. */
113 crisv32f_h_sr_get (SIM_CPU *current_cpu, UINT regno)
115 return GET_H_SR (regno);
118 /* Set a value for h-sr. */
121 crisv32f_h_sr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
123 SET_H_SR (regno, newval);
126 /* Get the value of h-sr-v32. */
129 crisv32f_h_sr_v32_get (SIM_CPU *current_cpu, UINT regno)
131 return GET_H_SR_V32 (regno);
134 /* Set a value for h-sr-v32. */
137 crisv32f_h_sr_v32_set (SIM_CPU *current_cpu, UINT regno, SI newval)
139 SET_H_SR_V32 (regno, newval);
142 /* Get the value of h-supr. */
145 crisv32f_h_supr_get (SIM_CPU *current_cpu, UINT regno)
147 return GET_H_SUPR (regno);
150 /* Set a value for h-supr. */
153 crisv32f_h_supr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
155 SET_H_SUPR (regno, newval);
158 /* Get the value of h-cbit. */
161 crisv32f_h_cbit_get (SIM_CPU *current_cpu)
166 /* Set a value for h-cbit. */
169 crisv32f_h_cbit_set (SIM_CPU *current_cpu, BI newval)
171 CPU (h_cbit) = newval;
174 /* Get the value of h-cbit-move. */
177 crisv32f_h_cbit_move_get (SIM_CPU *current_cpu)
179 return GET_H_CBIT_MOVE ();
182 /* Set a value for h-cbit-move. */
185 crisv32f_h_cbit_move_set (SIM_CPU *current_cpu, BI newval)
187 SET_H_CBIT_MOVE (newval);
190 /* Get the value of h-cbit-move-v32. */
193 crisv32f_h_cbit_move_v32_get (SIM_CPU *current_cpu)
195 return GET_H_CBIT_MOVE_V32 ();
198 /* Set a value for h-cbit-move-v32. */
201 crisv32f_h_cbit_move_v32_set (SIM_CPU *current_cpu, BI newval)
203 SET_H_CBIT_MOVE_V32 (newval);
206 /* Get the value of h-vbit. */
209 crisv32f_h_vbit_get (SIM_CPU *current_cpu)
214 /* Set a value for h-vbit. */
217 crisv32f_h_vbit_set (SIM_CPU *current_cpu, BI newval)
219 CPU (h_vbit) = newval;
222 /* Get the value of h-vbit-move. */
225 crisv32f_h_vbit_move_get (SIM_CPU *current_cpu)
227 return GET_H_VBIT_MOVE ();
230 /* Set a value for h-vbit-move. */
233 crisv32f_h_vbit_move_set (SIM_CPU *current_cpu, BI newval)
235 SET_H_VBIT_MOVE (newval);
238 /* Get the value of h-vbit-move-v32. */
241 crisv32f_h_vbit_move_v32_get (SIM_CPU *current_cpu)
243 return GET_H_VBIT_MOVE_V32 ();
246 /* Set a value for h-vbit-move-v32. */
249 crisv32f_h_vbit_move_v32_set (SIM_CPU *current_cpu, BI newval)
251 SET_H_VBIT_MOVE_V32 (newval);
254 /* Get the value of h-zbit. */
257 crisv32f_h_zbit_get (SIM_CPU *current_cpu)
262 /* Set a value for h-zbit. */
265 crisv32f_h_zbit_set (SIM_CPU *current_cpu, BI newval)
267 CPU (h_zbit) = newval;
270 /* Get the value of h-zbit-move. */
273 crisv32f_h_zbit_move_get (SIM_CPU *current_cpu)
275 return GET_H_ZBIT_MOVE ();
278 /* Set a value for h-zbit-move. */
281 crisv32f_h_zbit_move_set (SIM_CPU *current_cpu, BI newval)
283 SET_H_ZBIT_MOVE (newval);
286 /* Get the value of h-zbit-move-v32. */
289 crisv32f_h_zbit_move_v32_get (SIM_CPU *current_cpu)
291 return GET_H_ZBIT_MOVE_V32 ();
294 /* Set a value for h-zbit-move-v32. */
297 crisv32f_h_zbit_move_v32_set (SIM_CPU *current_cpu, BI newval)
299 SET_H_ZBIT_MOVE_V32 (newval);
302 /* Get the value of h-nbit. */
305 crisv32f_h_nbit_get (SIM_CPU *current_cpu)
310 /* Set a value for h-nbit. */
313 crisv32f_h_nbit_set (SIM_CPU *current_cpu, BI newval)
315 CPU (h_nbit) = newval;
318 /* Get the value of h-nbit-move. */
321 crisv32f_h_nbit_move_get (SIM_CPU *current_cpu)
323 return GET_H_NBIT_MOVE ();
326 /* Set a value for h-nbit-move. */
329 crisv32f_h_nbit_move_set (SIM_CPU *current_cpu, BI newval)
331 SET_H_NBIT_MOVE (newval);
334 /* Get the value of h-nbit-move-v32. */
337 crisv32f_h_nbit_move_v32_get (SIM_CPU *current_cpu)
339 return GET_H_NBIT_MOVE_V32 ();
342 /* Set a value for h-nbit-move-v32. */
345 crisv32f_h_nbit_move_v32_set (SIM_CPU *current_cpu, BI newval)
347 SET_H_NBIT_MOVE_V32 (newval);
350 /* Get the value of h-xbit. */
353 crisv32f_h_xbit_get (SIM_CPU *current_cpu)
358 /* Set a value for h-xbit. */
361 crisv32f_h_xbit_set (SIM_CPU *current_cpu, BI newval)
363 CPU (h_xbit) = newval;
366 /* Get the value of h-ibit. */
369 crisv32f_h_ibit_get (SIM_CPU *current_cpu)
371 return GET_H_IBIT ();
374 /* Set a value for h-ibit. */
377 crisv32f_h_ibit_set (SIM_CPU *current_cpu, BI newval)
382 /* Get the value of h-pbit. */
385 crisv32f_h_pbit_get (SIM_CPU *current_cpu)
390 /* Set a value for h-pbit. */
393 crisv32f_h_pbit_set (SIM_CPU *current_cpu, BI newval)
395 CPU (h_pbit) = newval;
398 /* Get the value of h-rbit. */
401 crisv32f_h_rbit_get (SIM_CPU *current_cpu)
406 /* Set a value for h-rbit. */
409 crisv32f_h_rbit_set (SIM_CPU *current_cpu, BI newval)
411 CPU (h_rbit) = newval;
414 /* Get the value of h-ubit. */
417 crisv32f_h_ubit_get (SIM_CPU *current_cpu)
419 return GET_H_UBIT ();
422 /* Set a value for h-ubit. */
425 crisv32f_h_ubit_set (SIM_CPU *current_cpu, BI newval)
430 /* Get the value of h-gbit. */
433 crisv32f_h_gbit_get (SIM_CPU *current_cpu)
438 /* Set a value for h-gbit. */
441 crisv32f_h_gbit_set (SIM_CPU *current_cpu, BI newval)
443 CPU (h_gbit) = newval;
446 /* Get the value of h-kernel-sp. */
449 crisv32f_h_kernel_sp_get (SIM_CPU *current_cpu)
451 return CPU (h_kernel_sp);
454 /* Set a value for h-kernel-sp. */
457 crisv32f_h_kernel_sp_set (SIM_CPU *current_cpu, SI newval)
459 CPU (h_kernel_sp) = newval;
462 /* Get the value of h-ubit-v32. */
465 crisv32f_h_ubit_v32_get (SIM_CPU *current_cpu)
467 return CPU (h_ubit_v32);
470 /* Set a value for h-ubit-v32. */
473 crisv32f_h_ubit_v32_set (SIM_CPU *current_cpu, BI newval)
475 SET_H_UBIT_V32 (newval);
478 /* Get the value of h-ibit-v32. */
481 crisv32f_h_ibit_v32_get (SIM_CPU *current_cpu)
483 return CPU (h_ibit_v32);
486 /* Set a value for h-ibit-v32. */
489 crisv32f_h_ibit_v32_set (SIM_CPU *current_cpu, BI newval)
491 SET_H_IBIT_V32 (newval);
494 /* Get the value of h-mbit. */
497 crisv32f_h_mbit_get (SIM_CPU *current_cpu)
502 /* Set a value for h-mbit. */
505 crisv32f_h_mbit_set (SIM_CPU *current_cpu, BI newval)
510 /* Get the value of h-qbit. */
513 crisv32f_h_qbit_get (SIM_CPU *current_cpu)
518 /* Set a value for h-qbit. */
521 crisv32f_h_qbit_set (SIM_CPU *current_cpu, BI newval)
526 /* Get the value of h-sbit. */
529 crisv32f_h_sbit_get (SIM_CPU *current_cpu)
534 /* Set a value for h-sbit. */
537 crisv32f_h_sbit_set (SIM_CPU *current_cpu, BI newval)
542 /* Get the value of h-insn-prefixed-p. */
545 crisv32f_h_insn_prefixed_p_get (SIM_CPU *current_cpu)
547 return GET_H_INSN_PREFIXED_P ();
550 /* Set a value for h-insn-prefixed-p. */
553 crisv32f_h_insn_prefixed_p_set (SIM_CPU *current_cpu, BI newval)
555 SET_H_INSN_PREFIXED_P (newval);
558 /* Get the value of h-insn-prefixed-p-v32. */
561 crisv32f_h_insn_prefixed_p_v32_get (SIM_CPU *current_cpu)
563 return GET_H_INSN_PREFIXED_P_V32 ();
566 /* Set a value for h-insn-prefixed-p-v32. */
569 crisv32f_h_insn_prefixed_p_v32_set (SIM_CPU *current_cpu, BI newval)
571 SET_H_INSN_PREFIXED_P_V32 (newval);
574 /* Get the value of h-prefixreg-v32. */
577 crisv32f_h_prefixreg_v32_get (SIM_CPU *current_cpu)
579 return GET_H_PREFIXREG_V32 ();
582 /* Set a value for h-prefixreg-v32. */
585 crisv32f_h_prefixreg_v32_set (SIM_CPU *current_cpu, SI newval)
587 SET_H_PREFIXREG_V32 (newval);
590 /* Record trace results for INSN. */
593 crisv32f_record_trace_results (SIM_CPU *current_cpu, CGEN_INSN *insn,
594 int *indices, TRACE_RECORD *tr)