Home | History | Annotate | Line # | Download | only in m32r
cpu.c revision 1.1.1.5
      1      1.1  christos /* Misc. support for CPU family m32rbf.
      2      1.1  christos 
      3      1.1  christos THIS FILE IS MACHINE GENERATED WITH CGEN.
      4      1.1  christos 
      5  1.1.1.5  christos Copyright 1996-2019 Free Software Foundation, Inc.
      6      1.1  christos 
      7      1.1  christos This file is part of the GNU simulators.
      8      1.1  christos 
      9      1.1  christos    This file is free software; you can redistribute it and/or modify
     10      1.1  christos    it under the terms of the GNU General Public License as published by
     11      1.1  christos    the Free Software Foundation; either version 3, or (at your option)
     12      1.1  christos    any later version.
     13      1.1  christos 
     14      1.1  christos    It is distributed in the hope that it will be useful, but WITHOUT
     15      1.1  christos    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
     16      1.1  christos    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
     17      1.1  christos    License for more details.
     18      1.1  christos 
     19      1.1  christos    You should have received a copy of the GNU General Public License along
     20      1.1  christos    with this program; if not, see <http://www.gnu.org/licenses/>.
     21      1.1  christos 
     22      1.1  christos */
     23      1.1  christos 
     24      1.1  christos #define WANT_CPU m32rbf
     25      1.1  christos #define WANT_CPU_M32RBF
     26      1.1  christos 
     27      1.1  christos #include "sim-main.h"
     28      1.1  christos #include "cgen-ops.h"
     29      1.1  christos 
     30      1.1  christos /* Get the value of h-pc.  */
     31      1.1  christos 
     32      1.1  christos USI
     33      1.1  christos m32rbf_h_pc_get (SIM_CPU *current_cpu)
     34      1.1  christos {
     35      1.1  christos   return CPU (h_pc);
     36      1.1  christos }
     37      1.1  christos 
     38      1.1  christos /* Set a value for h-pc.  */
     39      1.1  christos 
     40      1.1  christos void
     41      1.1  christos m32rbf_h_pc_set (SIM_CPU *current_cpu, USI newval)
     42      1.1  christos {
     43      1.1  christos   CPU (h_pc) = newval;
     44      1.1  christos }
     45      1.1  christos 
     46      1.1  christos /* Get the value of h-gr.  */
     47      1.1  christos 
     48      1.1  christos SI
     49      1.1  christos m32rbf_h_gr_get (SIM_CPU *current_cpu, UINT regno)
     50      1.1  christos {
     51      1.1  christos   return CPU (h_gr[regno]);
     52      1.1  christos }
     53      1.1  christos 
     54      1.1  christos /* Set a value for h-gr.  */
     55      1.1  christos 
     56      1.1  christos void
     57      1.1  christos m32rbf_h_gr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
     58      1.1  christos {
     59      1.1  christos   CPU (h_gr[regno]) = newval;
     60      1.1  christos }
     61      1.1  christos 
     62      1.1  christos /* Get the value of h-cr.  */
     63      1.1  christos 
     64      1.1  christos USI
     65      1.1  christos m32rbf_h_cr_get (SIM_CPU *current_cpu, UINT regno)
     66      1.1  christos {
     67      1.1  christos   return GET_H_CR (regno);
     68      1.1  christos }
     69      1.1  christos 
     70      1.1  christos /* Set a value for h-cr.  */
     71      1.1  christos 
     72      1.1  christos void
     73      1.1  christos m32rbf_h_cr_set (SIM_CPU *current_cpu, UINT regno, USI newval)
     74      1.1  christos {
     75      1.1  christos   SET_H_CR (regno, newval);
     76      1.1  christos }
     77      1.1  christos 
     78      1.1  christos /* Get the value of h-accum.  */
     79      1.1  christos 
     80      1.1  christos DI
     81      1.1  christos m32rbf_h_accum_get (SIM_CPU *current_cpu)
     82      1.1  christos {
     83      1.1  christos   return GET_H_ACCUM ();
     84      1.1  christos }
     85      1.1  christos 
     86      1.1  christos /* Set a value for h-accum.  */
     87      1.1  christos 
     88      1.1  christos void
     89      1.1  christos m32rbf_h_accum_set (SIM_CPU *current_cpu, DI newval)
     90      1.1  christos {
     91      1.1  christos   SET_H_ACCUM (newval);
     92      1.1  christos }
     93      1.1  christos 
     94      1.1  christos /* Get the value of h-cond.  */
     95      1.1  christos 
     96      1.1  christos BI
     97      1.1  christos m32rbf_h_cond_get (SIM_CPU *current_cpu)
     98      1.1  christos {
     99      1.1  christos   return CPU (h_cond);
    100      1.1  christos }
    101      1.1  christos 
    102      1.1  christos /* Set a value for h-cond.  */
    103      1.1  christos 
    104      1.1  christos void
    105      1.1  christos m32rbf_h_cond_set (SIM_CPU *current_cpu, BI newval)
    106      1.1  christos {
    107      1.1  christos   CPU (h_cond) = newval;
    108      1.1  christos }
    109      1.1  christos 
    110      1.1  christos /* Get the value of h-psw.  */
    111      1.1  christos 
    112      1.1  christos UQI
    113      1.1  christos m32rbf_h_psw_get (SIM_CPU *current_cpu)
    114      1.1  christos {
    115      1.1  christos   return GET_H_PSW ();
    116      1.1  christos }
    117      1.1  christos 
    118      1.1  christos /* Set a value for h-psw.  */
    119      1.1  christos 
    120      1.1  christos void
    121      1.1  christos m32rbf_h_psw_set (SIM_CPU *current_cpu, UQI newval)
    122      1.1  christos {
    123      1.1  christos   SET_H_PSW (newval);
    124      1.1  christos }
    125      1.1  christos 
    126      1.1  christos /* Get the value of h-bpsw.  */
    127      1.1  christos 
    128      1.1  christos UQI
    129      1.1  christos m32rbf_h_bpsw_get (SIM_CPU *current_cpu)
    130      1.1  christos {
    131      1.1  christos   return CPU (h_bpsw);
    132      1.1  christos }
    133      1.1  christos 
    134      1.1  christos /* Set a value for h-bpsw.  */
    135      1.1  christos 
    136      1.1  christos void
    137      1.1  christos m32rbf_h_bpsw_set (SIM_CPU *current_cpu, UQI newval)
    138      1.1  christos {
    139      1.1  christos   CPU (h_bpsw) = newval;
    140      1.1  christos }
    141      1.1  christos 
    142      1.1  christos /* Get the value of h-bbpsw.  */
    143      1.1  christos 
    144      1.1  christos UQI
    145      1.1  christos m32rbf_h_bbpsw_get (SIM_CPU *current_cpu)
    146      1.1  christos {
    147      1.1  christos   return CPU (h_bbpsw);
    148      1.1  christos }
    149      1.1  christos 
    150      1.1  christos /* Set a value for h-bbpsw.  */
    151      1.1  christos 
    152      1.1  christos void
    153      1.1  christos m32rbf_h_bbpsw_set (SIM_CPU *current_cpu, UQI newval)
    154      1.1  christos {
    155      1.1  christos   CPU (h_bbpsw) = newval;
    156      1.1  christos }
    157      1.1  christos 
    158      1.1  christos /* Get the value of h-lock.  */
    159      1.1  christos 
    160      1.1  christos BI
    161      1.1  christos m32rbf_h_lock_get (SIM_CPU *current_cpu)
    162      1.1  christos {
    163      1.1  christos   return CPU (h_lock);
    164      1.1  christos }
    165      1.1  christos 
    166      1.1  christos /* Set a value for h-lock.  */
    167      1.1  christos 
    168      1.1  christos void
    169      1.1  christos m32rbf_h_lock_set (SIM_CPU *current_cpu, BI newval)
    170      1.1  christos {
    171      1.1  christos   CPU (h_lock) = newval;
    172      1.1  christos }
    173      1.1  christos 
    174      1.1  christos /* Record trace results for INSN.  */
    175      1.1  christos 
    176      1.1  christos void
    177      1.1  christos m32rbf_record_trace_results (SIM_CPU *current_cpu, CGEN_INSN *insn,
    178      1.1  christos 			    int *indices, TRACE_RECORD *tr)
    179      1.1  christos {
    180      1.1  christos }
    181