OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-7.1/] [sim/] [moxie/] [sim-main.h] - Diff between revs 227 and 816

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 227 Rev 816
/* Moxie Simulator definition.
/* Moxie Simulator definition.
   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
   Contributed by Anthony Green <green@moxielogic.com>
   Contributed by Anthony Green <green@moxielogic.com>
 
 
This file is part of GDB, the GNU debugger.
This file is part of GDB, the GNU debugger.
 
 
This program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
(at your option) any later version.
 
 
This program is distributed in the hope that it will be useful,
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
GNU General Public License for more details.
 
 
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
#ifndef SIM_MAIN_H
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
#define SIM_MAIN_H
 
 
#define SIM_HAVE_BIENDIAN
#define SIM_HAVE_BIENDIAN
 
 
#include "sim-basics.h"
#include "sim-basics.h"
 
 
typedef address_word sim_cia;
typedef address_word sim_cia;
 
 
#include "sim-base.h"
#include "sim-base.h"
#include "bfd.h"
#include "bfd.h"
 
 
#define PCIDX 17
#define PCIDX 17
 
 
struct _sim_cpu {
struct _sim_cpu {
 
 
  /* The following are internal simulator state variables: */
  /* The following are internal simulator state variables: */
#define CIA_GET(CPU) ((CPU)->registers[PCIDX] + 0)
#define CIA_GET(CPU) ((CPU)->registers[PCIDX] + 0)
#define CIA_SET(CPU,CIA) ((CPU)->registers[PCIDX] = (CIA))
#define CIA_SET(CPU,CIA) ((CPU)->registers[PCIDX] = (CIA))
 
 
/* To keep this default simulator simple, and fast, we use a direct
/* To keep this default simulator simple, and fast, we use a direct
   vector of registers. The internal simulator engine then uses
   vector of registers. The internal simulator engine then uses
   manifests to access the correct slot. */
   manifests to access the correct slot. */
 
 
  unsigned_word registers[19];
  unsigned_word registers[19];
 
 
  sim_cpu_base base;
  sim_cpu_base base;
};
};
 
 
struct sim_state {
struct sim_state {
 
 
  sim_cpu cpu[MAX_NR_PROCESSORS];
  sim_cpu cpu[MAX_NR_PROCESSORS];
#if (WITH_SMP)
#if (WITH_SMP)
#define STATE_CPU(sd,n) (&(sd)->cpu[n])
#define STATE_CPU(sd,n) (&(sd)->cpu[n])
#else
#else
#define STATE_CPU(sd,n) (&(sd)->cpu[0])
#define STATE_CPU(sd,n) (&(sd)->cpu[0])
#endif
#endif
 
 
  sim_state_base base;
  sim_state_base base;
};
};
 
 
#endif
#endif
 
 
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.