arm: Support pac_key_* register operand for MRS/MSR in Armv8.1-M Mainline
[binutils-gdb.git] / sim / frv / cpu.c
blobf85c16d8bd42a228bc34641c8acae3713dfcd782
1 /* Misc. support for CPU family frvbf.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright (C) 1996-2024 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)
12 any later version.
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 frvbf
26 #define WANT_CPU_FRVBF
28 #include "sim-main.h"
29 #include "cgen-ops.h"
31 /* Get the value of h-reloc-ann. */
34 frvbf_h_reloc_ann_get (SIM_CPU *current_cpu)
36 return CPU (h_reloc_ann);
39 /* Set a value for h-reloc-ann. */
41 void
42 frvbf_h_reloc_ann_set (SIM_CPU *current_cpu, BI newval)
44 CPU (h_reloc_ann) = newval;
47 /* Get the value of h-pc. */
49 USI
50 frvbf_h_pc_get (SIM_CPU *current_cpu)
52 return CPU (h_pc);
55 /* Set a value for h-pc. */
57 void
58 frvbf_h_pc_set (SIM_CPU *current_cpu, USI newval)
60 CPU (h_pc) = newval;
63 /* Get the value of h-psr_imple. */
65 UQI
66 frvbf_h_psr_imple_get (SIM_CPU *current_cpu)
68 return CPU (h_psr_imple);
71 /* Set a value for h-psr_imple. */
73 void
74 frvbf_h_psr_imple_set (SIM_CPU *current_cpu, UQI newval)
76 CPU (h_psr_imple) = newval;
79 /* Get the value of h-psr_ver. */
81 UQI
82 frvbf_h_psr_ver_get (SIM_CPU *current_cpu)
84 return CPU (h_psr_ver);
87 /* Set a value for h-psr_ver. */
89 void
90 frvbf_h_psr_ver_set (SIM_CPU *current_cpu, UQI newval)
92 CPU (h_psr_ver) = newval;
95 /* Get the value of h-psr_ice. */
98 frvbf_h_psr_ice_get (SIM_CPU *current_cpu)
100 return CPU (h_psr_ice);
103 /* Set a value for h-psr_ice. */
105 void
106 frvbf_h_psr_ice_set (SIM_CPU *current_cpu, BI newval)
108 CPU (h_psr_ice) = newval;
111 /* Get the value of h-psr_nem. */
114 frvbf_h_psr_nem_get (SIM_CPU *current_cpu)
116 return CPU (h_psr_nem);
119 /* Set a value for h-psr_nem. */
121 void
122 frvbf_h_psr_nem_set (SIM_CPU *current_cpu, BI newval)
124 CPU (h_psr_nem) = newval;
127 /* Get the value of h-psr_cm. */
130 frvbf_h_psr_cm_get (SIM_CPU *current_cpu)
132 return CPU (h_psr_cm);
135 /* Set a value for h-psr_cm. */
137 void
138 frvbf_h_psr_cm_set (SIM_CPU *current_cpu, BI newval)
140 CPU (h_psr_cm) = newval;
143 /* Get the value of h-psr_be. */
146 frvbf_h_psr_be_get (SIM_CPU *current_cpu)
148 return CPU (h_psr_be);
151 /* Set a value for h-psr_be. */
153 void
154 frvbf_h_psr_be_set (SIM_CPU *current_cpu, BI newval)
156 CPU (h_psr_be) = newval;
159 /* Get the value of h-psr_esr. */
162 frvbf_h_psr_esr_get (SIM_CPU *current_cpu)
164 return CPU (h_psr_esr);
167 /* Set a value for h-psr_esr. */
169 void
170 frvbf_h_psr_esr_set (SIM_CPU *current_cpu, BI newval)
172 CPU (h_psr_esr) = newval;
175 /* Get the value of h-psr_ef. */
178 frvbf_h_psr_ef_get (SIM_CPU *current_cpu)
180 return CPU (h_psr_ef);
183 /* Set a value for h-psr_ef. */
185 void
186 frvbf_h_psr_ef_set (SIM_CPU *current_cpu, BI newval)
188 CPU (h_psr_ef) = newval;
191 /* Get the value of h-psr_em. */
194 frvbf_h_psr_em_get (SIM_CPU *current_cpu)
196 return CPU (h_psr_em);
199 /* Set a value for h-psr_em. */
201 void
202 frvbf_h_psr_em_set (SIM_CPU *current_cpu, BI newval)
204 CPU (h_psr_em) = newval;
207 /* Get the value of h-psr_pil. */
210 frvbf_h_psr_pil_get (SIM_CPU *current_cpu)
212 return CPU (h_psr_pil);
215 /* Set a value for h-psr_pil. */
217 void
218 frvbf_h_psr_pil_set (SIM_CPU *current_cpu, UQI newval)
220 CPU (h_psr_pil) = newval;
223 /* Get the value of h-psr_ps. */
226 frvbf_h_psr_ps_get (SIM_CPU *current_cpu)
228 return CPU (h_psr_ps);
231 /* Set a value for h-psr_ps. */
233 void
234 frvbf_h_psr_ps_set (SIM_CPU *current_cpu, BI newval)
236 CPU (h_psr_ps) = newval;
239 /* Get the value of h-psr_et. */
242 frvbf_h_psr_et_get (SIM_CPU *current_cpu)
244 return CPU (h_psr_et);
247 /* Set a value for h-psr_et. */
249 void
250 frvbf_h_psr_et_set (SIM_CPU *current_cpu, BI newval)
252 CPU (h_psr_et) = newval;
255 /* Get the value of h-psr_s. */
258 frvbf_h_psr_s_get (SIM_CPU *current_cpu)
260 return CPU (h_psr_s);
263 /* Set a value for h-psr_s. */
265 void
266 frvbf_h_psr_s_set (SIM_CPU *current_cpu, BI newval)
268 SET_H_PSR_S (newval);
271 /* Get the value of h-tbr_tba. */
274 frvbf_h_tbr_tba_get (SIM_CPU *current_cpu)
276 return CPU (h_tbr_tba);
279 /* Set a value for h-tbr_tba. */
281 void
282 frvbf_h_tbr_tba_set (SIM_CPU *current_cpu, USI newval)
284 CPU (h_tbr_tba) = newval;
287 /* Get the value of h-tbr_tt. */
290 frvbf_h_tbr_tt_get (SIM_CPU *current_cpu)
292 return CPU (h_tbr_tt);
295 /* Set a value for h-tbr_tt. */
297 void
298 frvbf_h_tbr_tt_set (SIM_CPU *current_cpu, UQI newval)
300 CPU (h_tbr_tt) = newval;
303 /* Get the value of h-bpsr_bs. */
306 frvbf_h_bpsr_bs_get (SIM_CPU *current_cpu)
308 return CPU (h_bpsr_bs);
311 /* Set a value for h-bpsr_bs. */
313 void
314 frvbf_h_bpsr_bs_set (SIM_CPU *current_cpu, BI newval)
316 CPU (h_bpsr_bs) = newval;
319 /* Get the value of h-bpsr_bet. */
322 frvbf_h_bpsr_bet_get (SIM_CPU *current_cpu)
324 return CPU (h_bpsr_bet);
327 /* Set a value for h-bpsr_bet. */
329 void
330 frvbf_h_bpsr_bet_set (SIM_CPU *current_cpu, BI newval)
332 CPU (h_bpsr_bet) = newval;
335 /* Get the value of h-gr. */
338 frvbf_h_gr_get (SIM_CPU *current_cpu, UINT regno)
340 return GET_H_GR (regno);
343 /* Set a value for h-gr. */
345 void
346 frvbf_h_gr_set (SIM_CPU *current_cpu, UINT regno, USI newval)
348 SET_H_GR (regno, newval);
351 /* Get the value of h-gr_double. */
354 frvbf_h_gr_double_get (SIM_CPU *current_cpu, UINT regno)
356 return GET_H_GR_DOUBLE (regno);
359 /* Set a value for h-gr_double. */
361 void
362 frvbf_h_gr_double_set (SIM_CPU *current_cpu, UINT regno, DI newval)
364 SET_H_GR_DOUBLE (regno, newval);
367 /* Get the value of h-gr_hi. */
370 frvbf_h_gr_hi_get (SIM_CPU *current_cpu, UINT regno)
372 return GET_H_GR_HI (regno);
375 /* Set a value for h-gr_hi. */
377 void
378 frvbf_h_gr_hi_set (SIM_CPU *current_cpu, UINT regno, UHI newval)
380 SET_H_GR_HI (regno, newval);
383 /* Get the value of h-gr_lo. */
386 frvbf_h_gr_lo_get (SIM_CPU *current_cpu, UINT regno)
388 return GET_H_GR_LO (regno);
391 /* Set a value for h-gr_lo. */
393 void
394 frvbf_h_gr_lo_set (SIM_CPU *current_cpu, UINT regno, UHI newval)
396 SET_H_GR_LO (regno, newval);
399 /* Get the value of h-fr. */
402 frvbf_h_fr_get (SIM_CPU *current_cpu, UINT regno)
404 return GET_H_FR (regno);
407 /* Set a value for h-fr. */
409 void
410 frvbf_h_fr_set (SIM_CPU *current_cpu, UINT regno, SF newval)
412 SET_H_FR (regno, newval);
415 /* Get the value of h-fr_double. */
418 frvbf_h_fr_double_get (SIM_CPU *current_cpu, UINT regno)
420 return GET_H_FR_DOUBLE (regno);
423 /* Set a value for h-fr_double. */
425 void
426 frvbf_h_fr_double_set (SIM_CPU *current_cpu, UINT regno, DF newval)
428 SET_H_FR_DOUBLE (regno, newval);
431 /* Get the value of h-fr_int. */
434 frvbf_h_fr_int_get (SIM_CPU *current_cpu, UINT regno)
436 return GET_H_FR_INT (regno);
439 /* Set a value for h-fr_int. */
441 void
442 frvbf_h_fr_int_set (SIM_CPU *current_cpu, UINT regno, USI newval)
444 SET_H_FR_INT (regno, newval);
447 /* Get the value of h-fr_hi. */
450 frvbf_h_fr_hi_get (SIM_CPU *current_cpu, UINT regno)
452 return GET_H_FR_HI (regno);
455 /* Set a value for h-fr_hi. */
457 void
458 frvbf_h_fr_hi_set (SIM_CPU *current_cpu, UINT regno, UHI newval)
460 SET_H_FR_HI (regno, newval);
463 /* Get the value of h-fr_lo. */
466 frvbf_h_fr_lo_get (SIM_CPU *current_cpu, UINT regno)
468 return GET_H_FR_LO (regno);
471 /* Set a value for h-fr_lo. */
473 void
474 frvbf_h_fr_lo_set (SIM_CPU *current_cpu, UINT regno, UHI newval)
476 SET_H_FR_LO (regno, newval);
479 /* Get the value of h-fr_0. */
482 frvbf_h_fr_0_get (SIM_CPU *current_cpu, UINT regno)
484 return GET_H_FR_0 (regno);
487 /* Set a value for h-fr_0. */
489 void
490 frvbf_h_fr_0_set (SIM_CPU *current_cpu, UINT regno, UHI newval)
492 SET_H_FR_0 (regno, newval);
495 /* Get the value of h-fr_1. */
498 frvbf_h_fr_1_get (SIM_CPU *current_cpu, UINT regno)
500 return GET_H_FR_1 (regno);
503 /* Set a value for h-fr_1. */
505 void
506 frvbf_h_fr_1_set (SIM_CPU *current_cpu, UINT regno, UHI newval)
508 SET_H_FR_1 (regno, newval);
511 /* Get the value of h-fr_2. */
514 frvbf_h_fr_2_get (SIM_CPU *current_cpu, UINT regno)
516 return GET_H_FR_2 (regno);
519 /* Set a value for h-fr_2. */
521 void
522 frvbf_h_fr_2_set (SIM_CPU *current_cpu, UINT regno, UHI newval)
524 SET_H_FR_2 (regno, newval);
527 /* Get the value of h-fr_3. */
530 frvbf_h_fr_3_get (SIM_CPU *current_cpu, UINT regno)
532 return GET_H_FR_3 (regno);
535 /* Set a value for h-fr_3. */
537 void
538 frvbf_h_fr_3_set (SIM_CPU *current_cpu, UINT regno, UHI newval)
540 SET_H_FR_3 (regno, newval);
543 /* Get the value of h-cpr. */
546 frvbf_h_cpr_get (SIM_CPU *current_cpu, UINT regno)
548 return CPU (h_cpr[regno]);
551 /* Set a value for h-cpr. */
553 void
554 frvbf_h_cpr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
556 CPU (h_cpr[regno]) = newval;
559 /* Get the value of h-cpr_double. */
562 frvbf_h_cpr_double_get (SIM_CPU *current_cpu, UINT regno)
564 return GET_H_CPR_DOUBLE (regno);
567 /* Set a value for h-cpr_double. */
569 void
570 frvbf_h_cpr_double_set (SIM_CPU *current_cpu, UINT regno, DI newval)
572 SET_H_CPR_DOUBLE (regno, newval);
575 /* Get the value of h-spr. */
578 frvbf_h_spr_get (SIM_CPU *current_cpu, UINT regno)
580 return GET_H_SPR (regno);
583 /* Set a value for h-spr. */
585 void
586 frvbf_h_spr_set (SIM_CPU *current_cpu, UINT regno, USI newval)
588 SET_H_SPR (regno, newval);
591 /* Get the value of h-accg. */
594 frvbf_h_accg_get (SIM_CPU *current_cpu, UINT regno)
596 return GET_H_ACCG (regno);
599 /* Set a value for h-accg. */
601 void
602 frvbf_h_accg_set (SIM_CPU *current_cpu, UINT regno, USI newval)
604 SET_H_ACCG (regno, newval);
607 /* Get the value of h-acc40S. */
610 frvbf_h_acc40S_get (SIM_CPU *current_cpu, UINT regno)
612 return GET_H_ACC40S (regno);
615 /* Set a value for h-acc40S. */
617 void
618 frvbf_h_acc40S_set (SIM_CPU *current_cpu, UINT regno, DI newval)
620 SET_H_ACC40S (regno, newval);
623 /* Get the value of h-acc40U. */
626 frvbf_h_acc40U_get (SIM_CPU *current_cpu, UINT regno)
628 return GET_H_ACC40U (regno);
631 /* Set a value for h-acc40U. */
633 void
634 frvbf_h_acc40U_set (SIM_CPU *current_cpu, UINT regno, DI newval)
636 SET_H_ACC40U (regno, newval);
639 /* Get the value of h-iacc0. */
642 frvbf_h_iacc0_get (SIM_CPU *current_cpu, UINT regno)
644 return GET_H_IACC0 (regno);
647 /* Set a value for h-iacc0. */
649 void
650 frvbf_h_iacc0_set (SIM_CPU *current_cpu, UINT regno, DI newval)
652 SET_H_IACC0 (regno, newval);
655 /* Get the value of h-iccr. */
658 frvbf_h_iccr_get (SIM_CPU *current_cpu, UINT regno)
660 return CPU (h_iccr[regno]);
663 /* Set a value for h-iccr. */
665 void
666 frvbf_h_iccr_set (SIM_CPU *current_cpu, UINT regno, UQI newval)
668 CPU (h_iccr[regno]) = newval;
671 /* Get the value of h-fccr. */
674 frvbf_h_fccr_get (SIM_CPU *current_cpu, UINT regno)
676 return CPU (h_fccr[regno]);
679 /* Set a value for h-fccr. */
681 void
682 frvbf_h_fccr_set (SIM_CPU *current_cpu, UINT regno, UQI newval)
684 CPU (h_fccr[regno]) = newval;
687 /* Get the value of h-cccr. */
690 frvbf_h_cccr_get (SIM_CPU *current_cpu, UINT regno)
692 return CPU (h_cccr[regno]);
695 /* Set a value for h-cccr. */
697 void
698 frvbf_h_cccr_set (SIM_CPU *current_cpu, UINT regno, UQI newval)
700 CPU (h_cccr[regno]) = newval;