Blame sim/frv/registers.h

Packit Service 706eca
/* Register definitions for the FRV simulator
Packit Service 706eca
   Copyright (C) 2000-2018 Free Software Foundation, Inc.
Packit Service 706eca
   Contributed by Red Hat.
Packit Service 706eca
Packit Service 706eca
This file is part of the GNU Simulators.
Packit Service 706eca
Packit Service 706eca
This program is free software; you can redistribute it and/or modify
Packit Service 706eca
it under the terms of the GNU General Public License as published by
Packit Service 706eca
the Free Software Foundation; either version 3 of the License, or
Packit Service 706eca
(at your option) any later version.
Packit Service 706eca
Packit Service 706eca
This program is distributed in the hope that it will be useful,
Packit Service 706eca
but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 706eca
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service 706eca
GNU General Public License for more details.
Packit Service 706eca
Packit Service 706eca
You should have received a copy of the GNU General Public License
Packit Service 706eca
along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
Packit Service 706eca
Packit Service 706eca
#ifndef REGISTERS_H
Packit Service 706eca
#define REGISTERS_H
Packit Service 706eca
Packit Service 706eca
#define FRV_MAX_GR  64
Packit Service 706eca
#define FRV_MAX_FR  64
Packit Service 706eca
#define FRV_MAX_CPR 64
Packit Service 706eca
#define FRV_MAX_SPR 4096
Packit Service 706eca
Packit Service 706eca
/* Register init, reset values and read_only masks.  */
Packit Service 706eca
typedef struct
Packit Service 706eca
{
Packit Service 706eca
  USI init_value;     /* initial value */
Packit Service 706eca
  USI reset_value;    /* value for software reset */
Packit Service 706eca
  USI reset_mask;     /* bits which are reset */
Packit Service 706eca
  USI read_only_mask; /* bits which are read-only */
Packit Service 706eca
  char implemented;   /* 1==register is implemented */
Packit Service 706eca
  char supervisor;    /* 1==register is supervisor-only */
Packit Service 706eca
} FRV_SPR_CONTROL_INFO;
Packit Service 706eca
Packit Service 706eca
typedef struct
Packit Service 706eca
{
Packit Service 706eca
  int fr;                    /* FR registers implemented */
Packit Service 706eca
  int cpr;                   /* coprocessor registers implemented */
Packit Service 706eca
  FRV_SPR_CONTROL_INFO *spr; /* SPR implementation details */
Packit Service 706eca
} FRV_REGISTER_CONTROL;
Packit Service 706eca
Packit Service 706eca
void frv_register_control_init (SIM_CPU *);
Packit Service 706eca
void frv_initialize_spr (SIM_CPU *);
Packit Service 706eca
void frv_reset_spr (SIM_CPU *);
Packit Service 706eca
Packit Service 706eca
void frv_check_spr_access (SIM_CPU *, UINT);
Packit Service 706eca
Packit Service 706eca
void frv_fr_registers_available (SIM_CPU *, int *, int *);
Packit Service 706eca
void frv_gr_registers_available (SIM_CPU *, int *, int *);
Packit Service 706eca
int  frv_check_register_access (SIM_CPU *, SI, int, int);
Packit Service 706eca
int  frv_check_gr_access (SIM_CPU *, SI);
Packit Service 706eca
int  frv_check_fr_access (SIM_CPU *, SI);
Packit Service 706eca
Packit Service 706eca
#endif /* REGISTERS_H */