1 /* Misc. support for CPU family fr30bf.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright (C) 1996, 1997, 1998, 1999 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.
25 #define WANT_CPU fr30bf
26 #define WANT_CPU_FR30BF
31 /* Get the value of h-pc. */
34 fr30bf_h_pc_get (SIM_CPU
*current_cpu
)
39 /* Set a value for h-pc. */
42 fr30bf_h_pc_set (SIM_CPU
*current_cpu
, USI newval
)
47 /* Get the value of h-gr. */
50 fr30bf_h_gr_get (SIM_CPU
*current_cpu
, UINT regno
)
52 return CPU (h_gr
[regno
]);
55 /* Set a value for h-gr. */
58 fr30bf_h_gr_set (SIM_CPU
*current_cpu
, UINT regno
, SI newval
)
60 CPU (h_gr
[regno
]) = newval
;
63 /* Get the value of h-cr. */
66 fr30bf_h_cr_get (SIM_CPU
*current_cpu
, UINT regno
)
68 return CPU (h_cr
[regno
]);
71 /* Set a value for h-cr. */
74 fr30bf_h_cr_set (SIM_CPU
*current_cpu
, UINT regno
, SI newval
)
76 CPU (h_cr
[regno
]) = newval
;
79 /* Get the value of h-dr. */
82 fr30bf_h_dr_get (SIM_CPU
*current_cpu
, UINT regno
)
84 return GET_H_DR (regno
);
87 /* Set a value for h-dr. */
90 fr30bf_h_dr_set (SIM_CPU
*current_cpu
, UINT regno
, SI newval
)
92 SET_H_DR (regno
, newval
);
95 /* Get the value of h-ps. */
98 fr30bf_h_ps_get (SIM_CPU
*current_cpu
)
103 /* Set a value for h-ps. */
106 fr30bf_h_ps_set (SIM_CPU
*current_cpu
, USI newval
)
111 /* Get the value of h-r13. */
114 fr30bf_h_r13_get (SIM_CPU
*current_cpu
)
119 /* Set a value for h-r13. */
122 fr30bf_h_r13_set (SIM_CPU
*current_cpu
, SI newval
)
124 CPU (h_r13
) = newval
;
127 /* Get the value of h-r14. */
130 fr30bf_h_r14_get (SIM_CPU
*current_cpu
)
135 /* Set a value for h-r14. */
138 fr30bf_h_r14_set (SIM_CPU
*current_cpu
, SI newval
)
140 CPU (h_r14
) = newval
;
143 /* Get the value of h-r15. */
146 fr30bf_h_r15_get (SIM_CPU
*current_cpu
)
151 /* Set a value for h-r15. */
154 fr30bf_h_r15_set (SIM_CPU
*current_cpu
, SI newval
)
156 CPU (h_r15
) = newval
;
159 /* Get the value of h-nbit. */
162 fr30bf_h_nbit_get (SIM_CPU
*current_cpu
)
167 /* Set a value for h-nbit. */
170 fr30bf_h_nbit_set (SIM_CPU
*current_cpu
, BI newval
)
172 CPU (h_nbit
) = newval
;
175 /* Get the value of h-zbit. */
178 fr30bf_h_zbit_get (SIM_CPU
*current_cpu
)
183 /* Set a value for h-zbit. */
186 fr30bf_h_zbit_set (SIM_CPU
*current_cpu
, BI newval
)
188 CPU (h_zbit
) = newval
;
191 /* Get the value of h-vbit. */
194 fr30bf_h_vbit_get (SIM_CPU
*current_cpu
)
199 /* Set a value for h-vbit. */
202 fr30bf_h_vbit_set (SIM_CPU
*current_cpu
, BI newval
)
204 CPU (h_vbit
) = newval
;
207 /* Get the value of h-cbit. */
210 fr30bf_h_cbit_get (SIM_CPU
*current_cpu
)
215 /* Set a value for h-cbit. */
218 fr30bf_h_cbit_set (SIM_CPU
*current_cpu
, BI newval
)
220 CPU (h_cbit
) = newval
;
223 /* Get the value of h-ibit. */
226 fr30bf_h_ibit_get (SIM_CPU
*current_cpu
)
231 /* Set a value for h-ibit. */
234 fr30bf_h_ibit_set (SIM_CPU
*current_cpu
, BI newval
)
236 CPU (h_ibit
) = newval
;
239 /* Get the value of h-sbit. */
242 fr30bf_h_sbit_get (SIM_CPU
*current_cpu
)
244 return GET_H_SBIT ();
247 /* Set a value for h-sbit. */
250 fr30bf_h_sbit_set (SIM_CPU
*current_cpu
, BI newval
)
255 /* Get the value of h-tbit. */
258 fr30bf_h_tbit_get (SIM_CPU
*current_cpu
)
263 /* Set a value for h-tbit. */
266 fr30bf_h_tbit_set (SIM_CPU
*current_cpu
, BI newval
)
268 CPU (h_tbit
) = newval
;
271 /* Get the value of h-d0bit. */
274 fr30bf_h_d0bit_get (SIM_CPU
*current_cpu
)
276 return CPU (h_d0bit
);
279 /* Set a value for h-d0bit. */
282 fr30bf_h_d0bit_set (SIM_CPU
*current_cpu
, BI newval
)
284 CPU (h_d0bit
) = newval
;
287 /* Get the value of h-d1bit. */
290 fr30bf_h_d1bit_get (SIM_CPU
*current_cpu
)
292 return CPU (h_d1bit
);
295 /* Set a value for h-d1bit. */
298 fr30bf_h_d1bit_set (SIM_CPU
*current_cpu
, BI newval
)
300 CPU (h_d1bit
) = newval
;
303 /* Get the value of h-ccr. */
306 fr30bf_h_ccr_get (SIM_CPU
*current_cpu
)
311 /* Set a value for h-ccr. */
314 fr30bf_h_ccr_set (SIM_CPU
*current_cpu
, UQI newval
)
319 /* Get the value of h-scr. */
322 fr30bf_h_scr_get (SIM_CPU
*current_cpu
)
327 /* Set a value for h-scr. */
330 fr30bf_h_scr_set (SIM_CPU
*current_cpu
, UQI newval
)
335 /* Get the value of h-ilm. */
338 fr30bf_h_ilm_get (SIM_CPU
*current_cpu
)
343 /* Set a value for h-ilm. */
346 fr30bf_h_ilm_set (SIM_CPU
*current_cpu
, UQI newval
)
351 /* Record trace results for INSN. */
354 fr30bf_record_trace_results (SIM_CPU
*current_cpu
, CGEN_INSN
*insn
,
355 int *indices
, TRACE_RECORD
*tr
)