* ppc-linux-nat.c (have_ptrace_getsetregs): New variable.
[gdb/SamB.git] / sim / sh64 / cpu.c
blobbfbbb1b546df0f718080c54051f7a069d855d3c3
1 /* Misc. support for CPU family sh64.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright 1996-2005 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 3 of the License, or
12 (at your option) 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
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
24 #define WANT_CPU sh64
25 #define WANT_CPU_SH64
27 #include "sim-main.h"
28 #include "cgen-ops.h"
30 /* Get the value of h-pc. */
32 UDI
33 sh64_h_pc_get (SIM_CPU *current_cpu)
35 return GET_H_PC ();
38 /* Set a value for h-pc. */
40 void
41 sh64_h_pc_set (SIM_CPU *current_cpu, UDI newval)
43 SET_H_PC (newval);
46 /* Get the value of h-gr. */
49 sh64_h_gr_get (SIM_CPU *current_cpu, UINT regno)
51 return GET_H_GR (regno);
54 /* Set a value for h-gr. */
56 void
57 sh64_h_gr_set (SIM_CPU *current_cpu, UINT regno, DI newval)
59 SET_H_GR (regno, newval);
62 /* Get the value of h-grc. */
65 sh64_h_grc_get (SIM_CPU *current_cpu, UINT regno)
67 return GET_H_GRC (regno);
70 /* Set a value for h-grc. */
72 void
73 sh64_h_grc_set (SIM_CPU *current_cpu, UINT regno, SI newval)
75 SET_H_GRC (regno, newval);
78 /* Get the value of h-cr. */
81 sh64_h_cr_get (SIM_CPU *current_cpu, UINT regno)
83 return GET_H_CR (regno);
86 /* Set a value for h-cr. */
88 void
89 sh64_h_cr_set (SIM_CPU *current_cpu, UINT regno, DI newval)
91 SET_H_CR (regno, newval);
94 /* Get the value of h-sr. */
97 sh64_h_sr_get (SIM_CPU *current_cpu)
99 return CPU (h_sr);
102 /* Set a value for h-sr. */
104 void
105 sh64_h_sr_set (SIM_CPU *current_cpu, SI newval)
107 CPU (h_sr) = newval;
110 /* Get the value of h-fpscr. */
113 sh64_h_fpscr_get (SIM_CPU *current_cpu)
115 return CPU (h_fpscr);
118 /* Set a value for h-fpscr. */
120 void
121 sh64_h_fpscr_set (SIM_CPU *current_cpu, SI newval)
123 CPU (h_fpscr) = newval;
126 /* Get the value of h-frbit. */
129 sh64_h_frbit_get (SIM_CPU *current_cpu)
131 return GET_H_FRBIT ();
134 /* Set a value for h-frbit. */
136 void
137 sh64_h_frbit_set (SIM_CPU *current_cpu, BI newval)
139 SET_H_FRBIT (newval);
142 /* Get the value of h-szbit. */
145 sh64_h_szbit_get (SIM_CPU *current_cpu)
147 return GET_H_SZBIT ();
150 /* Set a value for h-szbit. */
152 void
153 sh64_h_szbit_set (SIM_CPU *current_cpu, BI newval)
155 SET_H_SZBIT (newval);
158 /* Get the value of h-prbit. */
161 sh64_h_prbit_get (SIM_CPU *current_cpu)
163 return GET_H_PRBIT ();
166 /* Set a value for h-prbit. */
168 void
169 sh64_h_prbit_set (SIM_CPU *current_cpu, BI newval)
171 SET_H_PRBIT (newval);
174 /* Get the value of h-sbit. */
177 sh64_h_sbit_get (SIM_CPU *current_cpu)
179 return GET_H_SBIT ();
182 /* Set a value for h-sbit. */
184 void
185 sh64_h_sbit_set (SIM_CPU *current_cpu, BI newval)
187 SET_H_SBIT (newval);
190 /* Get the value of h-mbit. */
193 sh64_h_mbit_get (SIM_CPU *current_cpu)
195 return GET_H_MBIT ();
198 /* Set a value for h-mbit. */
200 void
201 sh64_h_mbit_set (SIM_CPU *current_cpu, BI newval)
203 SET_H_MBIT (newval);
206 /* Get the value of h-qbit. */
209 sh64_h_qbit_get (SIM_CPU *current_cpu)
211 return GET_H_QBIT ();
214 /* Set a value for h-qbit. */
216 void
217 sh64_h_qbit_set (SIM_CPU *current_cpu, BI newval)
219 SET_H_QBIT (newval);
222 /* Get the value of h-fr. */
225 sh64_h_fr_get (SIM_CPU *current_cpu, UINT regno)
227 return CPU (h_fr[regno]);
230 /* Set a value for h-fr. */
232 void
233 sh64_h_fr_set (SIM_CPU *current_cpu, UINT regno, SF newval)
235 CPU (h_fr[regno]) = newval;
238 /* Get the value of h-fp. */
241 sh64_h_fp_get (SIM_CPU *current_cpu, UINT regno)
243 return GET_H_FP (regno);
246 /* Set a value for h-fp. */
248 void
249 sh64_h_fp_set (SIM_CPU *current_cpu, UINT regno, SF newval)
251 SET_H_FP (regno, newval);
254 /* Get the value of h-fv. */
257 sh64_h_fv_get (SIM_CPU *current_cpu, UINT regno)
259 return GET_H_FV (regno);
262 /* Set a value for h-fv. */
264 void
265 sh64_h_fv_set (SIM_CPU *current_cpu, UINT regno, SF newval)
267 SET_H_FV (regno, newval);
270 /* Get the value of h-fmtx. */
273 sh64_h_fmtx_get (SIM_CPU *current_cpu, UINT regno)
275 return GET_H_FMTX (regno);
278 /* Set a value for h-fmtx. */
280 void
281 sh64_h_fmtx_set (SIM_CPU *current_cpu, UINT regno, SF newval)
283 SET_H_FMTX (regno, newval);
286 /* Get the value of h-dr. */
289 sh64_h_dr_get (SIM_CPU *current_cpu, UINT regno)
291 return GET_H_DR (regno);
294 /* Set a value for h-dr. */
296 void
297 sh64_h_dr_set (SIM_CPU *current_cpu, UINT regno, DF newval)
299 SET_H_DR (regno, newval);
302 /* Get the value of h-fsd. */
305 sh64_h_fsd_get (SIM_CPU *current_cpu, UINT regno)
307 return GET_H_FSD (regno);
310 /* Set a value for h-fsd. */
312 void
313 sh64_h_fsd_set (SIM_CPU *current_cpu, UINT regno, DF newval)
315 SET_H_FSD (regno, newval);
318 /* Get the value of h-fmov. */
321 sh64_h_fmov_get (SIM_CPU *current_cpu, UINT regno)
323 return GET_H_FMOV (regno);
326 /* Set a value for h-fmov. */
328 void
329 sh64_h_fmov_set (SIM_CPU *current_cpu, UINT regno, DF newval)
331 SET_H_FMOV (regno, newval);
334 /* Get the value of h-tr. */
337 sh64_h_tr_get (SIM_CPU *current_cpu, UINT regno)
339 return CPU (h_tr[regno]);
342 /* Set a value for h-tr. */
344 void
345 sh64_h_tr_set (SIM_CPU *current_cpu, UINT regno, DI newval)
347 CPU (h_tr[regno]) = newval;
350 /* Get the value of h-endian. */
353 sh64_h_endian_get (SIM_CPU *current_cpu)
355 return GET_H_ENDIAN ();
358 /* Set a value for h-endian. */
360 void
361 sh64_h_endian_set (SIM_CPU *current_cpu, BI newval)
363 SET_H_ENDIAN (newval);
366 /* Get the value of h-ism. */
369 sh64_h_ism_get (SIM_CPU *current_cpu)
371 return GET_H_ISM ();
374 /* Set a value for h-ism. */
376 void
377 sh64_h_ism_set (SIM_CPU *current_cpu, BI newval)
379 SET_H_ISM (newval);
382 /* Get the value of h-frc. */
385 sh64_h_frc_get (SIM_CPU *current_cpu, UINT regno)
387 return GET_H_FRC (regno);
390 /* Set a value for h-frc. */
392 void
393 sh64_h_frc_set (SIM_CPU *current_cpu, UINT regno, SF newval)
395 SET_H_FRC (regno, newval);
398 /* Get the value of h-drc. */
401 sh64_h_drc_get (SIM_CPU *current_cpu, UINT regno)
403 return GET_H_DRC (regno);
406 /* Set a value for h-drc. */
408 void
409 sh64_h_drc_set (SIM_CPU *current_cpu, UINT regno, DF newval)
411 SET_H_DRC (regno, newval);
414 /* Get the value of h-xf. */
417 sh64_h_xf_get (SIM_CPU *current_cpu, UINT regno)
419 return GET_H_XF (regno);
422 /* Set a value for h-xf. */
424 void
425 sh64_h_xf_set (SIM_CPU *current_cpu, UINT regno, SF newval)
427 SET_H_XF (regno, newval);
430 /* Get the value of h-xd. */
433 sh64_h_xd_get (SIM_CPU *current_cpu, UINT regno)
435 return GET_H_XD (regno);
438 /* Set a value for h-xd. */
440 void
441 sh64_h_xd_set (SIM_CPU *current_cpu, UINT regno, DF newval)
443 SET_H_XD (regno, newval);
446 /* Get the value of h-fvc. */
449 sh64_h_fvc_get (SIM_CPU *current_cpu, UINT regno)
451 return GET_H_FVC (regno);
454 /* Set a value for h-fvc. */
456 void
457 sh64_h_fvc_set (SIM_CPU *current_cpu, UINT regno, SF newval)
459 SET_H_FVC (regno, newval);
462 /* Get the value of h-gbr. */
465 sh64_h_gbr_get (SIM_CPU *current_cpu)
467 return GET_H_GBR ();
470 /* Set a value for h-gbr. */
472 void
473 sh64_h_gbr_set (SIM_CPU *current_cpu, SI newval)
475 SET_H_GBR (newval);
478 /* Get the value of h-vbr. */
481 sh64_h_vbr_get (SIM_CPU *current_cpu)
483 return GET_H_VBR ();
486 /* Set a value for h-vbr. */
488 void
489 sh64_h_vbr_set (SIM_CPU *current_cpu, SI newval)
491 SET_H_VBR (newval);
494 /* Get the value of h-pr. */
497 sh64_h_pr_get (SIM_CPU *current_cpu)
499 return GET_H_PR ();
502 /* Set a value for h-pr. */
504 void
505 sh64_h_pr_set (SIM_CPU *current_cpu, SI newval)
507 SET_H_PR (newval);
510 /* Get the value of h-macl. */
513 sh64_h_macl_get (SIM_CPU *current_cpu)
515 return GET_H_MACL ();
518 /* Set a value for h-macl. */
520 void
521 sh64_h_macl_set (SIM_CPU *current_cpu, SI newval)
523 SET_H_MACL (newval);
526 /* Get the value of h-mach. */
529 sh64_h_mach_get (SIM_CPU *current_cpu)
531 return GET_H_MACH ();
534 /* Set a value for h-mach. */
536 void
537 sh64_h_mach_set (SIM_CPU *current_cpu, SI newval)
539 SET_H_MACH (newval);
542 /* Get the value of h-tbit. */
545 sh64_h_tbit_get (SIM_CPU *current_cpu)
547 return GET_H_TBIT ();
550 /* Set a value for h-tbit. */
552 void
553 sh64_h_tbit_set (SIM_CPU *current_cpu, BI newval)
555 SET_H_TBIT (newval);
558 /* Record trace results for INSN. */
560 void
561 sh64_record_trace_results (SIM_CPU *current_cpu, CGEN_INSN *insn,
562 int *indices, TRACE_RECORD *tr)