]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - sim/microblaze/sim-main.h
sim: invert sim_state storage
[thirdparty/binutils-gdb.git] / sim / microblaze / sim-main.h
index 24316603716f16a039ddad1bd4c70d0cc299dce6..d69d814252a44ea04368a0483b478e45f74f45bb 100644 (file)
@@ -1,7 +1,4 @@
-#ifndef MICROBLAZE_SIM_MAIN
-#define MICROBLAZE_SIM_MAIN
-
-/* Copyright 2009, 2010, 2011 Free Software Foundation, Inc.
+/* Copyright 2009-2021 Free Software Foundation, Inc.
 
    This file is part of the Xilinx MicroBlaze simulator.
 
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
-   MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef MICROBLAZE_SIM_MAIN
+#define MICROBLAZE_SIM_MAIN
+
+#define SIM_HAVE_COMMON_SIM_STATE
 
 #include "microblaze.h"
 #include "sim-basics.h"
-typedef address_word sim_cia;
 #include "sim-base.h"
 
 /* The machine state.
@@ -42,9 +41,6 @@ typedef address_word sim_cia;
   word           spregs[2];            /* pc + msr */
   int            cycles;
   int            insts;
-  int            exception;
-  unsigned long   msize;
-  unsigned char  *memory;
   ubyte           imm_enable;
   half            imm_high;
 };
@@ -54,11 +50,4 @@ struct _sim_cpu {
   sim_cpu_base base;
 };
 
-#define MAX_NR_PROCESSORS 1
-struct sim_state {
-  sim_cpu cpu[MAX_NR_PROCESSORS];
-#define STATE_CPU(sd, n) (&(sd)->cpu[0])
-  sim_state_base base;
-};
 #endif /* MICROBLAZE_SIM_MAIN */
-